Community
Participate
Working Groups
1) Create a new project, enable annotation-based null analysis, and add guava 24.1-jre to the libraries (including the sources and setting "external annotations" to the project itself). 2) Create package-info.java @org.eclipse.jdt.annotation.NonNullByDefault package foo; 3) Create Foo.java (the compiler will correctly issue a warning about the line marked with /* ! */): package foo; import com.google.common.graph.ImmutableValueGraph; import com.google.common.graph.MutableValueGraph; import com.google.common.graph.ValueGraphBuilder; public class Foo { ImmutableValueGraph<Integer, Integer> h; { MutableValueGraph<Integer, Integer> g = ValueGraphBuilder.undirected().build(); h = ImmutableValueGraph.copyOf(g); /* ! */ } } 4) Open the source of ImmutableValueGraph.copyOf and try to add @NonNull to the first parameter of copyOf, which has type ValueGraph<N,V>. This fails with an exception: eclipse.buildId=4.8.0.I20180531-0700 java.version=10.0.1 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE Framework arguments: -product org.eclipse.epp.package.dsl.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.dsl.product org.eclipse.jdt.ui Error Tue Jun 12 11:11:22 CEST 2018 Error during computation of Annotate proposals: Could not resolve type ValueGraph<N,V> org.eclipse.jdt.internal.corext.fix.ExternalNullAnnotationChangeProposals$MissingBindingException: Could not resolve type ValueGraph<N,V> at org.eclipse.jdt.internal.corext.fix.ExternalNullAnnotationChangeProposals.resolveBinding(ExternalNullAnnotationChangeProposals.java:330) at org.eclipse.jdt.internal.corext.fix.ExternalNullAnnotationChangeProposals.collectExternalAnnotationProposals(ExternalNullAnnotationChangeProposals.java:450) at org.eclipse.jdt.internal.ui.text.correction.ExternalNullAnnotationQuickAssistProcessor.computeQuickAssistProposals(ExternalNullAnnotationQuickAssistProcessor.java:95) at org.eclipse.jface.text.quickassist.QuickAssistAssistant$ContentAssistProcessor.computeCompletionProposals(QuickAssistAssistant.java:68) at org.eclipse.jface.text.contentassist.ContentAssistant$3.lambda$0(ContentAssistant.java:2016) at java.base/java.util.Collections$SingletonSet.forEach(Collections.java:4777) at org.eclipse.jface.text.contentassist.ContentAssistant$3.run(ContentAssistant.java:2015) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:2012) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:561) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:490) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:71) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:483) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1829) at org.eclipse.jface.text.quickassist.QuickAssistAssistant.showPossibleQuickAssists(QuickAssistAssistant.java:109) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionAssistant.showPossibleQuickAssists(JavaCorrectionAssistant.java:198) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor$5.doOperation(ClassFileEditor.java:952) at org.eclipse.jdt.internal.ui.javaeditor.AnnotateClassFileAction.run(AnnotateClassFileAction.java:40) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:118) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:93) at jdk.internal.reflect.GeneratedMethodAccessor74.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:318) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:252) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:161) at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:204) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:305) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:579) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:648) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:438) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:381) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:93) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1190) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1051) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1076) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1103) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1099) at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1742) at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:5137) at org.eclipse.swt.widgets.Canvas.WM_KEYDOWN(Canvas.java:411) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4797) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:345) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4765) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2303) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3532) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1170) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1059) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:667) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:597) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592) at org.eclipse.equinox.launcher.Main.run(Main.java:1498) at org.eclipse.equinox.launcher.Main.main(Main.java:1471)
… one thing I forgot: Use compliance with Java 10 (it works fine with Java 8)
Or compliance with Java 11
Changed Version and OS back. We keep the original values as initially reported.
.
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.