Skip to content

Commit 2ace66d

Browse files
authored
Fix null pointers for non-existing types (#90)
* fix null pointers for non existing types * Update VisitorWriter.java
1 parent 8090f12 commit 2ace66d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

prism-core/src/main/java/io/avaje/prism/internal/VisitorWriter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ public static void write(PrintWriter out, String packageName) {
289289
+ " @Override\n"
290290
+ " public StringBuilder visitError(ErrorType t, StringBuilder p) {\n"
291291
+ " kind = t.getKind();\n"
292-
+ " return p;\n"
292+
+ " mainType = t.toString();\n"
293+
+ " return p.append(mainType);\n"
293294
+ " }\n"
294295
+ "\n"
295296
+ " @Override\n"
@@ -413,7 +414,7 @@ public static void write(PrintWriter out, String packageName) {
413414
+ " if (obj == null || getClass() != obj.getClass()) return false;\n"
414415
+ " TypeMirrorVisitor other = (TypeMirrorVisitor) obj;\n"
415416
+ " return Objects.equals(fullType, other.fullType);\n"
416-
+ " }"
417+
+ " }\n"
417418
+ "}");
418419
}
419420
}

0 commit comments

Comments
 (0)