Lines 2073-2079
Link Here
|
2073 |
} |
2073 |
} |
2074 |
} |
2074 |
} |
2075 |
|
2075 |
|
2076 |
Iterator iterator = newElements.keySet().iterator(); |
2076 |
// Need to put any JarPackageFragmentRoot in first. |
|
|
2077 |
// This is due to the way the LRU cache flushes entries. |
2078 |
// When a JarPackageFragment is flused from the LRU cache, the entire |
2079 |
// jar is flushed by removing the JarPackageFragmentRoot and all of its |
2080 |
// children (see ElementCache.close()). If we flush the JarPackageFragment |
2081 |
// when its JarPackageFragmentRoot is not in the cache and the root is about to be |
2082 |
// added (during the 'while' loop), we will end up in an inconsist state. |
2083 |
// Subsequent resolution against package in the jar would fail as a result. |
2084 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102422 |
2085 |
// (theodora) |
2086 |
for(Iterator it = newElements.entrySet().iterator(); it.hasNext(); ){ |
2087 |
Map.Entry entry = (Map.Entry)it.next(); |
2088 |
IJavaElement element = (IJavaElement)entry.getKey(); |
2089 |
if( element instanceof JarPackageFragmentRoot ){ |
2090 |
Object info = entry.getValue(); |
2091 |
it.remove(); |
2092 |
this.cache.putInfo(element, info); |
2093 |
} |
2094 |
} |
2095 |
|
2096 |
Iterator iterator = newElements.keySet().iterator(); |
2077 |
while (iterator.hasNext()) { |
2097 |
while (iterator.hasNext()) { |
2078 |
IJavaElement element = (IJavaElement)iterator.next(); |
2098 |
IJavaElement element = (IJavaElement)iterator.next(); |
2079 |
Object info = newElements.get(element); |
2099 |
Object info = newElements.get(element); |