refactoring: reducing magic constant
This commit is contained in:
parent
bd51e1ae64
commit
0aab6d10e0
|
@ -16,7 +16,7 @@ public class PinoutLogic {
|
|||
private static final String CONFIG_BOARDS = "config/boards/";
|
||||
private static final String CONNECTORS = "/connectors";
|
||||
private static final String QUOTED_NONE = quote("NONE");
|
||||
public static final String QUOTED_INVALID = quote("INVALID");
|
||||
public static final String QUOTED_INVALID = quote(VariableRegistry.INVALID);
|
||||
|
||||
private final File[] boardYamlFiles;
|
||||
private final String boardName;
|
||||
|
|
|
@ -21,6 +21,7 @@ import static com.devexperts.logging.Logging.getLogging;
|
|||
*/
|
||||
public class VariableRegistry {
|
||||
public static final String AUTO_ENUM_SUFFIX = "_auto_enum";
|
||||
public static final String INVALID = "INVALID";
|
||||
private static final Logging log = getLogging(VariableRegistry.class);
|
||||
|
||||
public static final String _16_HEX_SUFFIX = "_16_hex";
|
||||
|
@ -124,7 +125,7 @@ public class VariableRegistry {
|
|||
if (sb.length() > 0)
|
||||
sb.append(", ");
|
||||
|
||||
String value = valueNameById.getOrDefault(i, "INVALID");
|
||||
String value = valueNameById.getOrDefault(i, INVALID);
|
||||
sb.append("\"" + value + "\"");
|
||||
}
|
||||
return sb.toString();
|
||||
|
|
Loading…
Reference in New Issue