Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Sep 1, 2022
1 parent f919439 commit b1414bf
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,7 +33,7 @@ class AnnotationBackCompatibilityTests {

@Test
void multiplRoutesToMetaAnnotation() {
Class<WithMetaMetaTestAnnotation1AndMetaTestAnnotation2> source = WithMetaMetaTestAnnotation1AndMetaTestAnnotation2.class;
Class<?> source = WithMetaMetaTestAnnotation1AndMetaTestAnnotation2.class;
// Merged annotation chooses lowest depth
MergedAnnotation<TestAnnotation> mergedAnnotation = MergedAnnotations.from(source).get(TestAnnotation.class);
assertThat(mergedAnnotation.getString("value")).isEqualTo("testAndMetaTest");
Expand All @@ -60,14 +60,12 @@ void defaultValue() {
@Retention(RetentionPolicy.RUNTIME)
@TestAnnotation("metaTest")
@interface MetaTestAnnotation {

}

@Retention(RetentionPolicy.RUNTIME)
@TestAnnotation("testAndMetaTest")
@MetaTestAnnotation
@interface TestAndMetaTestAnnotation {

}

@Retention(RetentionPolicy.RUNTIME)
Expand All @@ -78,7 +76,6 @@ void defaultValue() {
@MetaMetaTestAnnotation
@TestAndMetaTestAnnotation
static class WithMetaMetaTestAnnotation1AndMetaTestAnnotation2 {

}

@Retention(RetentionPolicy.RUNTIME)
Expand All @@ -94,7 +91,6 @@ static class WithMetaMetaTestAnnotation1AndMetaTestAnnotation2 {

@DefaultValueAnnotation
static class WithDefaultValue {

}

enum TestEnum {
Expand Down

0 comments on commit b1414bf

Please sign in to comment.