Ignore:
Timestamp:
2017-11-28T00:56:29+01:00 (6 years ago)
Author:
Don-vip
Message:

see #15310 - remove most of deprecated APIs

File:
1 edited

Legend:

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

    r12851 r13173  
    148148     * @return the resulting map (same data content as <code>struct</code>)
    149149     */
    150     @SuppressWarnings("deprecation")
    151150    public static <T> Map<String, String> serializeStruct(T struct, Class<T> klass) {
    152151        T structPrototype;
     
    159158        Map<String, String> hash = new LinkedHashMap<>();
    160159        for (Field f : klass.getDeclaredFields()) {
    161             if (f.getAnnotation(Preferences.pref.class) == null && f.getAnnotation(StructEntry.class) == null) {
     160            if (f.getAnnotation(StructEntry.class) == null) {
    162161                continue;
    163162            }
     
    167166                Object defaultFieldValue = f.get(structPrototype);
    168167                if (fieldValue != null && (
    169                         f.getAnnotation(Preferences.writeExplicitly.class) != null ||
    170168                        f.getAnnotation(WriteExplicitly.class) != null ||
    171169                        !Objects.equals(fieldValue, defaultFieldValue))) {
     
    216214                continue;
    217215            }
    218             if (f.getAnnotation(Preferences.pref.class) == null && f.getAnnotation(StructEntry.class) == null) {
     216            if (f.getAnnotation(StructEntry.class) == null) {
    219217                continue;
    220218            }
Note: See TracChangeset for help on using the changeset viewer.