commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (BEANUTILS-311) DynaBean variables are evaluated before member variables.
Date Wed, 19 Mar 2008 15:50:27 GMT

    [ https://issues.apache.org/jira/browse/BEANUTILS-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580419#action_12580419
] 

Niall Pemberton commented on BEANUTILS-311:
-------------------------------------------

Ivan,

Its not really a "bean with a Map" but an alternative to a POJO bean - see:

http://commons.apache.org/beanutils/apidocs/org/apache/commons/beanutils/package-summary.html#dynamic

One reason I don't think its a good idea is because of the very question "which should be
evaulated first"? Another is because it could be inconsistent, depending on whether a property
exists in a DynaBean or not. BeanUtils only ever treats DynaBean as DynaBeans (the same with
Maps btw) - this is straightforward and consistent and I'm against making it any other way.

Starting coding getters/setters for DynaBean would seem bizarre to me - since one of their
main points is not having to do that. If you want to though, then I suggest overriding the
DynaBean's get/set methods and invoking your hand coded methods.

> DynaBean variables are evaluated before member variables.
> ---------------------------------------------------------
>
>                 Key: BEANUTILS-311
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-311
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.0-BETA
>            Reporter: Ivan Popov
>
> Hi,
> I have a class that is a DynaBean (extends LazyDynaBean) and that has some member variables,
in addition to those of the DynaBean.
> It seems as if dynaBean variables are evaluated first, and as the property to evaluate
is a member variable and not a dynaBean one,
> it returns a NestedNullException.
> Regards.

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


Mime
View raw message