Skip to content

Commit d7f60da

Browse files
committed
devonfw#759: file_path to filePath
Changed variable name from file_path to filePath
1 parent db2a4a7 commit d7f60da

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

cli/src/main/java/com/devonfw/tools/ide/commandlet/UpgradeSettingsCommandlet.java

+13-13
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,15 @@ private void updateDevonProperties() {
250250
devonPropertiesPath = devonPropertiesPath.getParent();
251251
}
252252

253-
for (Path file_path : pathList) {
254-
if (!Files.exists(file_path)) {
253+
for (Path filePath : pathList) {
254+
if (!Files.exists(filePath)) {
255255
continue;
256256
}
257-
Path target = file_path.getParent().resolve("ide.properties");
257+
Path target = filePath.getParent().resolve("ide.properties");
258258
Properties devonProperties = new Properties();
259259
devonProperties.put("IDE_VARIABLE_SYNTAX_LEGACY_SUPPORT_ENABLED", "false");
260260
try {
261-
List<String> readLines = Files.readAllLines(file_path);
261+
List<String> readLines = Files.readAllLines(filePath);
262262
String[] split;
263263
for (String line : readLines) {
264264
if (!line.contains("#") && !line.isEmpty()) {
@@ -283,7 +283,7 @@ private void updateDevonProperties() {
283283
throw new RuntimeException(e);
284284
}
285285

286-
if (context.getFileAccess().findFirst(file_path.getParent(), path -> path.getFileName().toString().equals("ide.properties"), false) != null) {
286+
if (context.getFileAccess().findFirst(filePath.getParent(), path -> path.getFileName().toString().equals("ide.properties"), false) != null) {
287287
try {
288288
List<String> readLines = Files.readAllLines(target);
289289
String[] split;
@@ -319,9 +319,9 @@ private void updateDevonProperties() {
319319
}
320320
}
321321

322-
this.context.success("Successfully merged and updated ide.properties: " + file_path);
322+
this.context.success("Successfully merged and updated ide.properties: " + filePath);
323323

324-
Files.delete(file_path);
324+
Files.delete(filePath);
325325

326326
} catch (IOException e) {
327327
throw new RuntimeException(e);
@@ -345,20 +345,20 @@ private void updateDevonProperties() {
345345
+ "\n"
346346
+ "# In case you are sitting behind a proxy these JVM options may help:\n"
347347
+ "#export JAVA_OPTS=-Dhttp.proxyHost=myproxy.com -Dhttp.proxyPort=8080\n";
348-
Files.write(file_path, comment.getBytes());
348+
Files.write(filePath, comment.getBytes());
349349
for (Entry<Object, Object> set : devonProperties.entrySet()) {
350350
if (set.getValue() instanceof String) {
351-
Files.write(file_path, ("\n" + set.getKey().toString() + "=" + set.getValue().toString()).getBytes(), StandardOpenOption.APPEND);
351+
Files.write(filePath, ("\n" + set.getKey().toString() + "=" + set.getValue().toString()).getBytes(), StandardOpenOption.APPEND);
352352
}
353353
if (set.getValue() instanceof String[]) {
354354
String[] values = (String[]) set.getValue();
355-
Files.write(file_path, ("\n" + values[0] + " " + set.getKey().toString() + "=" + values[1]).getBytes(), StandardOpenOption.APPEND);
355+
Files.write(filePath, ("\n" + values[0] + " " + set.getKey().toString() + "=" + values[1]).getBytes(), StandardOpenOption.APPEND);
356356
}
357357
}
358-
Files.move(file_path, target);
359-
this.context.success("Updated file name: " + file_path + "\n-> " + target + "and updated variables");
358+
Files.move(filePath, target);
359+
this.context.success("Updated file name: " + filePath + "\n-> " + target + "and updated variables");
360360
} catch (IOException e) {
361-
this.context.error("Error updating file name: " + file_path, e);
361+
this.context.error("Error updating file name: " + filePath, e);
362362
}
363363
}
364364
}

0 commit comments

Comments
 (0)