Ignore:
Timestamp:
2025-02-19T18:20:12+01:00 (6 weeks ago)
Author:
stoecker
Message:

see #24104 - removed deprecated functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r19261 r19328  
    179179
    180180    /**
    181      * Joins a list of strings (or objects that can be converted to string via
    182      * Object.toString()) into a single string with fields separated by sep.
    183      * @param sep the separator
    184      * @param values collection of objects, null is converted to the
    185      *  empty string
    186      * @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     /**
    200181     * Converts the given iterable collection as an unordered HTML list.
    201182     * @param values The iterable collection
     
    15041485
    15051486    /**
    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 stream
    1509      * @return byte array of data in input stream (empty if stream is null)
    1510      * @throws IOException if any I/O error occurs
    1511      * @deprecated since 19050 -- use {@link InputStream#readAllBytes()} instead
    1512      */
    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     /**
    15221487     * Returns the initial capacity to pass to the HashMap / HashSet constructor
    15231488     * when it is initialized with a known number of entries.
     
    18261791        // See http://stackoverflow.com/a/16200769/2257172
    18271792        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 Start
    1833      * @since 15740
    1834      * @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");
    18391793    }
    18401794
Note: See TracChangeset for help on using the changeset viewer.