Skip to content

Commit

Permalink
Merge pull request #204 from andresrc/JENKINS-38794-not-null
Browse files Browse the repository at this point in the history
[JENKINS-38974] Required version can be null
  • Loading branch information
andresrc committed Oct 14, 2016
2 parents 4fe2d2b + 2a97890 commit f21bd79
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 f21bd79

Please sign in to comment.