commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (BEANUTILS-24) [BeanUtils] Method get in LazyDynaBean don't returns null if the value of the propertie is null
Date Fri, 27 Jul 2007 11:54:18 GMT

     [ https://issues.apache.org/jira/browse/BEANUTILS-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Niall Pemberton updated BEANUTILS-24:
-------------------------------------

    Fix Version/s: 1.8.0

> [BeanUtils] Method get in LazyDynaBean don't returns null if the value of the propertie
is null
> -----------------------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-24
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-24
>             Project: Commons BeanUtils
>          Issue Type: Bug
>    Affects Versions: 1.6
>         Environment: Operating System: Windows XP
> Platform: All
>            Reporter: Roi Ares
>             Fix For: 1.8.0
>
>
> Hi! First at all thanks for your code and your job.
> I found a problem in LazyDynaBean, i don't know if is it a bug or i don't
> understand well the use for DynaBean.
> Here's the code:
> LazyDynaBean dynaBean = new LazyDynaBean();
> dynaBean.set("Propertie1","Value1");
> dynaBean.set("Propertie2",null);
> System.out.println(dynaBean.getMap());
> System.out.println(dynaBean.get("Propertie1"));
> System.out.println(dynaBean.get("Propertie2"));
> And this is the result:
> {Propertie2=null, Propertie1=Value1}
> Value1
> java.lang.Object@fec107
> Taking a view of the trazing I saw that the 2nd get returns a new instance of
> Object, not null. 
> LazyDynaBean.get("Propertie2") calls value = LazyDynaBean.createProperty(name,
> dynaClass.getDynaProperty(name).getType());
> and this to LazyDynaBean.createOtherProperty that returns type.newInstance();
> Thanks in advance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message