Skip to content

Commit

Permalink
[JENKINS-38974] Required version can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Rodriguez committed Oct 14, 2016
1 parent 4fe2d2b commit 2a97890
Showing 1 changed file with 7 additions and 5 deletions.
Expand Up @@ -231,11 +231,13 @@ public boolean installPlugins(final String... specs) throws UnableToResolveDepen
visit("available");
check(find(by.xpath("//input[starts-with(@name,'plugin.%s.')]", n)));
VersionNumber availableVersion = getAvailableVersionForPlugin(n);
VersionNumber requiredVersion = new VersionNumber(candidates.get(n));
if (availableVersion.isOlderThan(requiredVersion)) {
throw new AssumptionViolatedException(
String.format("Version '%s' of '%s' is required, but available version is '%s'",
requiredVersion, n, availableVersion));
if (candidates.get(n) != null) {
VersionNumber requiredVersion = new VersionNumber(candidates.get(n));
if (availableVersion.isOlderThan(requiredVersion)) {
throw new AssumptionViolatedException(
String.format("Version '%s' of '%s' is required, but available version is '%s'",
requiredVersion, n, availableVersion));
}
}

clickButton("Install");
Expand Down

0 comments on commit 2a97890

Please sign in to comment.