diff --git a/src/org/openstreetmap/josm/actions/SessionSaveAction.java b/src/org/openstreetmap/josm/actions/SessionSaveAction.java index acb1c629a26..bf35f84cd3a 100644 --- a/src/org/openstreetmap/josm/actions/SessionSaveAction.java +++ b/src/org/openstreetmap/josm/actions/SessionSaveAction.java @@ -533,22 +533,6 @@ private static void updateSessionFile(String fileName) throws UserCancelExceptio } } - /** - * Sets the current session file and the layers included in that file - * @param file file - * @param zip if it is a zip session file - * @param layers layers that are currently represented in the session file - * @deprecated since 18833, use {@link #setCurrentSession(File, List, SessionWriter.SessionWriterFlags...)} instead - */ - @Deprecated(since = "18833") - public static void setCurrentSession(File file, boolean zip, List layers) { - if (zip) { - setCurrentSession(file, layers, SessionWriter.SessionWriterFlags.IS_ZIP); - } else { - setCurrentSession(file, layers); - } - } - /** * Sets the current session file and the layers included in that file * @param file file diff --git a/src/org/openstreetmap/josm/data/osm/IPrimitive.java b/src/org/openstreetmap/josm/data/osm/IPrimitive.java index fcefcb92c82..23d264c3ecf 100644 --- a/src/org/openstreetmap/josm/data/osm/IPrimitive.java +++ b/src/org/openstreetmap/josm/data/osm/IPrimitive.java @@ -3,7 +3,6 @@ import java.time.Instant; import java.util.Collections; -import java.util.Date; import java.util.List; import java.util.Map; @@ -289,18 +288,6 @@ default PrimitiveId getPrimitiveId() { */ void setUser(User user); - /** - * Time of last modification to this object. This is not set by JOSM but - * read from the server and delivered back to the server unmodified. It is - * used to check against edit conflicts. - * - * @return date of last modification - * @see #setTimestamp - * @deprecated since 17749, use {@link #getInstant} instead - */ - @Deprecated(since = "17749") - Date getTimestamp(); - /** * Time of last modification to this object. This is not set by JOSM but * read from the server and delivered back to the server unmodified. It is @@ -321,15 +308,6 @@ default PrimitiveId getPrimitiveId() { */ int getRawTimestamp(); - /** - * Sets time of last modification to this object - * @param timestamp date of last modification - * @see #getTimestamp - * @deprecated since 17749, use {@link #setInstant} instead - */ - @Deprecated(since = "17749") - void setTimestamp(Date timestamp); - /** * Sets time of last modification to this object * @param timestamp date of last modification diff --git a/src/org/openstreetmap/josm/data/protobuf/WireType.java b/src/org/openstreetmap/josm/data/protobuf/WireType.java index 6fdc5d579cb..3440bf3efbd 100644 --- a/src/org/openstreetmap/josm/data/protobuf/WireType.java +++ b/src/org/openstreetmap/josm/data/protobuf/WireType.java @@ -20,20 +20,6 @@ public enum WireType { * string, bytes, embedded messages, packed repeated fields */ LENGTH_DELIMITED(2), - /** - * start groups - * - * @deprecated Unknown reason. Deprecated since at least 2012. - */ - @Deprecated - START_GROUP(3), - /** - * end groups - * - * @deprecated Unknown reason. Deprecated since at least 2012. - */ - @Deprecated - END_GROUP(4), /** * fixed32, sfixed32, float */ diff --git a/src/org/openstreetmap/josm/data/validation/tests/SharpAngles.java b/src/org/openstreetmap/josm/data/validation/tests/SharpAngles.java index 3fc23385e27..a9a5b2ce310 100644 --- a/src/org/openstreetmap/josm/data/validation/tests/SharpAngles.java +++ b/src/org/openstreetmap/josm/data/validation/tests/SharpAngles.java @@ -161,18 +161,6 @@ public void setMaxLength(double length) { maxLength = length; } - /** - * Add a highway to ignore - * @param highway The highway type to ignore (e.g., if you want to ignore residential roads, use "residential") - * @since 19162 (deprecated) - * @deprecated Not known to be used. Please use config preference "validator.sharpangles.ignorehighway" instead. - */ - @Deprecated(since = "19162", forRemoval = true) - public void addIgnoredHighway(String highway) { - // Don't forget to make ignoreHighways immutable when this method is removed - ignoreHighways.add(highway); - } - /** * Set the maximum angle * @param angle The maximum angle in degrees. diff --git a/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java b/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java index f42bc694744..80815d08cf3 100644 --- a/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java +++ b/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java @@ -585,18 +585,6 @@ private static Set getPresetValues(String key) { return null; } - /** - * Determines if the given key is in internal presets. - * @param key key - * @return {@code true} if the given key is in internal presets - * @since 9023 - * @deprecated since 18281 -- use {@link TaggingPresets#isKeyInPresets(String)} instead - */ - @Deprecated(since = "18281", forRemoval = true) - public static boolean isKeyInPresets(String key) { - return TaggingPresets.isKeyInPresets(key); - } - /** * Determines if the given tag is in internal presets. * @param key key diff --git a/src/org/openstreetmap/josm/gui/util/TableHelper.java b/src/org/openstreetmap/josm/gui/util/TableHelper.java index f88fe02a521..51ede3f1d07 100644 --- a/src/org/openstreetmap/josm/gui/util/TableHelper.java +++ b/src/org/openstreetmap/josm/gui/util/TableHelper.java @@ -118,26 +118,6 @@ public static void computeColumnsWidth(JTable tbl) { } } - /** - * Returns an array of all of the selected indices in the selection model, in increasing order. - * Unfortunately this method is not available in OpenJDK before version 11, see - * https://bugs.openjdk.java.net/browse/JDK-8199395 - *

- * To be removed when we switch to Java 11 or later. - * - * @param selectionModel list selection model. - * - * @return all of the selected indices, in increasing order, - * or an empty array if nothing is selected - * @see #selectedIndices(ListSelectionModel) - * @since 15226 - * @deprecated Use {@link ListSelectionModel#getSelectedIndices()} instead - */ - @Deprecated(since = "19120") - public static int[] getSelectedIndices(ListSelectionModel selectionModel) { - return selectionModel.getSelectedIndices(); - } - /** * Returns a stream of all of the selected indices in the selection model, in increasing order. * diff --git a/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java b/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java index 380040ff9ce..d3f86069c49 100644 --- a/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java +++ b/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java @@ -70,27 +70,6 @@ public JosmComboBox() { init(); } - /** - * Creates a {@code JosmComboBox} with a {@link JosmComboBoxModel} data model and - * the specified prototype display value. - * The default data model is an empty list of objects. - * Use addItem to add items. By default the first item - * in the data model becomes selected. - * - * @param prototypeDisplayValue the Object used to compute - * the maximum number of elements to be displayed at once before - * displaying a scroll bar - * - * @since 5450 - * @deprecated use {@link #setPrototypeDisplayValue} instead. - */ - @Deprecated(since = "18221", forRemoval = true) - public JosmComboBox(E prototypeDisplayValue) { - super(new JosmComboBoxModel<>()); - setPrototypeDisplayValue(prototypeDisplayValue); - init(); - } - /** * Creates a {@code JosmComboBox} that takes it items from an existing {@link JosmComboBoxModel} * data model. @@ -102,21 +81,6 @@ public JosmComboBox(JosmComboBoxModel aModel) { init(); } - /** - * Creates a {@code JosmComboBox} that takes it items from an existing {@link JosmComboBoxModel} - * data model and sets the specified prototype display value. - * - * @param aModel the model that provides the displayed list of items - * @param prototypeDisplayValue use this item to size the combobox (may be null) - * @deprecated use {@link #setPrototypeDisplayValue} instead. - */ - @Deprecated(since = "18221", forRemoval = true) - public JosmComboBox(JosmComboBoxModel aModel, E prototypeDisplayValue) { - super(aModel); - setPrototypeDisplayValue(prototypeDisplayValue); - init(); - } - /** * Creates a {@code JosmComboBox} that contains the elements * in the specified array. By default the first item in the array diff --git a/src/org/openstreetmap/josm/tools/Utils.java b/src/org/openstreetmap/josm/tools/Utils.java index c51ca89eba6..0db921f1824 100644 --- a/src/org/openstreetmap/josm/tools/Utils.java +++ b/src/org/openstreetmap/josm/tools/Utils.java @@ -177,25 +177,6 @@ public static int mod(int a, int n) { return res; } - /** - * Joins a list of strings (or objects that can be converted to string via - * Object.toString()) into a single string with fields separated by sep. - * @param sep the separator - * @param values collection of objects, null is converted to the - * empty string - * @return null if values is null. The joined string otherwise. - * @deprecated since 15718, use {@link String#join} or {@link Collectors#joining} - */ - @Deprecated(since = "15718", forRemoval = true) - public static String join(String sep, Collection values) { - CheckParameterUtil.ensureParameterNotNull(sep, "sep"); - if (values == null) - return null; - return values.stream() - .map(v -> v != null ? v.toString() : "") - .collect(Collectors.joining(sep)); - } - /** * Converts the given iterable collection as an unordered HTML list. * @param values The iterable collection @@ -1502,22 +1483,6 @@ public static boolean hasExtension(File file, String... extensions) { return hasExtension(file.getName(), extensions); } - /** - * Reads the input stream and closes the stream at the end of processing (regardless if an exception was thrown) - * - * @param stream input stream - * @return byte array of data in input stream (empty if stream is null) - * @throws IOException if any I/O error occurs - * @deprecated since 19050 -- use {@link InputStream#readAllBytes()} instead - */ - @Deprecated(since = "19050", forRemoval = true) - public static byte[] readBytesFromStream(InputStream stream) throws IOException { - if (stream == null) { - return new byte[0]; - } - return stream.readAllBytes(); - } - /** * Returns the initial capacity to pass to the HashMap / HashSet constructor * when it is initialized with a known number of entries. @@ -1827,17 +1792,6 @@ public static boolean isRunningWebStart() { return isClassFound("javax.jnlp.ServiceManager"); } - /** - * Determines whether JOSM has been started via Oracle Java Web Start. - * @return true if JOSM has been started via Oracle Java Web Start - * @since 15740 - * @deprecated JOSM no longer supports Oracle Java Webstart since Oracle Java Webstart doesn't support Java 9+. - */ - @Deprecated(since = "19101", forRemoval = true) - public static boolean isRunningJavaWebStart() { - return isRunningWebStart() && isClassFound("com.sun.javaws.Main"); - } - /** * Determines whether JOSM has been started via Open Web Start (IcedTea-Web). * @return true if JOSM has been started via Open Web Start (IcedTea-Web)