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

Cannot invoke "io.jenkins.tools.pluginmodernizer.core.model.JDK.supported(String)" because "j" is null #206

Closed
gounthar opened this issue Aug 20, 2024 · 0 comments · Fixed by #209
Assignees
Labels
bug For changelog: Minor bug. Will be listed after features

Comments

@gounthar
Copy link
Collaborator

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

GitPod

Reproduction steps

java -jar plugin-modernizer-cli/target/jenkins-plugin-modernizer-999999-SNAPSHOT.jar --plugin-file plugins.txt --recipes AddPluginsBom,AddCodeOwner with the current plugin being alauda-kubernetes-support.

Expected Results

No error.

Actual Results

Cannot invoke "io.jenkins.tools.pluginmodernizer.core.model.JDK.supported(String)" because "j" is null
	at io.jenkins.tools.pluginmodernizer.core.impl.PluginModernizer.lambda$verifyPlugin$1(PluginModernizer.java:230)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178)
	at java.base/java.util.stream.Stream$1.tryAdvance(Stream.java:1469)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
	at io.jenkins.tools.pluginmodernizer.core.impl.PluginModernizer.verifyPlugin(PluginModernizer.java:246)
	at io.jenkins.tools.pluginmodernizer.core.impl.PluginModernizer.process(PluginModernizer.java:138)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at io.jenkins.tools.pluginmodernizer.core.impl.PluginModernizer.start(PluginModernizer.java:68)
	at io.jenkins.tools.pluginmodernizer.cli.Main.run(Main.java:194)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2030)
	at picocli.CommandLine.executeHelpRequest(CommandLine.java:2016)
	at picocli.CommandLine.executeHelpRequest(CommandLine.java:1987)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2272)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
	at picocli.CommandLine.execute(CommandLine.java:2174)
	at io.jenkins.tools.pluginmodernizer.cli.Main.main(Main.java:44)

Anything else?

No response

Are you interested in contributing a fix?

No response

@gounthar gounthar added the bug For changelog: Minor bug. Will be listed after features label Aug 20, 2024
@jonesbusy jonesbusy self-assigned this Aug 21, 2024
jonesbusy added a commit that referenced this issue Aug 21, 2024
Fix #206 possible nullpointer when verifying plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants