NotNull/Nullable and JSR

What about participating in JSR-250?

You can suggest some more annotations to it:

1. @Mandatory (I think it's better than @NotNull/@NonNull because it can
be mapped to XML Schema "mandatory" constraint) and @Optional (instead
of @Nullable).

2. @LowerXXXBound(XXX)/@UpperXXXBound, where XXX is one of: Int, Long,
Float, Double, Short or Size (to define value ranges, string length
constraints and array and collection sizes).

3. @Invariant(String expression) for constraints that can be validated
by plugins and user-defined validators.

And package will be, of course, javax.annotation.

3 comments
Comment actions Permalink

Thank you very much,
I guess that would be the right JSR for our participation.

Eugene.

"Ivan Gammel" <unexy@wonderland.ru> wrote in message
news:d5il92$4j0$1@is.intellij.net...

What about participating in JSR-250?

>

You can suggest some more annotations to it:

>

1. @Mandatory (I think it's better than @NotNull/@NonNull because it can
be mapped to XML Schema "mandatory" constraint) and @Optional (instead
of @Nullable).

>

2. @LowerXXXBound(XXX)/@UpperXXXBound, where XXX is one of: Int, Long,
Float, Double, Short or Size (to define value ranges, string length
constraints and array and collection sizes).

>

3. @Invariant(String expression) for constraints that can be validated
by plugins and user-defined validators.

>

And package will be, of course, javax.annotation.



0
Comment actions Permalink

I disagree. I mostly think JB should not get involved in JSR250 because the
proposed annotations are regarded as worthless, and specifically designed
for J2EE. I think a new JSR devoted to annotations for program invariants
and analysis hints would be better.

Thank you very much,
I guess that would be the right JSR for our participation.
Eugene.

"Ivan Gammel" <unexy@wonderland.ru> wrote in message
news:d5il92$4j0$1@is.intellij.net...

>> What about participating in JSR-250?
>>
>> You can suggest some more annotations to it:
>>
>> 1. @Mandatory (I think it's better than @NotNull/@NonNull because it
>> can be mapped to XML Schema "mandatory" constraint) and @Optional
>> (instead of @Nullable).
>>
>> 2. @LowerXXXBound(XXX)/@UpperXXXBound, where XXX is one of: Int,
>> Long, Float, Double, Short or Size (to define value ranges, string
>> length constraints and array and collection sizes).
>>
>> 3. @Invariant(String expression) for constraints that can be
>> validated by plugins and user-defined validators.
>>
>> And package will be, of course, javax.annotation.
>>



0
Comment actions Permalink

I won't say those annotations are worthless (although they do look like they'll need a lot of work). On the other hand, they are pretty much J2EE specific, in spite of the J2SE tag on the JSR. The Expert Group consists of Bea, Oracle, and Sun (no IBM, though, which is kind of weird), and while they may no app servers inside and out, there's no real reason for their tech people to know or care much about static analysis. I'd submit a new one, if at all feasible.

--Dave Griffith

0

Please sign in to leave a comment.