Skip to content

Commit

Permalink
fix: Remove Nullable annotation for GWT compatibility reasons.
Browse files Browse the repository at this point in the history
crykn committed Nov 22, 2023
1 parent f002509 commit 153e0a9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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<Class<?>> retrieveAllSuperTypes(Class<?> clazz) {
return Collections.unmodifiableSet(allSuperTypes);
}

public static <A extends java.lang.annotation.Annotation> @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 extends java.lang.annotation.Annotation> A getAnnotationObject(
Field field, Class<A> clazz) {
Annotation annotation = field.getDeclaredAnnotation(clazz);
if (annotation == null)

0 comments on commit 153e0a9

Please sign in to comment.