Community
Participate
Working Groups
Build 20020425 When I set up a new workbench for running Eclipse I got the Null Pointer Exception below STEPS 1) Load org.eclipse.ui from the repository 2) Import all of the other plugins in Eclipse using the PDE plugin import wizard. I had auto build on and at one point during the build I got the following exception (see attached log)
Created attachment 719 [details] log file
Could on reproduce on Sun's VM 1.3.1. Tod was using IBM's 1.3.1 which we have seen produce a few NPE that are very suspect. As for a NPE in SimpleLookupTable.rehash()... this code is unchanged in 2 months: private void rehash() { SimpleLookupTable newLookupTable = new SimpleLookupTable(elementSize); Object currentKey; for (int i = keyTable.length; --i >= 0;) if ((currentKey = keyTable[i]) != null) newLookupTable.put(currentKey, valueTable[i]); this.keyTable = newLookupTable.keyTable; this.valueTable = newLookupTable.valueTable; this.elementSize = newLookupTable.elementSize; this.threshold = newLookupTable.threshold; } And was called from: public Object put(Object key, Object value) { int length = keyTable.length; int index = (key.hashCode() & 0x7FFFFFFF) % length; Object currentKey; while ((currentKey = keyTable[index]) != null) { if (currentKey.equals(key)) return valueTable[index] = value; if (++index == length) index = 0; } keyTable[index] = key; valueTable[index] = value; // assumes the threshold is never equal to the size of the table if (++elementSize > threshold) rehash(); return value; } Cannot see how a NPE is possible.