Summary: | [1.5][compiler] null is allowed as a legal element value in annotations | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Jon Nall <nall> | ||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P3 | ||||||
Version: | 3.1 | ||||||
Target Milestone: | 3.1 M5 | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Jon Nall
2005-01-28 10:52:10 EST
With latest I get: ---------- 1. ERROR in c:\tests_sources\X.java (at line 3) int[] bar() default null; ^^^^ The value for annotation attribute X.bar must be a constant expression ---------- 1 problem Closing as WORKSFORME. Added regression test. Thanks for reporting the problem. well, that's what i get for trying to simplify my testcase without actually checking in eclipse. here's the real reproducer. sorry for the confusion. @interface Foo { } @interface Bar { Foo[] foo() default null; } @Bar(foo=null) class Blah { // ... } I'll try to reproduce. Created attachment 17566 [details]
Test case
Indeed, we did not properly check the annotation value scenario. Added AnnotationTest#test108-109. Fixed Verified in I20050214 |