-
Bug
-
Resolution: Fixed
-
Major
-
None
-
1.1
A test @kohsuke wrote using @WithPlugins fails with
java.lang.NullPointerException at org.jenkinsci.test.acceptance.po.PluginManager.isInstalled(PluginManager.java:78) at org.jenkinsci.test.acceptance.po.PluginManager.installPlugin(PluginManager.java:107) at org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1.installPlugins(WithPlugins.java:64) at org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1.evaluate(WithPlugins.java:57) at org.jenkinsci.test.acceptance.junit.JenkinsAcceptanceTestRule$1.evaluate(JenkinsAcceptanceTestRule.java:50) at ...
The line of code in question:
String version = getVersionFromWpValue(n) != null ? getVersionFromWpValue(n) : ucmd.get().plugins.get(n).version;
I am not sure which of ucmd, get(), plugins, or get(...) is null, but if there is something wrong in the environment or test setup, a proper AssertionError should be thrown.
@itgkarl: Can you please have a look if the error handling could be improved?