Changeset 19328 in josm


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

see #24104 - removed deprecated functions

Location:
trunk/src/org/openstreetmap/josm
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/SessionSaveAction.java

    r19108 r19328  
    537537     * Sets the current session file and the layers included in that file
    538538     * @param file file
    539      * @param zip if it is a zip session file
    540      * @param layers layers that are currently represented in the session file
    541      * @deprecated since 18833, use {@link #setCurrentSession(File, List, SessionWriter.SessionWriterFlags...)} instead
    542      */
    543     @Deprecated(since = "18833")
    544     public static void setCurrentSession(File file, boolean zip, List<Layer> layers) {
    545         if (zip) {
    546             setCurrentSession(file, layers, SessionWriter.SessionWriterFlags.IS_ZIP);
    547         } else {
    548             setCurrentSession(file, layers);
    549         }
    550     }
    551 
    552     /**
    553      * Sets the current session file and the layers included in that file
    554      * @param file file
    555539     * @param layers layers that are currently represented in the session file
    556540     * @param flags The flags for the current session
  • trunk/src/org/openstreetmap/josm/data/osm/IPrimitive.java

    r19108 r19328  
    44import java.time.Instant;
    55import java.util.Collections;
    6 import java.util.Date;
    76import java.util.List;
    87import java.util.Map;
     
    296295     *
    297296     * @return date of last modification
    298      * @see #setTimestamp
    299      * @deprecated since 17749, use {@link #getInstant} instead
    300      */
    301     @Deprecated(since = "17749")
    302     Date getTimestamp();
     297     * @see #setInstant
     298     */
     299    Instant getInstant();
    303300
    304301    /**
     
    307304     * used to check against edit conflicts.
    308305     *
    309      * @return date of last modification
    310      * @see #setInstant
    311      */
    312     Instant getInstant();
    313 
    314     /**
    315      * Time of last modification to this object. This is not set by JOSM but
    316      * read from the server and delivered back to the server unmodified. It is
    317      * used to check against edit conflicts.
    318      *
    319306     * @return last modification as timestamp
    320307     * @see #setRawTimestamp
    321308     */
    322309    int getRawTimestamp();
    323 
    324     /**
    325      * Sets time of last modification to this object
    326      * @param timestamp date of last modification
    327      * @see #getTimestamp
    328      * @deprecated since 17749, use {@link #setInstant} instead
    329      */
    330     @Deprecated(since = "17749")
    331     void setTimestamp(Date timestamp);
    332310
    333311    /**
  • trunk/src/org/openstreetmap/josm/data/protobuf/WireType.java

    r18431 r19328  
    2121     */
    2222    LENGTH_DELIMITED(2),
    23     /**
    24      * start groups
    25      *
    26      * @deprecated Unknown reason. Deprecated since at least 2012.
    27      */
    28     @Deprecated
    29     START_GROUP(3),
    30     /**
    31      * end groups
    32      *
    33      * @deprecated Unknown reason. Deprecated since at least 2012.
    34      */
    35     @Deprecated
    36     END_GROUP(4),
    3723    /**
    3824     * fixed32, sfixed32, float
  • trunk/src/org/openstreetmap/josm/data/validation/tests/SharpAngles.java

    r19162 r19328  
    163163
    164164    /**
    165      * Add a highway to ignore
    166      * @param highway The highway type to ignore (e.g., if you want to ignore residential roads, use "residential")
    167      * @since 19162 (deprecated)
    168      * @deprecated Not known to be used. Please use config preference "validator.sharpangles.ignorehighway" instead.
    169      */
    170     @Deprecated(since = "19162", forRemoval = true)
    171     public void addIgnoredHighway(String highway) {
    172         // Don't forget to make ignoreHighways immutable when this method is removed
    173         ignoreHighways.add(highway);
    174     }
    175 
    176     /**
    177165     * Set the maximum angle
    178166     * @param angle The maximum angle in degrees.
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r19285 r19328  
    587587
    588588    /**
    589      * Determines if the given key is in internal presets.
    590      * @param key key
    591      * @return {@code true} if the given key is in internal presets
    592      * @since 9023
    593      * @deprecated since 18281 -- use {@link TaggingPresets#isKeyInPresets(String)} instead
    594      */
    595     @Deprecated(since = "18281", forRemoval = true)
    596     public static boolean isKeyInPresets(String key) {
    597         return TaggingPresets.isKeyInPresets(key);
    598     }
    599 
    600     /**
    601589     * Determines if the given tag is in internal presets.
    602590     * @param key key
  • trunk/src/org/openstreetmap/josm/gui/util/TableHelper.java

    r19120 r19328  
    120120
    121121    /**
    122      * Returns an array of all of the selected indices in the selection model, in increasing order.
    123      * Unfortunately this method is not available in OpenJDK before version 11, see
    124      * https://bugs.openjdk.java.net/browse/JDK-8199395
    125      * <p>
    126      * To be removed when we switch to Java 11 or later.
    127      *
    128      * @param selectionModel list selection model.
    129      *
    130      * @return all of the selected indices, in increasing order,
    131      *         or an empty array if nothing is selected
    132      * @see #selectedIndices(ListSelectionModel)
    133      * @since 15226
    134      * @deprecated Use {@link ListSelectionModel#getSelectedIndices()} instead
    135      */
    136     @Deprecated(since = "19120")
    137     public static int[] getSelectedIndices(ListSelectionModel selectionModel) {
    138         return selectionModel.getSelectedIndices();
    139     }
    140 
    141     /**
    142122     * Returns a stream of all of the selected indices in the selection model, in increasing order.
    143123     *
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java

    r19103 r19328  
    7272
    7373    /**
    74      * Creates a {@code JosmComboBox} with a {@link JosmComboBoxModel} data model and
    75      * the specified prototype display value.
    76      * The default data model is an empty list of objects.
    77      * Use <code>addItem</code> to add items. By default the first item
    78      * in the data model becomes selected.
    79      *
    80      * @param prototypeDisplayValue the <code>Object</code> used to compute
    81      *      the maximum number of elements to be displayed at once before
    82      *      displaying a scroll bar
    83      *
    84      * @since 5450
    85      * @deprecated use {@link #setPrototypeDisplayValue} instead.
    86      */
    87     @Deprecated(since = "18221", forRemoval = true)
    88     public JosmComboBox(E prototypeDisplayValue) {
    89         super(new JosmComboBoxModel<>());
    90         setPrototypeDisplayValue(prototypeDisplayValue);
    91         init();
    92     }
    93 
    94     /**
    9574     * Creates a {@code JosmComboBox} that takes it items from an existing {@link JosmComboBoxModel}
    9675     * data model.
     
    10079    public JosmComboBox(JosmComboBoxModel<E> aModel) {
    10180        super(aModel);
    102         init();
    103     }
    104 
    105     /**
    106      * Creates a {@code JosmComboBox} that takes it items from an existing {@link JosmComboBoxModel}
    107      * data model and sets the specified prototype display value.
    108      *
    109      * @param aModel the model that provides the displayed list of items
    110      * @param prototypeDisplayValue use this item to size the combobox (may be null)
    111      * @deprecated use {@link #setPrototypeDisplayValue} instead.
    112      */
    113     @Deprecated(since = "18221", forRemoval = true)
    114     public JosmComboBox(JosmComboBoxModel<E> aModel, E prototypeDisplayValue) {
    115         super(aModel);
    116         setPrototypeDisplayValue(prototypeDisplayValue);
    11781        init();
    11882    }
  • 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.