Closed mcdonnell-john closed 6 years ago
Thanks for the review @sdedic I'll take a look at these over the next few days.
Some very valid points raised that in my naivety I missed...
I only copied the code from the file HyperlinkProviderImpl, is this correct? When I open a project and open the pom file of this project, I got a StackOverflowException:
java.lang.StackOverflowError
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.resetSequenceToDependencyTagToken(HyperlinkProviderImpl.java:466)
Did I miss to copy over code?
I know that there is a better way of testing the PR, but I thought only the code inside the HyperlinkProviderImpl.java is enough.
Can you send a snippet of the pom file? Specifically the dependency you tried to click. - I can verify if i missed something & add it to the tests, etc...
Thanks
Apologies - I didn't clone your PR changes into a repository to view it in context, just reviewed a diff; I'll do better (hopefully today).
The SOE is because of unconditional recursive call at line 466. BTW I don't undertand the point of recursively calling the method - the while itself should be enough to iterate back through tokens. Maybe some leftover ? But the while must check for either token == null or movePrevious() outcome to break the cycle at the start of token sequence and avoid NPE.
The SOE happens not inside dependencies, it happens here:
<groupId>net.smth.here</groupId>
<artifactId>my-abc-service</artifactId>
<version>1.8.1</version>
<packaging>jar</packaging>
<parent>
<groupId>net.smth</groupId>
<artifactId>my-minimal-base</artifactId>
<version>1.4</version>
</parent>
But only when I hold ctrl (no clicking only hovering the tokens inside the tags).
But on other dependencies, there is no jump to functionality.
@Chris2011 you can use instructions here: https://help.github.com/articles/checking-out-pull-requests-locally/ to make a local checkout of the change and see it unobscured and in context.
That explains it :( I never caught that scenario :( Okay my bad I'll work on this during the week.
Thanks for spotting this @Chris2011
@sdedic - Yeah I noticed I was making that recursive by mistake last night, I alreadyremoved that line, just haven't committed it as I was hoping to go through the other comments
@Chris2011 you can use instructions here: https://help.github.com/articles/checking-out-pull-requests-locally/ to make a local checkout of the change and see it unobscured and in context.
Thx @sdedic will do so :)
@Chris2011 when you get a chance can you see if the SOE still happens with your pom file, please?
@mcdonnell-john thx, will test it again :)
@mcdonnell-john I pulled your branch to a new feature branch of the incubator repo and unfortunately, I can't build anymore. I got this error:
Override ignored for property "module.name"
Created dir: C:\Projekte\incubator-netbeans\maven\build\classes\META-INF
C:\Projekte\incubator-netbeans\nbbuild\templates\projectized.xml:495:
java.io.FileNotFoundException: C:\Projekte\incubator-netbeans\spellchecker.dictionary_en\external\wordlist-en_GB-large-2017.08.24.zip (Das System kann die angegebene Datei nicht finden)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.netbeans.nbbuild.extlibs.CreateLicenseSummary.findCrc2LicenseHeaderMapping(CreateLicenseSummary.java:383)
at org.netbeans.nbbuild.extlibs.CreateLicenseSummary.evaluateBinaries(CreateLicenseSummary.java:286)
at org.netbeans.nbbuild.extlibs.CreateLicenseSummary.execute(CreateLicenseSummary.java:160)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 4 seconds)
I think it has nothing todo, with your impl, hopefully, but I don't know what the problem is. I can add the missing archive, if I find it.
Ok, nevermind, I downloaded the packages. So the SOE doesn't come up anymore, but the navigation doesn't work. I can't see any hyperlinks, when I hold ctrl.
What type/sort of GAV are you trying to click?
For normal dependencies like:
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.0.0-M4</version>
<scope>test</scope>
</dependency>
It works for me, i.e. I can click the groupId, artifactId and version values (note if the version is a property, this still goes to the declaration of that property.)
Are you looking for this to be enabled on other types? as I stopped short for the first version of this at just this, as other considerations come to mind when you start to work with parent GAV coordinates and plugin GAV coordinates.
But I could include it...
@mcdonnell-john Ok, it is working very well. The problem was that my project was unloadable, due to problems with dependencies. Now when I jumpt to a parent pom and try to jump from this pom to another, I got a NPE:
java.lang.NullPointerException
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.calculateInfo(HyperlinkProviderImpl.java:389)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.access$200(HyperlinkProviderImpl.java:254)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomParserRunnable.run(HyperlinkProviderImpl.java:249)
at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1402)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl.isHyperlinkPoint(HyperlinkProviderImpl.java:83)
at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.findProvider(HyperlinkOperation.java:266)
at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.performHyperlinking(HyperlinkOperation.java:224)
at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.keyPressed(HyperlinkOperation.java:382)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:250)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.Component.processKeyEvent(Component.java:6491)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2832)
at java.awt.Component.processEvent(Component.java:6310)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
at java.awt.DefaultKeyboardFocusManager.pumpApprovedKeyEvents(DefaultKeyboardFocusManager.java:892)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:991)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:610)
at java.awt.Component.dispatchEventImpl(Component.java:4760)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
It happens, when I hold ctrl and hover over this part:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
...
This is inside the C:\Users\Chrl\.m2\repository\org\springframework\boot\spring-boot-starter-web\1.5.4.RELEASE\spring-boot-starter-web-1.5.4.RELEASE.pom
Cool,
I'll take a look at this hopefully this evening, if not at the weekend.
Thanks for taking the time to look at this Chris!
Sorry @Chris2011 it was one of those weeks :( and I never got around to looking at this...
Looking at it now, the NPE is happening as that parent pom isn't part of a project, so we cant work out the version of those spring dependencies. I've put in a catch for that now, so this wont throws an NPE, but I'd like to look at, how and if IntelliJ handles these, to see if I can do something around this...
Thx @mcdonnell-john and no worries. It is as it is :). I'm/we're waiting for it as long as it takes. So as I see it right, you added the NPE check, right? If yes, will check it again.
@Chris2011 Yes, I made sure that the NPE wouldn't get thrown again in this scenario.
@mcdonnell-john great. Will test it.
Unfortunately, it is not fixed. I got the NPE when I jump to this file: .m2\repository\org\springframework\boot\spring-boot-dependencies\1.5.4.RELEASE\spring-boot-dependencies-1.5.4.RELEASE.pom
And first I got the NPE when I try to ctrl + hover on line 1067 for activemq:
java.lang.NullPointerException
at org.netbeans.modules.maven.api.PluginPropertyUtils.createEvaluator(PluginPropertyUtils.java:509)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.calculateInfo(HyperlinkProviderImpl.java:369)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomHyperlinkInfo.access$200(HyperlinkProviderImpl.java:254)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl$PomParserRunnable.run(HyperlinkProviderImpl.java:249)
at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1402)
at org.netbeans.modules.maven.hyperlinks.HyperlinkProviderImpl.isHyperlinkPoint(HyperlinkProviderImpl.java:83)
at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.findProvider(HyperlinkOperation.java:266)
at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.performHyperlinking(HyperlinkOperation.java:224)
at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.keyPressed(HyperlinkOperation.java:382)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:250)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.Component.processKeyEvent(Component.java:6491)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2832)
at java.awt.Component.processEvent(Component.java:6310)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
at java.awt.Component.dispatchEventImpl(Component.java:4760)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
and when I try to jump to another parent pom like on line 229 or 240, nothing happens. But my knowledge is not that good to know whether this must be possible or not.
Is this helpfull or do you need more info? I have spring-boot framework. This is one little part of my pom file:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
@Chris2011 We have different Spring versions :) I'll take a look with your one later on this evening. From an initial look its related to the version having a property, and this being a parent pom.
I'm of the belief that the moment that pom files, which are not in a NetBeans project (i.e. I've basically opened the pom file directly from your .m2 folder - so Spring boots parent pom etc...) you shouldn't be able to click through them. I've looked on intellij and it's the same, they will navigate from your project into a pom file, but it doesn't navigate further from there.
I'll take a look at this defect and see where its thrown, then see if there's other locations that could throw an NPE, and resolve them. Thanks for the help on this @Chris2011
Your welcome, thx for your work :)
Fixed that NPE and reviewed the Spring POM @Chris2011 was using. No exceptions are thrown here.
Note, in a pom loaded via this, i.e. one opened from a ~/.m2 folder, then dependencies in that will open only if they also exist in your .m2 folder, if they don't they cant open. they also won't open if the version cannot be worked out - which since these poms are not part of a NetBeans project we cant determine the version value unless its explicitly stated, using properties doesnt count.
@mcdonnell-john so I tested it and it seems to work now. I don't know whether there are some other corner cases but it is working as expected :).
Let's leave this open, if someone wants to come review it great! but if not after a week or so I will merge it in.
No review for a week, pls. merge.
Was still part of the release of NetBeans 9.0? It is not clear, which PR is part of which release. I use NB 9.0 and it doesn't seem to work. That's why I think it is not part of 9.0. @mcdonnell-john
Introduced tests to help ensure I didn't break existing functionality, as I noticed that there was some code duplication in the existing implementation but more importantly, I couldn't see an approach to introduce this logic for introducing hyperlinks on dependencies within the existing class as it was.