Changeset 6792 in josm for trunk/src/org/openstreetmap/josm/data/Preferences.java
- Timestamp:
- 2014-01-31T02:44:56+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r6780 r6792 1033 1033 * def otherwise 1034 1034 */ 1035 @SuppressWarnings("unchecked") 1035 1036 synchronized public <T extends Setting> T getSetting(String key, T def, Class<T> klass) { 1036 1037 CheckParameterUtil.ensureParameterNotNull(key); … … 1045 1046 Setting prop = settingsMap.get(key); 1046 1047 if (klass.isInstance(prop)) { 1047 @SuppressWarnings("unchecked") 1048 T prop_cast = (T) prop; 1049 return prop_cast; 1048 return (T) prop; 1050 1049 } else { 1051 1050 return def; … … 1075 1074 * If not a single entry could be found, <code>def</code> is returned. 1076 1075 */ 1076 @SuppressWarnings({ "unchecked", "rawtypes" }) 1077 1077 synchronized public Collection<Collection<String>> getArray(String key, Collection<Collection<String>> def) { 1078 1078 ListListSetting val = getSetting(key, ListListSetting.create(def), ListListSetting.class); 1079 @SuppressWarnings({ "unchecked", "rawtypes" }) 1080 Collection<Collection<String>> val_cast = (Collection) val.getValue(); 1081 return val_cast; 1079 return (Collection) val.getValue(); 1082 1080 } 1083 1081
Note:
See TracChangeset
for help on using the changeset viewer.