Changeset 19320 in josm


Ignore:
Timestamp:
2025-02-14T10:42:11+01:00 (5 days ago)
Author:
stoecker
Message:

see #24104 - drop deprecated elements which aren't used anywhere

Location:
trunk/src/org/openstreetmap/josm
Files:
2 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxImageEntry.java

    r18592 r19320  
    174174     * is returned if that copy exists.
    175175     * @return the GPS time value
    176      * @deprecated Use {@link #getGpsInstant}
    177      */
    178     @Deprecated
    179     public Date getGpsTime() {
    180         if (tmp != null)
    181             return getDefensiveDate(tmp.gpsTime);
    182         return getDefensiveDate(gpsTime);
    183     }
    184 
    185     /**
    186      * Returns the GPS time value. The GPS time value from the temporary copy
    187      * is returned if that copy exists.
    188      * @return the GPS time value
    189176     */
    190177    @Override
     
    247234    public boolean hasExifTime() {
    248235        return exifTime != null;
    249     }
    250 
    251     /**
    252      * Returns the EXIF GPS time.
    253      * @return the EXIF GPS time
    254      * @since 6392
    255      * @deprecated Use {@link #getExifGpsInstant}
    256      */
    257     @Deprecated
    258     public Date getExifGpsTime() {
    259         return getDefensiveDate(exifGpsTime);
    260236    }
    261237
  • trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java

    r18014 r19320  
    134134     * Sets the {@link #PT_TIME} attribute to the specified time.
    135135     *
    136      * @param ts seconds from the epoch
    137      * @since 13210
    138      * @deprecated Use {@link #setInstant(Instant)}
    139      */
    140     @Deprecated
    141     public void setTime(long ts) {
    142         setInstant(Instant.ofEpochSecond(ts));
    143     }
    144 
    145     /**
    146      * Sets the {@link #PT_TIME} attribute to the specified time.
    147      *
    148136     * @param ts milliseconds from the epoch
    149137     * @since 14434
     
    195183    public boolean hasDate() {
    196184        return attr.get(PT_TIME) instanceof Instant;
    197     }
    198 
    199     /**
    200      * Returns the waypoint time Date object.
    201      *
    202      * @return a copy of the Date object associated with this waypoint
    203      * @since 14456
    204      * @deprecated Use {@link #getInstant()}
    205      */
    206     @Deprecated
    207     public Date getDate() {
    208         Instant instant = getInstant();
    209         return instant == null ? null : Date.from(instant);
    210185    }
    211186
  • trunk/src/org/openstreetmap/josm/data/oauth/OAuthVersion.java

    r18991 r19320  
    88 */
    99public enum OAuthVersion {
    10     /**
    11      * <a href="https://oauth.net/core/1.0a/">OAuth 1.0a</a>
    12      * @deprecated The OSM API server has deprecated and will remove OAuth 1.0a support in June 2024.
    13      */
    14     @Deprecated
    15     OAuth10a,
    1610    /** <a href="https://datatracker.ietf.org/doc/html/rfc6749">OAuth 2.0</a> */
    1711    OAuth20,
  • trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java

    r18918 r19320  
    3333     */
    3434    public static final String REVERSE_VALUE = "-1";
    35 
    36     /**
    37      * Discouraged synonym for {@link #TRUE_VALUE}
    38      * @deprecated since 18801, use {@link #TRUE_VALUE} instead.
    39      */
    40     @Deprecated
    41     public static final String trueval = TRUE_VALUE;
    42     /**
    43      * Discouraged synonym for {@link #FALSE_VALUE}
    44      * @deprecated since 18801, use {@link #FALSE_VALUE} instead.
    45      */
    46     @Deprecated
    47     public static final String falseval = FALSE_VALUE;
    48     /**
    49      * Discouraged synonym for {@link #REVERSE_VALUE}
    50      * @deprecated since 18801, use {@link #REVERSE_VALUE} instead.
    51      */
    52     @Deprecated
    53     public static final String reverseval = REVERSE_VALUE;
    5435
    5536    private OsmUtils() {
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java

    r17838 r19320  
    159159     * Returns the timestamp.
    160160     * @return the timestamp
    161      * @deprecated Use {@link #getInstant()}
    162      */
    163     @Deprecated
    164     public Date getTimestamp() {
    165         return Date.from(timestamp);
    166     }
    167 
    168     /**
    169      * Returns the timestamp.
    170      * @return the timestamp
    171161     */
    172162    public Instant getInstant() {
  • trunk/src/org/openstreetmap/josm/data/protobuf/ProtobufPacked.java

    r18695 r19320  
    1515    private final long[] numbers;
    1616    private int location;
    17 
    18     /**
    19      * Create a new ProtobufPacked object
    20      *
    21      * @param ignored A reusable ByteArrayOutputStream (no longer used)
    22      * @param bytes The packed bytes
    23      * @deprecated since we aren't using the output stream anymore
    24      */
    25     @Deprecated
    26     public ProtobufPacked(ByteArrayOutputStream ignored, byte[] bytes) {
    27         this(bytes);
    28     }
    2917
    3018    /**
  • trunk/src/org/openstreetmap/josm/gui/io/importexport/GeoJSONImporter.java

    r18807 r19320  
    3636    }
    3737
    38     /**
    39      * Parse GeoJSON dataset.
    40      * @param source geojson file
    41      * @return GeoJSON dataset
    42      * @throws IOException in case of I/O error
    43      * @throws IllegalDataException if an error was found while parsing the data from the source
    44      * @deprecated since 18807, use {@link #parseDataSet(InputStream, ProgressMonitor)} instead
    45      */
    46     @Deprecated
    47     public DataSet parseDataSet(final String source) throws IOException, IllegalDataException {
    48         try (CachedFile cf = new CachedFile(source)) {
    49             InputStream fileInputStream = Compression.getUncompressedFileInputStream(cf.getFile()); // NOPMD
    50             return this.parseDataSet(fileInputStream, NullProgressMonitor.INSTANCE);
    51         }
    52     }
    53 
    5438    @Override
    5539    protected DataSet parseDataSet(InputStream in, ProgressMonitor progressMonitor) throws IllegalDataException {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r17083 r19320  
    234234
    235235    /**
    236      * Returns the node icon that would be displayed for the given tag.
    237      * @param tag The tag to look an icon for
    238      * @return {@code null} if no icon found
    239      * @deprecated use {@link OsmPrimitiveImageProvider#getResource}
    240      */
    241     @Deprecated
    242     public static ImageIcon getNodeIcon(Tag tag) {
    243         if (tag != null) {
    244             return OsmPrimitiveImageProvider.getResource(tag.getKey(), tag.getValue(), OsmPrimitiveType.NODE)
    245                     .map(resource -> resource.getPaddedIcon(ImageProvider.ImageSizes.SMALLICON.getImageDimension()))
    246                     .orElse(null);
    247         }
    248         return null;
    249     }
    250 
    251     /**
    252236     * Gets the directories that should be searched for icons
    253237     * @param source The style source the icon is from
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java

    r19008 r19320  
    234234     * @param apiUrl The OSM API URL
    235235     * @param executor the executor used for running the HTTP requests for the authorization
    236      * @since 5422
    237      * @deprecated since 18991
    238      */
    239     @Deprecated
    240     public FullyAutomaticAuthorizationUI(String apiUrl, Executor executor) {
    241         this(apiUrl, executor, OAuthVersion.OAuth10a);
    242     }
    243 
    244     /**
    245      * Constructs a new {@code FullyAutomaticAuthorizationUI} for the given API URL.
    246      * @param apiUrl The OSM API URL
    247      * @param executor the executor used for running the HTTP requests for the authorization
    248236     * @param oAuthVersion The OAuth version to use for this UI
    249237     * @since 18991
  • trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java

    r19099 r19320  
    4848    private final HtmlPanel pnlMessage = new HtmlPanel();
    4949    private final transient Executor executor;
    50 
    51     /**
    52      * Constructs a new {@code ManualAuthorizationUI} for the given API URL.
    53      * @param apiUrl The OSM API URL
    54      * @param executor the executor used for running the HTTP requests for the authorization
    55      * @since 5422
    56      * @deprecated since 18991, use {@link ManualAuthorizationUI#ManualAuthorizationUI(String, Executor, OAuthVersion)}
    57      * instead.
    58      */
    59     @Deprecated
    60     public ManualAuthorizationUI(String apiUrl, Executor executor) {
    61         this(apiUrl, executor, OAuthVersion.OAuth10a);
    62     }
    6350
    6451    /**
  • trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgent.java

    r18991 r19320  
    5959
    6060    /**
    61      * Lookup the current OAuth Access Token to access the OSM server. Replies null, if no
    62      * Access Token is currently managed by this CredentialAgent.
    63      *
    64      * @return the current OAuth Access Token to access the OSM server.
    65      * @throws CredentialsAgentException if something goes wrong
    66      * @deprecated since 18991 -- OAuth 1.0 is being removed from the OSM API
    67      */
    68     @Deprecated
    69     default IOAuthToken lookupOAuthAccessToken() throws CredentialsAgentException {
    70         throw new CredentialsAgentException("Call to deprecated method");
    71     }
    72 
    73     /**
    7461     * Lookup the current OAuth Access Token to access the specified server. Replies null, if no
    7562     * Access Token is currently managed by this CredentialAgent.
     
    8269    @Nullable
    8370    IOAuthToken lookupOAuthAccessToken(String host) throws CredentialsAgentException;
    84 
    85     /**
    86      * Stores the OAuth Access Token <code>accessToken</code>.
    87      *
    88      * @param accessToken the access Token. null, to remove the Access Token.
    89      * @throws CredentialsAgentException if something goes wrong
    90      * @deprecated since 18991 -- OAuth 1.0 is being removed from the OSM API
    91      */
    92     @Deprecated
    93     default void storeOAuthAccessToken(IOAuthToken accessToken) throws CredentialsAgentException {
    94         throw new CredentialsAgentException("Call to deprecated method");
    95     }
    9671
    9772    /**
Note: See TracChangeset for help on using the changeset viewer.