You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Scott Eade <se...@backstagetech.com.au> on 2003/01/23 01:09:30 UTC

BaseValueParser.getInt(String name)

Does anyone have any objection to changing BaseValueParser.getInt(String
name) such that when the name does not exist a null is returned rather than
an Integer with the value 0?

It makes sense for a 0 to be returned when getInt() is used, but for
geInteger() it should surely be a null.

I see two reasons for doing this:
1. It ain't there - why manufacture something.
2. With turbine 2.2/Torque 3.0 it is highly likely that users are going to
want to use objects rather than primitives for their table keys.  Changing
getInteger() to behave this way will bring the method into line with
getNumberKey() - doing anything else is going to make the conversion from
2.1 to 2.2 very very very very difficult.  After all, isn't supporting null
values the whole point of using objects rather than primitives for keys?

Cheers,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
.Mac Chat/AIM: seade at mac dot com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: BaseValueParser.getInt(String name)

Posted by Christian Willy Asmussen <kr...@kriconet.com.br>.
+1

PS: I am not a commiter, am I supposed to vote?

Scott Eade wrote:

>Does anyone have any objection to changing BaseValueParser.getInt(String
>name) such that when the name does not exist a null is returned rather than
>an Integer with the value 0?
>
>It makes sense for a 0 to be returned when getInt() is used, but for
>geInteger() it should surely be a null.
>
>I see two reasons for doing this:
>1. It ain't there - why manufacture something.
>2. With turbine 2.2/Torque 3.0 it is highly likely that users are going to
>want to use objects rather than primitives for their table keys.  Changing
>getInteger() to behave this way will bring the method into line with
>getNumberKey() - doing anything else is going to make the conversion from
>2.1 to 2.2 very very very very difficult.  After all, isn't supporting null
>values the whole point of using objects rather than primitives for keys?
>
>Cheers,
>
>Scott
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: BaseValueParser.getInt(String name)

Posted by Quinton McCombs <qm...@nequalsone.com>.
+1

> -----Original Message-----
> From: Scott Eade [mailto:seade@backstagetech.com.au] 
> Sent: Wednesday, January 22, 2003 6:10 PM
> To: turbine-dev
> Subject: BaseValueParser.getInt(String name)
> 
> 
> Does anyone have any objection to changing 
> BaseValueParser.getInt(String
> name) such that when the name does not exist a null is 
> returned rather than an Integer with the value 0?
> 
> It makes sense for a 0 to be returned when getInt() is used, but for
> geInteger() it should surely be a null.
> 
> I see two reasons for doing this:
> 1. It ain't there - why manufacture something.
> 2. With turbine 2.2/Torque 3.0 it is highly likely that users 
> are going to want to use objects rather than primitives for 
> their table keys.  Changing
> getInteger() to behave this way will bring the method into line with
> getNumberKey() - doing anything else is going to make the 
> conversion from 2.1 to 2.2 very very very very difficult.  
> After all, isn't supporting null values the whole point of 
> using objects rather than primitives for keys?
> 
> Cheers,
> 
> Scott
> -- 
> Scott Eade
> Backstage Technologies Pty. Ltd. 
> http://www.backstagetech.com.au .Mac Chat/AIM: > seade at mac dot com
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:turbine-dev-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>