File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/main/java/org/hibernate/models/internal Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -66,17 +66,16 @@ default <A extends Annotation> AnnotationUsage<A> getAnnotationUsage(Class<A> an
66
66
@ Override
67
67
default <A extends Annotation > AnnotationUsage <A > locateAnnotationUsage (Class <A > annotationType ) {
68
68
// e.g., locate `@Nationalized`
69
- // 1. direct - look for `Nationalized.class` in the usage map (direct local use on the target)
70
- // 2. "meta annotations" - for each local usage, check that annotation's annotations for `Nationalized.class` (one level deep)
71
69
72
-
73
- // first, see if we can find it directly...
70
+ // first, check for direct use
71
+ // - look for `Nationalized.class` in the usage map of the target
74
72
final AnnotationUsage <A > localUsage = getAnnotationUsage ( annotationType );
75
73
if ( localUsage != null ) {
76
- return null ;
74
+ return localUsage ;
77
75
}
78
76
79
- // check as "meta annotations" (annotations on our annotations)...
77
+ // next, check as a "meta annotation"
78
+ // - for each local usage, check that annotation's annotations for `Nationalized.class` (one level deep)
80
79
final Map <Class <? extends Annotation >, AnnotationUsage <? extends Annotation >> localUsageMap = getUsageMap ();
81
80
for ( Map .Entry <Class <? extends Annotation >, AnnotationUsage <? extends Annotation >> usageEntry : localUsageMap .entrySet () ) {
82
81
final AnnotationUsage <? extends Annotation > usage = usageEntry .getValue ();
You can’t perform that action at this time.
0 commit comments