Skip to content

Commit 3b0758e

Browse files
author
jantje
committed
The build failed on the same issue #1546
I tested with the workaround still available. I modifies the code to be more readable and tested without the workaround this time :-(
1 parent daf347c commit 3b0758e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

io.sloeber.core/src/io/sloeber/core/api/BoardDescription.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -1005,13 +1005,14 @@ private static Map<String, String> getEnvVarsHookBuild(Map<String, String> vars,
10051005
}
10061006
for (int numDigits = 1; numDigits <= 2; numDigits++) {
10071007
String formatter = "%0" + Integer.toString(numDigits) + "d"; //$NON-NLS-1$ //$NON-NLS-2$
1008-
int counter = 1;
1009-
String hookVarName = hookName.replace(searchString, String.format(formatter, Integer.valueOf(counter)));
1010-
for (int curIndex = 1; curIndex < 10; curIndex++)
1008+
int max = 10;
1009+
for (int counter = 1; counter < max; counter++) {
1010+
String hookVarName = hookName.replace(searchString, String.format(formatter, Integer.valueOf(counter)));
10111011
if (null != vars.get(hookVarName)) { // $NON-NLS-1$
10121012
envVarString = envVarString + preSeparator + hookVarName + postSeparator;
1013-
hookVarName = hookName.replace(searchString, String.format(formatter, Integer.valueOf(++counter)));
10141013
}
1014+
}
1015+
max = 100;
10151016
}
10161017
if (!envVarString.isEmpty()) {
10171018
extraVars.put(varName, envVarString);

0 commit comments

Comments
 (0)