| Summary: | NPE in MethodBinding.filterTypeAnnotations: AnnotationHolder.annotation contains null element | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Andreas Sewe <sewe> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 4.6 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 10 | ||
| Whiteboard: | stalebug | ||
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Hi, we got the following error through the Automated Error Reporting for a third-party plug-in that internally uses JDT: java.lang.NullPointerException: null at org.eclipse.jdt.core.dom.MethodBinding.filterTypeAnnotations(MethodBinding.java:213) at org.eclipse.jdt.core.dom.MethodBinding.getAnnotations(MethodBinding.java:107) at com.codetrails.internal.codesearch.indexing.extractor.MethodDeclarationAnnotationExtractor.a(MethodDeclarationAnnotationExtractor.java:38) at com.codetrails.internal.codesearch.indexing.extractor.MethodDeclarationAnnotationExtractor.extract(MethodDeclarationAnnotationExtractor.java:28) at com.codetrails.codesearch.CodesearchService.a(CodesearchService.java:481) ... The org.eclipse.jdt.core in question was 3.12.2.v20161117-1814. From looking at the code, it seems clear to me that JDT somehow manages to not fulfill MethodBinding.filterTypeAnnotations's assumptions about the internalAnnotations array, namely that a non-empty array contains only non-null elements. As the actual location where the AnnotationHolder's annotation elements are set, are far removed from the third-party plug-in's call to MethodBinding.getAnnotations, I can't give you more details, unfortunately.