incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1066608 - /incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicModel.java
Date Wed, 02 Feb 2011 20:21:14 GMT
Author: mbenson
Date: Wed Feb  2 20:21:14 2011
New Revision: 1066608

URL: http://svn.apache.org/viewvc?rev=1066608&view=rev
Log:
only create property MetaBean if not already set

Modified:
    incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicModel.java

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicModel.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicModel.java?rev=1066608&r1=1066607&r2=1066608&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicModel.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicModel.java
Wed Feb  2 20:21:14 2011
@@ -98,9 +98,11 @@ public class DynamicModel {
             result = new MetaProperty();
             result.setName(name);
             result.setType(new PropertyAccess(metaBean.getBeanClass(), name).getJavaType());
-            MetaBean propertyBean = new MetaBean();
-            propertyBean.setBeanClass(result.getTypeClass());
-            result.setMetaBean(propertyBean);
+            if (result.getMetaBean() == null) {
+                MetaBean propertyBean = new MetaBean();
+                propertyBean.setBeanClass(result.getTypeClass());
+                result.setMetaBean(propertyBean);
+            }
             metaBean.putProperty(name, result);
         }
         return result;



Mime
View raw message