Community
Participate
Working Groups
Currently class MyJavaLinkedModeProposal (in CompletionAdaptor.CreateMethodMappingCompletionProposal) contains an unused callout binding computeEdits -> computeEdits. When searching for references to this (selecting the role method spec) the following NPE occurrs: java.lang.NullPointerException at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:165) at org.eclipse.jdt.internal.core.search.matching.MethodPattern.<init>(MethodPattern.java:172) at org.eclipse.jdt.core.search.SearchPattern.createPattern(SearchPattern.java:2078) at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:124) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:91) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Code inspection yields that the NPE cannot occur with a regular JavaElement (getElementInfo() can only return non-null or throw). Some overrides exist in package codeassist.impl that could potentially return null, but at this point it is totally unclear, how the search and the AssistXY could be related. I've added OTJavaMethodSearchTests.test325297() to witness the general working in the specified scenario (not able to reproduce the NPE).
candidate for WORKSFORME
closing as per previous comment, since it was never again observed.