commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36940] New: - Method get in LazyDynaBean don't returns null if the value of the propertie is null
Date Wed, 05 Oct 2005 18:08:26 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36940>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36940

           Summary: Method get in LazyDynaBean don't returns null if the
                    value of the propertie is null
           Product: Commons
           Version: 1.6 Final
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: roiares@gmail.com


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.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message