Changeset 12293 in josm for trunk/src


Ignore:
Timestamp:
2017-06-01T15:43:36+02:00 (7 years ago)
Author:
bastiK
Message:

deprecate CustomProjection constructor + change removal date for cacheDir related deprecations (ref [12289])

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java

    r12236 r12293  
    210210     * @param pref the string that defines the custom projection
    211211     * @param cacheDir cache directory name
     212     * @deprecated unused - remove in 2017-09
    212213     */
    213214    public CustomProjection(String name, String code, String pref, String cacheDir) {
     215        this(name, code, pref);
     216    }
     217
     218    /**
     219     * Constructs a new {@code CustomProjection} with given name, code and parameters.
     220     *
     221     * @param name describe projection in one or two words
     222     * @param code unique code for this projection - may be null
     223     * @param pref the string that defines the custom projection
     224     */
     225    public CustomProjection(String name, String code, String pref) {
    214226        this.name = name;
    215227        this.code = code;
    216228        this.pref = pref;
    217         this.cacheDir = cacheDir;
    218229        try {
    219230            update(pref);
     
    708719    /**
    709720     * {@inheritDoc}
    710      * @deprecated unused - remove in 2017-07
     721     * @deprecated unused - remove in 2017-09
    711722     */
    712723    @Override
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/AbstractProjectionChoice.java

    r12289 r12293  
    5151    }
    5252
     53    /**
     54    * Get the cache directory name.
     55    * @return the cache directory name (base name)
     56    * @deprecated unused - remove in 2017-09
     57    */
     58    @Deprecated
     59    public String getCacheDir() {
     60        return cacheDir;
     61    }
     62
    5363    @Override
    5464    public String toString() {
     
    6474        String code = getCurrentCode();
    6575        return new CustomProjection(getProjectionName(), code, Optional.ofNullable(Projections.getInit(code))
    66                 .orElseThrow(() -> new AssertionError("Error: Unknown projection code: " + code)), cacheDir);
     76                .orElseThrow(() -> new AssertionError("Error: Unknown projection code: " + code)));
    6777    }
    6878}
Note: See TracChangeset for help on using the changeset viewer.