From efb414b40cd042ba43114dbc1105b31dc25f9960 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Mon, 5 Aug 2024 17:58:59 +0300 Subject: [PATCH] fix: added coderabbit suggestions --- .../espressif/idf/core/variable/JtagVariableResolver.java | 5 ++--- .../espressif/idf/core/variable/OpenocdVariableResolver.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bundles/com.espressif.idf.core/src/com/espressif/idf/core/variable/JtagVariableResolver.java b/bundles/com.espressif.idf.core/src/com/espressif/idf/core/variable/JtagVariableResolver.java index 726b7ee50..e6fd907ce 100644 --- a/bundles/com.espressif.idf.core/src/com/espressif/idf/core/variable/JtagVariableResolver.java +++ b/bundles/com.espressif.idf.core/src/com/espressif/idf/core/variable/JtagVariableResolver.java @@ -74,10 +74,9 @@ private String generatePartOfConfigOptionsForBoard() new DefaultBoardProvider().getDefaultBoard(targetName)); var boardConfigs = boardConfigMap.get(board); var result = new StringBuilder(); - var iterator = boardConfigs.iterator(); - while (iterator.hasNext()) + for (Object config : boardConfigs) { - result.append(String.format("-f %s ", iterator.next()));//$NON-NLS-1$ + result.append(String.format("-f %s ", config)); //$NON-NLS-1$ } return result.toString(); } diff --git a/bundles/com.espressif.idf.core/src/com/espressif/idf/core/variable/OpenocdVariableResolver.java b/bundles/com.espressif.idf.core/src/com/espressif/idf/core/variable/OpenocdVariableResolver.java index 4e0ae233e..4dcc45445 100644 --- a/bundles/com.espressif.idf.core/src/com/espressif/idf/core/variable/OpenocdVariableResolver.java +++ b/bundles/com.espressif.idf.core/src/com/espressif/idf/core/variable/OpenocdVariableResolver.java @@ -89,8 +89,8 @@ protected Path getOpenocdBinPath(ILaunchConfiguration configuration) protected Path getOpenocdExecutable(ILaunchConfiguration configuration) { - String exectuableName = EclipseUtils.getPreferenceValueForId(OPENOCD_PREFIX, EXECUTABLE_NAME, "", //$NON-NLS-1$ + String executableName = EclipseUtils.getPreferenceValueForId(OPENOCD_PREFIX, EXECUTABLE_NAME, "", //$NON-NLS-1$ EclipseUtils.getProjectByLaunchConfiguration(configuration)); - return Paths.get(exectuableName); + return Paths.get(executableName); } }