Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes a NPE in TestOutputListenerProvider (maven output handler). #5645

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

mbien
Copy link
Member

@mbien mbien commented Mar 9, 2023

java.lang.NullPointerException: Cannot invoke "org.netbeans.modules.maven.api.output.OutputVisitor$Context.getCurrentProject()" because the return value of "org.netbeans.modules.maven.api.output.OutputVisitor.getContext()" is null
	at org.netbeans.modules.maven.output.TestOutputListenerProvider.processLine(TestOutputListenerProvider.java:127)
	at org.netbeans.modules.maven.execute.AbstractOutputHandler.processLine(AbstractOutputHandler.java:293)
	at org.netbeans.modules.maven.execute.CommandLineOutputHandler$Output.run(CommandLineOutputHandler.java:338)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)

This can be reproduced when building something while having the -T 1 flag set. Which is a no-op for maven but makes NB think that the build is multithreaded and puts it into a fallback mode without the maven event spy active beside other things.

Cannot invoke
"org.netbeans.modules.maven.api.output.OutputVisitor
 $Context.getCurrentProject()"
because the return value of
"org.netbeans.modules.maven.api.output.OutputVisitor.getContext()"
is null.
@mbien mbien added the Maven [ci] enable "build tools" tests label Mar 9, 2023
@mbien mbien added this to the NB18 milestone Mar 9, 2023
Copy link
Contributor

@lkishalmi lkishalmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@mbien mbien merged commit f63e03f into apache:master Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maven [ci] enable "build tools" tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants