Community
Participate
Working Groups
When i run one of our Xtext tests i am getting following NPE java.lang.NullPointerException at org.eclipse.jdt.internal.core.search.matching.MatchLocator.createHandle(MatchLocator.java:511) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2526) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:3264) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:3276) at org.eclipse.jdt.internal.core.search.matching.MemberDeclarationVisitor.visit(MemberDeclarationVisitor.java:330) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1696) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.traverse(QualifiedAllocationExpression.java:693) at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.traverse(ReturnStatement.java:381) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:410) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2567) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:3264) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2843) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:2018) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1293) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1373) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1515) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:112) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:250) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:595) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:670) at org.eclipse.xtext.common.types.xtext.ui.JdtBasedConstructorScope.collectContents(JdtBasedConstructorScope.java:100) the type with type.getDeclaringType() == null is MapEntry (not open) [in HashBiMap$1$MapEntry.class [in com.google.common.collect [in /data/.p2/pool/plugins/com.google.guava_27.1.0.v20190517-1946.jar]]]
=> looks like org.eclipse.jdt.internal.core.BinaryType.getDeclaringType() does not like the HashBiMap$1$MapEntry.class class file name from Guava here is what the guava code does @Override Iterator<Entry<K, V>> entryIterator() { return new Itr<Entry<K, V>>() { @Override Entry<K, V> output(BiEntry<K, V> entry) { return new MapEntry(entry); } class MapEntry extends AbstractMapEntry<K, V> { so we have a name class inside a anonymous ones
(In reply to Christian Dietrich from comment #1) > => looks like > > org.eclipse.jdt.internal.core.BinaryType.getDeclaringType() > > does not like the > > HashBiMap$1$MapEntry.class Can you bisect this, or at least say, when in 4.16 did it start to fail for you?
as my maven build does not fail i have no idea. so it could be the problem is even there in 4.15
i checked. this happens back to oxygen so this seems more like a bug than a regression
So it is new Guava code that causing the Xtext test fail? Can you extract a standalone example?
Moved to https://github.com/eclipse-jdt/eclipse.jdt.core/issues/247