Skip to content

Commit fe9109f

Browse files
committed
devonfw#103: moved urlSecurityJson to its own class
1 parent 9a86e34 commit fe9109f

File tree

5 files changed

+292
-238
lines changed

5 files changed

+292
-238
lines changed

cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.util.stream.Collectors;
1010
import java.util.stream.Stream;
1111

12+
import com.devonfw.tools.ide.url.model.file.json.UrlSecurityWarning;
1213
import com.devonfw.tools.ide.cli.CliException;
1314
import com.devonfw.tools.ide.commandlet.Commandlet;
1415
import com.devonfw.tools.ide.common.Tags;
@@ -22,7 +23,6 @@
2223
import com.devonfw.tools.ide.process.ProcessErrorHandling;
2324
import com.devonfw.tools.ide.property.StringListProperty;
2425
import com.devonfw.tools.ide.url.model.file.UrlSecurityJsonFile;
25-
import com.devonfw.tools.ide.url.model.file.UrlSecurityJsonFile.UrlSecurityWarning;
2626
import com.devonfw.tools.ide.util.FilenameUtil;
2727
import com.devonfw.tools.ide.version.VersionIdentifier;
2828

@@ -188,7 +188,7 @@ protected VersionIdentifier securityRiskInteraction(VersionIdentifier configured
188188

189189
VersionIdentifier current = this.context.getUrls().getVersion(this.tool, this.getEdition(), configuredVersion);
190190

191-
if (!securityFile.contains(current, true, this.context)) {
191+
if (!securityFile.contains(current, true, this.context, securityFile.getParent())) {
192192
return configuredVersion;
193193
}
194194

@@ -198,14 +198,14 @@ protected VersionIdentifier securityRiskInteraction(VersionIdentifier configured
198198
int currentVersionIndex = allVersions.indexOf(current);
199199
VersionIdentifier nextSafe = null;
200200
for (int i = currentVersionIndex - 1; i >= 0; i--) {
201-
if (!securityFile.contains(allVersions.get(i), true, this.context)) {
201+
if (!securityFile.contains(allVersions.get(i), true, this.context, securityFile.getParent())) {
202202
nextSafe = allVersions.get(i);
203203
break;
204204
}
205205
}
206206
VersionIdentifier latestSafe = null;
207207
for (int i = 0; i < allVersions.size(); i++) {
208-
if (!securityFile.contains(allVersions.get(i), true, this.context)) {
208+
if (!securityFile.contains(allVersions.get(i), true, this.context, securityFile.getParent())) {
209209
latestSafe = allVersions.get(i);
210210
break;
211211
}

0 commit comments

Comments
 (0)