Skip to content

Commit f691931

Browse files
committed
fix declaring class check
1 parent 43609bc commit f691931

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/jvm2dts/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,6 @@ private static boolean isData(Class<?> clazz) {
123123

124124
private static boolean isAnnotated(Class<?> cls, Set<String> annotations) {
125125
var result = stream(cls.getAnnotations()).anyMatch(a -> annotations.contains(a.annotationType().getName()));
126-
return result || cls.getDeclaringClass() == null || isAnnotated(cls.getDeclaringClass(), annotations);
126+
return result || cls.getDeclaringClass() != null && isAnnotated(cls.getDeclaringClass(), annotations);
127127
}
128128
}

0 commit comments

Comments
 (0)