Skip to content

Commit 6954a34

Browse files
devonfw#175: fixed NPE for missing version (devonfw#176)
1 parent 0e84aff commit 6954a34

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cli/src/main/java/com/devonfw/tools/ide/url/model/UrlMetadata.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ public UrlVersion getVersionFolder(String tool, String edition, VersionIdentifie
115115

116116
VersionIdentifier resolvedVersion = getVersion(tool, edition, version);
117117
UrlVersion urlVersion = getEdition(tool, edition).getChild(resolvedVersion.toString());
118-
Objects.requireNonNull(urlVersion);
118+
if (urlVersion == null) {
119+
throw new IllegalArgumentException(
120+
"Version " + version + " for tool " + tool + " does not exist in edition " + edition + ".");
121+
}
119122
return urlVersion;
120123
}
121124

0 commit comments

Comments
 (0)