Summary: | [index] NullPointerException filtering for exception breakpoint | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Darin Swanson <Darin_Swanson> |
Component: | Core | Assignee: | Kent Johnson <kent_johnson> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | frederic_fusier, jerome_lanneluc, pawel.1.piech |
Version: | 3.3 | ||
Target Milestone: | 3.3 M6 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Darin Swanson
2007-03-03 00:18:19 EST
Looking at the stack trace, this NPE can only happen if EntryResult.getDocumentNames(...) returns an array with null values (in InternalSearchPattern.findIndexMatches(...) line 87. This may happen if DiskIndex.readDocumentName(...) returns a null value... Looking at the implementation, I do not understand how this would be possible!? I'll add some traces to get more information and have a chance to understand in which circumstances this can happen... Note that this possibility is taken into account in AndPattern findIndexMatches method as "if (names[i])" condition exists before accepting the match... Not sure if we can just add the same protecion in InternalSearchPattern without clearly understand how this can happen... Its possible that DiskIndex.readDocumentName(...) could answer null if reading the chunk of names failed with an IOException, but the half empty chunks were still cached. I suggest we null out the cachedChunks if a IOException is caught & rethrown. Fixed by Kent when he cleaned up stream reading... Released for 3.3 M6 in HEAD stream (v_741). . Verified for 3.3 M6 while moving this bug to Kent... *** Bug 178459 has been marked as a duplicate of this bug. *** |