forked from loafle/openapi-generator-original
[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:
@@ -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));
|
||||
|
||||
@@ -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 + "/";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user