Ignore:
Timestamp:
2014-01-31T02:44:56+01:00 (10 years ago)
Author:
Don-vip
Message:

Sonar - fix various issues

File:
1 edited

Legend:

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

    r6780 r6792  
    10331033     *  def otherwise
    10341034     */
     1035    @SuppressWarnings("unchecked")
    10351036    synchronized public <T extends Setting> T getSetting(String key, T def, Class<T> klass) {
    10361037        CheckParameterUtil.ensureParameterNotNull(key);
     
    10451046        Setting prop = settingsMap.get(key);
    10461047        if (klass.isInstance(prop)) {
    1047             @SuppressWarnings("unchecked")
    1048             T prop_cast = (T) prop;
    1049             return prop_cast;
     1048            return (T) prop;
    10501049        } else {
    10511050            return def;
     
    10751074     * If not a single entry could be found, <code>def</code> is returned.
    10761075     */
     1076    @SuppressWarnings({ "unchecked", "rawtypes" })
    10771077    synchronized public Collection<Collection<String>> getArray(String key, Collection<Collection<String>> def) {
    10781078        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();
    10821080    }
    10831081
Note: See TracChangeset for help on using the changeset viewer.