Skip to content

Commit

Permalink
#175: fixed NPE for missing version (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-vcapgemini authored Jan 11, 2024
1 parent 0e84aff commit 6954a34
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ public UrlVersion getVersionFolder(String tool, String edition, VersionIdentifie

VersionIdentifier resolvedVersion = getVersion(tool, edition, version);
UrlVersion urlVersion = getEdition(tool, edition).getChild(resolvedVersion.toString());
Objects.requireNonNull(urlVersion);
if (urlVersion == null) {
throw new IllegalArgumentException(
"Version " + version + " for tool " + tool + " does not exist in edition " + edition + ".");
}
return urlVersion;
}

Expand Down

0 comments on commit 6954a34

Please sign in to comment.