Skip to content

Commit

Permalink
devonfw#1317: fixed NullPointer
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzLanger committed Sep 5, 2023
1 parent 133aa9c commit c3a1c8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected boolean doAddVersion(UrlVersion urlVersion, String downloadUrl, Operat
protected boolean doAddVersion(UrlVersion urlVersion, String url, OperatingSystem os, SystemArchitecture architecture,
String checksum) {

if(urlVersion.getStatus().getStatusJson().isManual()){
if(urlVersion.getStatus()!= null && urlVersion.getStatus().getStatusJson().isManual()){
return true;
}
String version = urlVersion.getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public void testUrlUpdaterMissingOsGetsAddedAutomatically(@TempDir Path tempDir)
updater.update(urlRepository);

Path versionsPath = tempDir.resolve("mocked").resolve("mocked").resolve("1.0");
StatusJson statusJson = getStatusJson(versionsPath);
statusJson.setManual(true);

// then
assertThat(versionsPath.resolve("status.json")).exists();
assertThat(versionsPath.resolve("linux_x64.urls")).exists();
Expand Down

0 comments on commit c3a1c8f

Please sign in to comment.