# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. Index: openide/loaders/src/org/openide/loaders/DataObjectPool.java --- openide/loaders/src/org/openide/loaders/DataObjectPool.java Base (1.46) +++ openide/loaders/src/org/openide/loaders/DataObjectPool.java Locally Modified (Based On 1.46) @@ -51,14 +51,9 @@ /** just for testing purposes */ static final void fastCache(boolean fast) { - if (fast) { - POOL.children = null; - } else { - POOL.children = new HashMap>(); + //do nothing - children map was unused - leaving this call + //for now for the unit test that depends on it } - } - /** map that assigns to each folder list of Items created for its children */ - private Map> children = new HashMap>(); /** covers all FileSystems we're listening on */ private Set knownFileSystems = new WeakSet(); @@ -559,15 +554,15 @@ if (itm != null) { // the file was someones' primary return Collections.singleton(itm); // so notify only owner } else { // unknown file or someone secondary - List arr = children.get(fo.getParent()); - if (arr != null) { - return new ArrayList(arr); - } else { +// List arr = children.get(fo.getParent()); +// if (arr != null) { +// return new ArrayList(arr); +// } else { return Collections.emptyList(); +// } } } } - } public void fileChanged(FileEvent fe) { if (LISTENER.isLoggable(Level.FINE)) { @@ -1224,43 +1219,16 @@ super(512); } - public Item put(FileObject obj, Item item) { - Item prev = super.put(obj, item); - if (children == null) { - return prev; - } - - FileObject parent = obj.getParent(); - if (parent == null) { - return prev; - } - List arr = children.get(parent); - if (arr == null) { - arr = new ArrayList(); - } - arr.add(item); - return prev; - } public Item remove(Object obj) { + //WTF is this? Item prev = super.remove(obj); if (! (obj instanceof FileObject)) { return prev; } - if (children == null) { - return prev; - } - FileObject parent = ((FileObject)obj).getParent(); if (parent == null) { return prev; } - List arr = children.get(parent); - if (arr != null) { - arr.remove(obj); - if (arr.isEmpty()) { - children.remove(parent); - } - } return prev; } } // end of DoubleHashMap