Skip to content

Commit 1b4b742

Browse files
fix: don't count method annotations for nullability (#5103)
1 parent 092a3df commit 1b4b742

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/ModuleBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ public void registerSQLQueryMethod(MethodInfo method, String className, String r
422422
}
423423

424424
private Nullability nullability(org.jboss.jandex.AnnotationTarget type) {
425-
if (type.hasAnnotation(NULLABLE)) {
425+
if (type.hasDeclaredAnnotation(NULLABLE)) {
426426
return Nullability.NULLABLE;
427-
} else if (type.hasAnnotation(NOT_NULL)) {
427+
} else if (type.hasDeclaredAnnotation(NOT_NULL)) {
428428
return Nullability.NOT_NULL;
429429
}
430430
return Nullability.MISSING;

jvm-runtime/testdata/java/javaclient/src/main/java/xyz/block/ftl/test/TestInvokeGoFromJava.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public Double optionalFloatVerb(Double val, OptionalFloatVerbClient client) {
151151

152152
@Export
153153
@Verb
154-
public byte @Nullable [] optionalBytesVerb(byte @Nullable [] val, OptionalBytesVerbClient client) {
154+
public @Nullable byte[] optionalBytesVerb(@Nullable byte[] val, OptionalBytesVerbClient client) {
155155
return client.optionalBytesVerb(val);
156156
}
157157

0 commit comments

Comments
 (0)