[cleanup] erefactor/EclipseJdt - Convert 'for' loops to enhanced (#9110)

EclipseJdt cleanup 'ConvertForLoopToEnhanced' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
This commit is contained in:
cal
2021-03-29 06:13:26 +02:00
committed by GitHub
parent 8d372fa66a
commit 67d7f60f6a
2 changed files with 6 additions and 6 deletions

View File

@@ -313,8 +313,8 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
List<Map<String, Object>> replacements = new ArrayList<>();
Object[] replacementChars = specialCharReplacements.keySet().toArray();
for (int i = 0; i < replacementChars.length; i++) {
String c = (String) replacementChars[i];
for (Object replacementChar : replacementChars) {
String c = (String) replacementChar;
Map<String, Object> o = new HashMap<>();
o.put("char", c);
o.put("replacement", "'" + specialCharReplacements.get(c));

View File

@@ -428,16 +428,16 @@ public class LuaClientCodegen extends DefaultCodegen implements CodegenConfig {
String luaPath = "";
int pathParamIndex = 0;
for (int i = 0; i < items.length; ++i) {
if (items[i].matches("^\\{(.*)\\}$")) { // wrap in {}
for (String item : items) {
if (item.matches("^\\{(.*)\\}$")) { // wrap in {}
// find the datatype of the parameter
//final CodegenParameter cp = op.pathParams.get(pathParamIndex);
// TODO: Handle non-primitives…
//luaPath = luaPath + cp.dataType.toLowerCase(Locale.ROOT);
luaPath = luaPath + "/%s";
pathParamIndex++;
} else if (items[i].length() != 0) {
luaPath = luaPath + "/" + items[i];
} else if (item.length() != 0) {
luaPath = luaPath + "/" + item;
} else {
//luaPath = luaPath + "/";
}