Skip to content

Commit

Permalink
see #24104 - removed deprecated functions
Browse files Browse the repository at this point in the history
git-svn-id: https://josm.openstreetmap.de/svn/trunk@19328 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
stoecker committed Feb 19, 2025
1 parent d5da2aa commit 0e27b26
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 178 deletions.
16 changes: 0 additions & 16 deletions src/org/openstreetmap/josm/actions/SessionSaveAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Layer> 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
Expand Down
22 changes: 0 additions & 22 deletions src/org/openstreetmap/josm/data/osm/IPrimitive.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import java.time.Instant;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
14 changes: 0 additions & 14 deletions src/org/openstreetmap/josm/data/protobuf/WireType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
12 changes: 0 additions & 12 deletions src/org/openstreetmap/josm/data/validation/tests/SharpAngles.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 0 additions & 12 deletions src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -585,18 +585,6 @@ private static Set<String> 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
Expand Down
20 changes: 0 additions & 20 deletions src/org/openstreetmap/josm/gui/util/TableHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
* <p>
* 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.
*
Expand Down
36 changes: 0 additions & 36 deletions src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>addItem</code> to add items. By default the first item
* in the data model becomes selected.
*
* @param prototypeDisplayValue the <code>Object</code> 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.
Expand All @@ -102,21 +81,6 @@ public JosmComboBox(JosmComboBoxModel<E> 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<E> 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
Expand Down
46 changes: 0 additions & 46 deletions src/org/openstreetmap/josm/tools/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0e27b26

Please sign in to comment.