Fix nonexistent field messages
Dieser Commit ist enthalten in:
Ursprung
bfb0683b1f
Commit
391970b185
@ -48,4 +48,10 @@ public class FieldAccessException extends RuntimeException {
|
||||
public static FieldAccessException fromFormat(String message, Object... params) {
|
||||
return new FieldAccessException(String.format(message, params));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String message = getMessage();
|
||||
return "FieldAccessException" + (message != null ? ": " + message : "");
|
||||
}
|
||||
}
|
||||
|
@ -194,8 +194,8 @@ public class StructureModifier<TField> {
|
||||
throw new FieldAccessException(String.format("Field index (%s) cannot be negative.", fieldIndex));
|
||||
|
||||
if (data.size() == 0)
|
||||
throw new FieldAccessException(String.format("No field with type %s exists in class %s.", targetType.getName(),
|
||||
target.getClass().getName()));
|
||||
throw new FieldAccessException(String.format("No field with type %s exists in class %s.", fieldType.getName(),
|
||||
target.getClass().getSimpleName()));
|
||||
|
||||
if (fieldIndex >= data.size())
|
||||
throw new FieldAccessException(String.format("Field index out of bounds. (Index: %s, Size: %s)", fieldIndex, data.size()));
|
||||
@ -295,8 +295,8 @@ public class StructureModifier<TField> {
|
||||
throw new FieldAccessException(String.format("Field index (%s) cannot be negative.", fieldIndex));
|
||||
|
||||
if (data.size() == 0)
|
||||
throw new FieldAccessException(String.format("No field with type %s exists in class %s.", targetType.getName(),
|
||||
target.getClass().getName()));
|
||||
throw new FieldAccessException(String.format("No field with type %s exists in class %s.", fieldType.getName(),
|
||||
target.getClass().getSimpleName()));
|
||||
|
||||
if (fieldIndex >= data.size())
|
||||
throw new FieldAccessException(String.format("Field index out of bounds. (Index: %s, Size: %s)", fieldIndex, data.size()));
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren