Changeset 6221 in josm for trunk/src/org/openstreetmap/josm/tools/Utils.java
- Timestamp:
- 2013-09-07T17:52:27+02:00 (13 years ago)
- File:
-
- 1 edited
-
trunk/src/org/openstreetmap/josm/tools/Utils.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r6175 r6221 30 30 import java.util.AbstractList; 31 31 import java.util.ArrayList; 32 import java.util.Arrays; 32 33 import java.util.Collection; 33 34 import java.util.Iterator; … … 241 242 } 242 243 244 /** 245 * Copies the given array. Unlike {@link Arrays#copyOf}, this method is null-safe. 246 * @param array The array to copy 247 * @return A copy of the original array, or {@code null} if {@code array} is null 248 * @since 6221 249 */ 250 public static <T> T[] copyArray(T[] array) { 251 if (array != null) { 252 return Arrays.copyOf(array, array.length); 253 } 254 return null; 255 } 256 243 257 /** 244 258 * Simple file copy function that will overwrite the target file.<br/>
Note:
See TracChangeset
for help on using the changeset viewer.
