Changeset 15329 in josm


Ignore:
Timestamp:
2019-09-01T15:51:59+02:00 (3 weeks ago)
Author:
Don-vip
Message:

optimization - avoid throwing useless MalformedURLException

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/CachedFile.java

    r15293 r15329  
    270270            return cacheFile;
    271271        initialized = true;
     272        if (name == null || name.startsWith("resource://")) {
     273            return null;
     274        }
    272275        URL url;
    273276        try {
     
    286289            }
    287290        } catch (MalformedURLException e) {
    288             if (name == null || name.startsWith("resource://")) {
    289                 return null;
    290             } else if (name.startsWith("josmdir://")) {
     291            if (name.startsWith("josmdir://")) {
    291292                cacheFile = new File(Config.getDirs().getUserDataDirectory(false), name.substring("josmdir://".length()));
    292293            } else if (name.startsWith("josmplugindir://")) {
Note: See TracChangeset for help on using the changeset viewer.