dev@jsr311.java.net

Re: JSR311: Issue 44: Optional values for _at_*Param

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 25 Jun 2008 13:32:08 -0400

On Jun 25, 2008, at 12:33 PM, Stephan Koops wrote:

> Hi Paul,
>> On Jun 25, 2008, at 5:38 PM, Marc Hadley wrote:
>>> So far I've seen one positive response to this suggestion.
>>> Personally I'm fairly ambivalent, on the one hand it seems like a
>>> nice shortcut where it will work, on the other hand the status quo
>>> is simpler to learn.
>>>
>>> Any other opinions either for or against ?
>> Will not most @*Param declarations be on method/constructor
>> parameters. If so we will be removing a static type check. Is that
>> a big deal? for these cases is it not better to report the error at
>> compile time?
> sorry, I don't see the point. Where do we remove a static type check?
>
Currently the compiler will complain if you omit the value of the
annotation. If we make the value optional then the compiler won't care
that you need to have a value when annotating a method parameter and
you'll only get an error when you try to load the application.

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.