Changeset 13173 in josm for trunk/src/org/openstreetmap/josm/data/StructUtils.java
- Timestamp:
- 2017-11-28T00:56:29+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/StructUtils.java
r12851 r13173 148 148 * @return the resulting map (same data content as <code>struct</code>) 149 149 */ 150 @SuppressWarnings("deprecation")151 150 public static <T> Map<String, String> serializeStruct(T struct, Class<T> klass) { 152 151 T structPrototype; … … 159 158 Map<String, String> hash = new LinkedHashMap<>(); 160 159 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) { 162 161 continue; 163 162 } … … 167 166 Object defaultFieldValue = f.get(structPrototype); 168 167 if (fieldValue != null && ( 169 f.getAnnotation(Preferences.writeExplicitly.class) != null ||170 168 f.getAnnotation(WriteExplicitly.class) != null || 171 169 !Objects.equals(fieldValue, defaultFieldValue))) { … … 216 214 continue; 217 215 } 218 if (f.getAnnotation( Preferences.pref.class) == null && f.getAnnotation(StructEntry.class) == null) {216 if (f.getAnnotation(StructEntry.class) == null) { 219 217 continue; 220 218 }
Note:
See TracChangeset
for help on using the changeset viewer.