From 153e0a975a5f5b995781257ebb80cad2164562f4 Mon Sep 17 00:00:00 2001 From: crykn Date: Wed, 22 Nov 2023 10:13:29 +0100 Subject: [PATCH] fix: Remove Nullable annotation for GWT compatibility reasons. --- .../de/damios/guacamole/gdx/reflection/ReflectionUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdx/src/main/java/de/damios/guacamole/gdx/reflection/ReflectionUtils.java b/gdx/src/main/java/de/damios/guacamole/gdx/reflection/ReflectionUtils.java index 5ec4cc8..f287483 100644 --- a/gdx/src/main/java/de/damios/guacamole/gdx/reflection/ReflectionUtils.java +++ b/gdx/src/main/java/de/damios/guacamole/gdx/reflection/ReflectionUtils.java @@ -34,6 +34,7 @@ import de.damios.guacamole.Exceptions; import de.damios.guacamole.Preconditions; +import de.damios.guacamole.annotations.GwtIncompatible; import de.damios.guacamole.gdx.log.Logger; import de.damios.guacamole.gdx.log.LoggerService; @@ -175,7 +176,9 @@ public static Set> retrieveAllSuperTypes(Class clazz) { return Collections.unmodifiableSet(allSuperTypes); } - public static @Nullable A getAnnotationObject( + // Can't mark this with @Nullable because of GWT ("Annotation types that do + // not specify explicit target element types cannot be applied here") + public static A getAnnotationObject( Field field, Class clazz) { Annotation annotation = field.getDeclaredAnnotation(clazz); if (annotation == null)