commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [beanutils] primitive return types for getProperty
Date Tue, 06 May 2003 12:55:53 GMT
hi mark

(you didn't specify the class but i'm going to assume that you meant 
PropertyUtils.)

there's conversions and conversions :)

the beanutils methods take objects and so all primitives will be converted 
to and from the standard wrapper objects (eg. Integer for int). the other 
kind of conversion is the custom conversion using converters registered 
with ConvertUtils. when the method talks about no conversions, it means no 
custom conversions. (the documentation is a little misleading and so 
probably needs altering to make this more clear.)

- robert

On Sunday, May 4, 2003, at 06:06 PM, Mark Clarke wrote:

> Hi all,
> According to the documentation getProperty returns an object and does
> not do conversion. I have step through the code for a property that
> returns a byte and getProperty returns a Byte object. The code however
> fails later I think because some part of the code is expecting a byte
> and get an object or because some part expects a object and gets a
> primitive type. What does the getProperty method return for primitive
> type and  conversely what happens with the setProperty method and
> primitive types.
>
> TIA,.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


Mime
View raw message