Changeset 12983 in josm


Ignore:
Timestamp:
2017-10-11T14:52:45+02:00 (6 days ago)
Author:
bastiK
Message:

see #15410 - move cached() convenience method to super type

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/preferences/AbstractProperty.java

    r12881 r12983  
    231231    protected Preferences getPreferences() {
    232232        return preferences;
     233    }
     234
     235    /**
     236     * Creates a new {@link CachingProperty} instance for this property.
     237     * @return The new caching property instance.
     238     * @since 12983
     239     */
     240    public CachingProperty<T> cached() {
     241        return new CachingProperty<>(this);
    233242    }
    234243
  • trunk/src/org/openstreetmap/josm/data/preferences/AbstractToStringProperty.java

    r12881 r12983  
    146146    }
    147147
    148     /**
    149      * Creates a new {@link CachingProperty} instance for this property.
    150      * @return The new caching property instance.
    151      */
     148    @Override
    152149    public CachingProperty<T> cached() {
    153         return new CachingProperty<>(this);
     150        // Removing this implementation breaks binary compatibility
     151        return super.cached();
    154152    }
    155153}
Note: See TracChangeset for help on using the changeset viewer.