only:require name
This commit is contained in:
parent
30272b6fb7
commit
fcac4fed79
|
@ -52,7 +52,7 @@ public class ArrayIniField extends IniField {
|
|||
for (int rowIndex = 0; rowIndex < rows; rowIndex++) {
|
||||
sb.append("\n ");
|
||||
for (int colIndex = 0; colIndex < cols; colIndex++) {
|
||||
Field f = new Field("", getOffset(rowIndex, colIndex), getType());
|
||||
Field f = new Field(getName() + "_" + colIndex, getOffset(rowIndex, colIndex), getType());
|
||||
sb.append(' ');
|
||||
sb.append(f.getAnyValue(image, multiplier));
|
||||
}
|
||||
|
|
|
@ -49,7 +49,9 @@ public class Field {
|
|||
}
|
||||
|
||||
public Field(String name, int offset, int stringSize, FieldType type, int bitOffset, String... options) {
|
||||
this.name = name;
|
||||
this.name = Objects.requireNonNull(name);
|
||||
if (name.trim().isEmpty())
|
||||
throw new IllegalStateException("Empty field name");
|
||||
this.offset = offset;
|
||||
this.stringSize = stringSize;
|
||||
this.type = type;
|
||||
|
|
Loading…
Reference in New Issue