Community
Participate
Working Groups
I get this error systematically when trying to run JUnit 5 tests for a JDT + Buildship project. Lombok plugins is installed. eclipse.buildId=4.19.0.I20210303-1800 java.version=15.0.2 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product org.eclipse.jdt.junit Error Mon Apr 19 14:31:15 BRT 2021 Error java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.lookup.TypeBinding.needsUncheckedConversion(org.eclipse.jdt.internal.compiler.lookup.TypeBinding)" because "argumentType" is null at org.eclipse.jdt.internal.compiler.ast.ASTNode.checkInvocationArgument(ASTNode.java:362) at org.eclipse.jdt.internal.compiler.ast.ASTNode.checkInvocationArguments(ASTNode.java:448) at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:953) at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:390) at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:259) at org.eclipse.jdt.internal.compiler.ast.Block.resolve(Block.java:131) at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveType(LambdaExpression.java:458) at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolvePolyExpressionArguments(ASTNode.java:721) at org.eclipse.jdt.internal.compiler.ast.MessageSend.findMethodBinding(MessageSend.java:1024) at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:838) at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1113) at org.eclipse.jdt.internal.compiler.ast.Block.resolveUsing(Block.java:144) at org.eclipse.jdt.internal.compiler.ast.TryStatement.resolve(TryStatement.java:1209) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:661) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:362) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:570) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1493) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1618) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:662) at org.eclipse.jdt.internal.core.hierarchy.HierarchyResolver.resolve(HierarchyResolver.java:875) at org.eclipse.jdt.internal.core.hierarchy.RegionBasedHierarchyBuilder.createTypeHierarchyBasedOnRegion(RegionBasedHierarchyBuilder.java:86) at org.eclipse.jdt.internal.core.hierarchy.RegionBasedHierarchyBuilder.build(RegionBasedHierarchyBuilder.java:55) at org.eclipse.jdt.internal.core.hierarchy.RegionBasedTypeHierarchy.compute(RegionBasedTypeHierarchy.java:79) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh(TypeHierarchy.java:1319) at org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation(CreateTypeHierarchyOperation.java:94) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:740) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:806) at org.eclipse.jdt.core.JavaCore.newTypeHierarchy(JavaCore.java:5034) at org.eclipse.jdt.internal.junit.launcher.JUnit5TestFinder.findTestsInContainer(JUnit5TestFinder.java:217) at org.eclipse.jdt.internal.junit.util.TestSearchEngine.lambda$0(TestSearchEngine.java:42) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Created attachment 286171 [details] About > Installation Details > Configuration
Could you please attach a self contained reproducible test case?
I've got a similar problem while using `lombok.val` feature. Triggering an `open hierarchy` on any type in that file produced the error. Fortunately we are on java15 so we could replace all lombok's `val` with java's `var`.
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. If you have further information on the current state of the bug, please add it. 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.