SteamWar/BauSystem2.0
Archiviert
12
0

Fix NPE
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-08-28 09:43:11 +02:00
Ursprung f5b68687b5
Commit f1aab8d3f7

Datei anzeigen

@ -76,7 +76,6 @@ public class LinkageProcessor extends AbstractProcessor {
if (linkeds.length > 1) { if (linkeds.length > 1) {
neededFields.put(typeElement.getQualifiedName().toString(), typeElement); neededFields.put(typeElement.getQualifiedName().toString(), typeElement);
continue;
} }
List<VariableElement> variableElements = typeElement.getEnclosedElements().stream().filter(e -> e.getKind() == ElementKind.FIELD).map(VariableElement.class::cast).filter(e -> { List<VariableElement> variableElements = typeElement.getEnclosedElements().stream().filter(e -> e.getKind() == ElementKind.FIELD).map(VariableElement.class::cast).filter(e -> {
@ -103,7 +102,8 @@ public class LinkageProcessor extends AbstractProcessor {
TypeElement fieldType = (TypeElement) ((DeclaredType) variableElement.asType()).asElement(); TypeElement fieldType = (TypeElement) ((DeclaredType) variableElement.asType()).asElement();
neededFields.put(fieldType.getQualifiedName().toString(), fieldType); neededFields.put(fieldType.getQualifiedName().toString(), fieldType);
staticLines.add(getElement(typeElement, neededFields) + "." + variableElement.getSimpleName().toString() + " = " + getElement((TypeElement) ((DeclaredType) variableElement.asType()).asElement(), neededFields).toString()); System.out.println(getElement(typeElement, neededFields) + "." + variableElement.getSimpleName().toString() + " = " + getElement((TypeElement) ((DeclaredType) variableElement.asType()).asElement(), neededFields));
staticLines.add(getElement(typeElement, neededFields) + "." + variableElement.getSimpleName().toString() + " = " + getElement((TypeElement) ((DeclaredType) variableElement.asType()).asElement(), neededFields));
} }
} }
neededFields.forEach((s, typeElement) -> { neededFields.forEach((s, typeElement) -> {