Community
Participate
Working Groups
Just saw 6 errors in the log today with 4.20.0.I20210502-1800. I don't even used SDK to write, I only browsed some code. Seem to be regression from bug 520976. java.lang.NullPointerException at org.eclipse.jdt.internal.ui.javaeditor.JavaElementHyperlinkDetector.findEnumConstructorTarget(JavaElementHyperlinkDetector.java:305) at org.eclipse.jdt.internal.ui.javaeditor.JavaElementHyperlinkDetector.detectHyperlinks(JavaElementHyperlinkDetector.java:115) at org.eclipse.ui.texteditor.HyperlinkDetectorRegistry$HyperlinkDetectorDelegate.detectHyperlinks(HyperlinkDetectorRegistry.java:81) at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:289) at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:262) at org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseMove(HyperlinkManager.java:457) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:216) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5879) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1427) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5121) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4599)
@Kenneth, Jeff: could you please check?
I cannot reproduce, but at that line there's a missing NP check on "... node.getParent() ..." I'll add a fix for this, if Jeff doesn't have any other conclusion!
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/180138
(In reply to Kenneth Styrberg from comment #2) > I cannot reproduce, but at that line there's a missing NP check on > > "... node.getParent() ..." > > I'll add a fix for this, if Jeff doesn't have any other conclusion! No, your fix certainly seems the only possibility.
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/180138 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=7d2151f9fb0f94dc270a2f7569139d047fa6ab86
Hi Andrey, can you try the next I-build with Kenneth's fix and verify that it solves the problem?
(In reply to Jeff Johnston from comment #6) > Hi Andrey, can you try the next I-build with Kenneth's fix and verify that > it solves the problem? Sure, however I have no idea how to reproduce.
(In reply to Andrey Loskutov from comment #7) > (In reply to Jeff Johnston from comment #6) > > Hi Andrey, can you try the next I-build with Kenneth's fix and verify that > > it solves the problem? > > Sure, however I have no idea how to reproduce. Basically, just verifying you are no longer seeing anything in the error log with respect to the JavaElementHyperlinkDetector in your normal usage would be fine.
Let assume it's fixed now, nothing seen in the log so far. I usually do not hesitate to reopen bugs if I see the regression again :-) Thanks for the fast fix.