|
|
@ -904,7 +904,10 @@ public abstract class StringUtils { |
|
|
|
* @param array1 the first array (can be {@code null}) |
|
|
|
* @param array1 the first array (can be {@code null}) |
|
|
|
* @param array2 the second array (can be {@code null}) |
|
|
|
* @param array2 the second array (can be {@code null}) |
|
|
|
* @return the new array ({@code null} if both given arrays were {@code null}) |
|
|
|
* @return the new array ({@code null} if both given arrays were {@code null}) |
|
|
|
|
|
|
|
* @deprecated as of 4.3.15, in favor of manual merging via {@link LinkedHashSet} |
|
|
|
|
|
|
|
* (with every entry included at most once, even entries within the first array) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Deprecated |
|
|
|
@Nullable |
|
|
|
@Nullable |
|
|
|
public static String[] mergeStringArrays(@Nullable String[] array1, @Nullable String[] array2) { |
|
|
|
public static String[] mergeStringArrays(@Nullable String[] array1, @Nullable String[] array2) { |
|
|
|
if (ObjectUtils.isEmpty(array1)) { |
|
|
|
if (ObjectUtils.isEmpty(array1)) { |
|
|
@ -1021,10 +1024,9 @@ public abstract class StringUtils { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Take an array of strings and split each element based on the given delimiter. |
|
|
|
* Take an array of strings and split each element based on the given delimiter. |
|
|
|
* A {@code Properties} instance is then generated, with the left of the |
|
|
|
* A {@code Properties} instance is then generated, with the left of the delimiter |
|
|
|
* delimiter providing the key, and the right of the delimiter providing the value. |
|
|
|
* providing the key, and the right of the delimiter providing the value. |
|
|
|
* <p>Will trim both the key and value before adding them to the |
|
|
|
* <p>Will trim both the key and value before adding them to the {@code Properties}. |
|
|
|
* {@code Properties} instance. |
|
|
|
|
|
|
|
* @param array the array to process |
|
|
|
* @param array the array to process |
|
|
|
* @param delimiter to split each element using (typically the equals symbol) |
|
|
|
* @param delimiter to split each element using (typically the equals symbol) |
|
|
|
* @return a {@code Properties} instance representing the array contents, |
|
|
|
* @return a {@code Properties} instance representing the array contents, |
|
|
|