Changeset 19328 in josm for trunk/src/org/openstreetmap/josm/tools/Utils.java
- Timestamp:
- 2025-02-19T18:20:12+01:00 (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r19261 r19328 179 179 180 180 /** 181 * Joins a list of strings (or objects that can be converted to string via182 * Object.toString()) into a single string with fields separated by sep.183 * @param sep the separator184 * @param values collection of objects, null is converted to the185 * empty string186 * @return null if values is null. The joined string otherwise.187 * @deprecated since 15718, use {@link String#join} or {@link Collectors#joining}188 */189 @Deprecated(since = "15718", forRemoval = true)190 public static String join(String sep, Collection<?> values) {191 CheckParameterUtil.ensureParameterNotNull(sep, "sep");192 if (values == null)193 return null;194 return values.stream()195 .map(v -> v != null ? v.toString() : "")196 .collect(Collectors.joining(sep));197 }198 199 /**200 181 * Converts the given iterable collection as an unordered HTML list. 201 182 * @param values The iterable collection … … 1504 1485 1505 1486 /** 1506 * Reads the input stream and closes the stream at the end of processing (regardless if an exception was thrown)1507 *1508 * @param stream input stream1509 * @return byte array of data in input stream (empty if stream is null)1510 * @throws IOException if any I/O error occurs1511 * @deprecated since 19050 -- use {@link InputStream#readAllBytes()} instead1512 */1513 @Deprecated(since = "19050", forRemoval = true)1514 public static byte[] readBytesFromStream(InputStream stream) throws IOException {1515 if (stream == null) {1516 return new byte[0];1517 }1518 return stream.readAllBytes();1519 }1520 1521 /**1522 1487 * Returns the initial capacity to pass to the HashMap / HashSet constructor 1523 1488 * when it is initialized with a known number of entries. … … 1826 1791 // See http://stackoverflow.com/a/16200769/2257172 1827 1792 return isClassFound("javax.jnlp.ServiceManager"); 1828 }1829 1830 /**1831 * Determines whether JOSM has been started via Oracle Java Web Start.1832 * @return true if JOSM has been started via Oracle Java Web Start1833 * @since 157401834 * @deprecated JOSM no longer supports Oracle Java Webstart since Oracle Java Webstart doesn't support Java 9+.1835 */1836 @Deprecated(since = "19101", forRemoval = true)1837 public static boolean isRunningJavaWebStart() {1838 return isRunningWebStart() && isClassFound("com.sun.javaws.Main");1839 1793 } 1840 1794
Note:
See TracChangeset
for help on using the changeset viewer.