Skip to content

Commit 087c267

Browse files
Paul KellyBoykoAlex
Paul Kelly
authored andcommitted
Fix issue 739, NPE
1 parent d279b08 commit 087c267

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/sbm-core/src/main/java/org/springframework/sbm/java/impl/OpenRewriteMethod.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,12 @@ public Optional<String> getReturnValue() {
164164
return Optional.empty();
165165
}
166166

167-
return Optional.of(TypeUtils.asFullyQualified(returnTypeExpression.getType()).getFullyQualifiedName());
167+
JavaType.FullyQualified jfq = TypeUtils.asFullyQualified(returnTypeExpression.getType());
168+
if (jfq == null) {
169+
return Optional.empty();
170+
} else {
171+
return Optional.of(jfq.getFullyQualifiedName());
172+
}
168173
}
169174

170175
// FIXME: renaming method should not require a methodPattern in this context

0 commit comments

Comments
 (0)