fix NPE during IElementType.enumerate

This commit is contained in:
peter
2013-07-02 23:00:07 +02:00
parent a74f199dbb
commit c0450583bd
@@ -194,8 +194,8 @@ public class IElementType {
IElementType[] copy;
ourRegistryReadLock.lock();
try {
copy = new IElementType[ourCounter];
System.arraycopy(ourRegistry, 0, copy, 0, ourCounter);
copy = new IElementType[ourCounter - FIRST_TOKEN_INDEX];
System.arraycopy(ourRegistry, 0, copy, 0, ourCounter - FIRST_TOKEN_INDEX);
} finally {
ourRegistryReadLock.unlock();
}