Changeset 12798 in josm for trunk/src/org/openstreetmap/josm/tools/Utils.java
- Timestamp:
- 2017-09-09T14:00:39+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r12772 r12798 345 345 * @since 6222 346 346 */ 347 public static char[] copyArray(char 347 public static char[] copyArray(char... array) { 348 348 if (array != null) { 349 349 return Arrays.copyOf(array, array.length); … … 812 812 } 813 813 814 private static String strip(final String str, final char 814 private static String strip(final String str, final char... skipChars) { 815 815 816 816 int start = 0; … … 834 834 } 835 835 836 private static boolean isStrippedChar(char c, final char 836 private static boolean isStrippedChar(char c, final char... skipChars) { 837 837 return Character.isWhitespace(c) || Character.isSpaceChar(c) || stripChar(skipChars, c); 838 838 } … … 1496 1496 * @since 10223 1497 1497 */ 1498 public static void setObjectsAccessible(final AccessibleObject 1498 public static void setObjectsAccessible(final AccessibleObject... objects) { 1499 1499 if (objects != null && objects.length > 0) { 1500 1500 AccessController.doPrivileged((PrivilegedAction<Object>) () -> { … … 1626 1626 return 0; 1627 1627 } 1628 return firstDotPos > - 1628 return firstDotPos > -1 ? Integer.parseInt(version.substring(firstDotPos + 1, 1629 1629 lastDotPos > -1 ? lastDotPos : version.length())) : 0; 1630 1630 }
Note:
See TracChangeset
for help on using the changeset viewer.