On Apr 8, 2008, at 10:57 AM, Bill Shannon wrote:
> Jerome Dochez wrote:
>> On Apr 8, 2008, at 7:43 AM, Prashanth Abbagani wrote:
>>> This will be useful. But for boolean parameters, can we encourage
>>> the developers to declare the param as boolean type (as against
>>> String), and you implicitly validate the option value for (true or
>>> false).
>>>
>> right, I like the feature but not the example...
>> we should have
>> @Param(optional=true)
>> Boolean enabled
>> and let the system figure out the conversion (constructor with
>> String paramerter).
>> having said that, the acceptableValues is interesting for other
>> things, and could/ should be enhanced to support range :
>> like
>> @Param(acceptableValues="0..100")
>> Integer numberOfThreads;
>
> Shouldn't we use the Bean Validation spec (JSR-303) to do this?
last time I checked, there was no binary availability, but in the
future, yes that seems like a good fit
>
>
> Also, didn't we used to accept a bunch of values for boolean
> attributes
> (true, false, on, off, yes, no, 1, 0)? Not that I think that's a good
> idea, I'm just worried about compatibility.
good point, we certainly need to maintain this.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>