mirror of https://github.com/rusefi/rusefi.git
only:code style
This commit is contained in:
parent
417d81aa25
commit
54cb3f823f
|
@ -87,7 +87,7 @@ public class IniFileModel {
|
||||||
if (!dir.isDirectory())
|
if (!dir.isDirectory())
|
||||||
return null;
|
return null;
|
||||||
log.info("Searching for " + prefix + "*" + suffix + " in " + fileDirectory);
|
log.info("Searching for " + prefix + "*" + suffix + " in " + fileDirectory);
|
||||||
for (String file : dir.list()) {
|
for (String file : Objects.requireNonNull(dir.list())) {
|
||||||
if (file.contains(" "))
|
if (file.contains(" "))
|
||||||
continue; // spaces not acceptable
|
continue; // spaces not acceptable
|
||||||
if (file.startsWith(prefix) && file.endsWith(suffix))
|
if (file.startsWith(prefix) && file.endsWith(suffix))
|
||||||
|
@ -164,16 +164,22 @@ public class IniFileModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ("dialog".equals(first)) {
|
switch (first) {
|
||||||
handleDialog(list);
|
case "dialog":
|
||||||
} else if ("table".equals(first)) {
|
handleDialog(list);
|
||||||
handleTable(list);
|
break;
|
||||||
} else if ("xBins".equals(first)) {
|
case "table":
|
||||||
handleXBins(list);
|
handleTable(list);
|
||||||
} else if ("yBins".equals(first)) {
|
break;
|
||||||
handleYBins(list);
|
case "xBins":
|
||||||
} else if ("zBins".equals(first)) {
|
handleXBins(list);
|
||||||
handleZBins(list);
|
break;
|
||||||
|
case "yBins":
|
||||||
|
handleYBins(list);
|
||||||
|
break;
|
||||||
|
case "zBins":
|
||||||
|
handleZBins(list);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
throw new IllegalStateException("While [" + rawText + "]", e);
|
throw new IllegalStateException("While [" + rawText + "]", e);
|
||||||
|
@ -216,16 +222,21 @@ public class IniFileModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleFieldDefinition(LinkedList<String> list) {
|
private void handleFieldDefinition(LinkedList<String> list) {
|
||||||
if (list.get(1).equals(FIELD_TYPE_SCALAR)) {
|
switch (list.get(1)) {
|
||||||
registerField(ScalarIniField.parse(list));
|
case FIELD_TYPE_SCALAR:
|
||||||
} else if (list.get(1).equals(FIELD_TYPE_STRING)) {
|
registerField(ScalarIniField.parse(list));
|
||||||
registerField(StringIniField.parse(list));
|
break;
|
||||||
} else if (list.get(1).equals(FIELD_TYPE_ARRAY)) {
|
case FIELD_TYPE_STRING:
|
||||||
registerField(ArrayIniField.parse(list));
|
registerField(StringIniField.parse(list));
|
||||||
} else if (list.get(1).equals(FIELD_TYPE_BITS)) {
|
break;
|
||||||
registerField(EnumIniField.parse(list));
|
case FIELD_TYPE_ARRAY:
|
||||||
} else {
|
registerField(ArrayIniField.parse(list));
|
||||||
throw new IllegalStateException("Unexpected " + list);
|
break;
|
||||||
|
case FIELD_TYPE_BITS:
|
||||||
|
registerField(EnumIniField.parse(list));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalStateException("Unexpected " + list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue