mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 18:57:39 +07:00
Fixed some nullability issues
This commit is contained in:
parent
2a0af620be
commit
a6307039b0
@ -103,6 +103,7 @@ public class Blocks implements ContentList{
|
||||
alwaysReplace = true;
|
||||
hasShadow = false;
|
||||
useColor = false;
|
||||
wall = this;
|
||||
}
|
||||
|
||||
@Override public void drawBase(Tile tile){}
|
||||
|
@ -569,7 +569,9 @@ public class ContentParser{
|
||||
if(field.field.getType().isPrimitive()) return;
|
||||
|
||||
if(!field.field.isAnnotationPresent(Nullable.class) && field.field.get(object) == null && !implicitNullable.contains(field.field.getType())){
|
||||
throw new RuntimeException("'" + field.field.getName() + "' in " + object.getClass().getSimpleName() + " is missing!");
|
||||
throw new RuntimeException("'" + field.field.getName() + "' in " +
|
||||
((object.getClass().isAnonymousClass() ? object.getClass().getSuperclass() : object.getClass()).getSimpleName()) +
|
||||
" is missing! Object = " + object + ", field = (" + field.field.getName() + " = " + field.field.get(object) + ")");
|
||||
}
|
||||
}catch(Exception e){
|
||||
throw new RuntimeException(e);
|
||||
|
Loading…
Reference in New Issue
Block a user