Skip to content

Commit 4c2291a

Browse files
committed
Update RepositoryProperty.java
1 parent 94c7b73 commit 4c2291a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cli/src/main/java/com/devonfw/tools/ide/property/RepositoryProperty.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,12 @@ public Path getValueAsPath(IdeContext context) {
5050
Path repositoriesPath = context.getSettingsPath().resolve(context.FOLDER_REPOSITORIES);
5151
Path legacyRepositoriesPath = context.getSettingsPath().resolve(context.FOLDER_LEGACY_REPOSITORIES);
5252

53-
Path repositoryFile = Path.of(super.getValue());
54-
if (repositoryFile == null) return null;
53+
Path repositoryFile;
54+
if (super.getValue() != null) {
55+
repositoryFile = Path.of(super.getValue());
56+
} else {
57+
return null;
58+
}
5559

5660
if (!Files.exists(repositoryFile)) {
5761
repositoryFile = repositoriesPath.resolve(repositoryFile.getFileName().toString() + ".properties");

0 commit comments

Comments
 (0)