Ignore:
Timestamp:
2013-10-02T01:03:42+02:00 (11 years ago)
Author:
Don-vip
Message:

Sonar/Findbugs - Avoid Throwing Null Pointer Exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r6265 r6287  
    121121            try {
    122122                addRecursiveFiles(files, selection);
    123             } catch(NullPointerException npe) {
    124                 rememberError(tr("One of the selected files was null"));
     123            } catch (IllegalStateException e) {
     124                rememberError(e.getMessage());
    125125            }
    126126
     
    209209            }
    210210
    211             if (nullFile)
    212                 throw new NullPointerException();
     211            if (nullFile) {
     212                throw new IllegalStateException(tr("One of the selected files was null"));
     213            }
    213214        }
    214215
Note: See TracChangeset for help on using the changeset viewer.