synchronized (map) { if (map.containsKey(path)) { return (Path) map.get(path); } else { Path parent; String name;  if (pathPrefix == null) { parent = null; name = path; } else { parent = get(pathPrefix); name = path.substring(pathPrefix.length()+1, path.length()); }
    public static final Path get(String path) {        if (path == null) {            return null;        }        final Map map;        final String pathPrefix = getPrefix(path);        //pathPrefix is something like "com.arsdigita.foo" or        //"com.arsdigita.bar" now.                // this lock is held for a relatively short period of time        synchronized (MAPS) {                                                if (MAPS.containsKey(pathPrefix) ) {                map = (Map) MAPS.get(pathPrefix);            } else {                map = new HashMap();                MAPS.put(pathPrefix, map);            }        }                // we're done with the lock on MAPS at this point                synchronized (map) {            if (map.containsKey(path)) {                return (Path) map.get(path);            } else {                Path parent;                String name;                                if (pathPrefix == null) {                    parent = null;                    name = path;                } else {                    parent = get(pathPrefix);                    name = path.substring(pathPrefix.length()+1, path.length());                }                Path result = new Path(parent, name);                map.put(path, result);                return result;            }        }    }