Skip to content

Commit d56fc95

Browse files
committed
Verify that default values are *not* put into the index
This is a subtle issue: if an annotation for a given class does not specify a particular value, the developer obviously intended the default value to be used. Now, if the default value ever changes, it should be reflected in the values returned by the annotation index. That implies that we must not write out unspecified settings into the serialized annotations, but always infer them at runtime from the annotation class itself. Happily, our annotation processor does The Right Thing (but the EclipseHelper in its current form does not). Keep it that way. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 1b8d622 commit d56fc95

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/it/apt-test/src/main/java/org/scijava/annotation/its/CustomAnnotation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
public @interface CustomAnnotation {
4949

5050
String greeting() default "Hello, World!";
51+
int number() default 123;
5152

5253
}
5354

0 commit comments

Comments
 (0)