Skip to content

Commit dcb7a66

Browse files
committed
Remove unnecessary null check
1 parent a87a8a3 commit dcb7a66

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/java/graphql/language/AstPrinter.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -589,15 +589,11 @@ <T extends Node> NodePrinter<T> _findPrinter(Node node) {
589589
}
590590

591591
<T extends Node> NodePrinter<T> _findPrinter(Node node, @Nullable Class<?> startClass) {
592-
if (node == null) {
593-
return (out, type) -> {
594-
};
595-
}
596592
Class<?> clazz = startClass != null ? startClass : node.getClass();
597593
while (clazz != Object.class) {
598594
NodePrinter nodePrinter = printers.get(clazz);
599595
if (nodePrinter != null) {
600-
//noinspection unchecked
596+
// noinspection unchecked
601597
return nodePrinter;
602598
}
603599
clazz = clazz.getSuperclass();

0 commit comments

Comments
 (0)