incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1136240 - /incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java
Date Wed, 15 Jun 2011 23:04:23 GMT
Author: mbenson
Date: Wed Jun 15 23:04:23 2011
New Revision: 1136240

URL: http://svn.apache.org/viewvc?rev=1136240&view=rev
Log:
restrict access to getMetaBeanFinder() + use when possible

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

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java?rev=1136240&r1=1136239&r2=1136240&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java
Wed Jun 15 23:04:23 2011
@@ -106,7 +106,7 @@ public class ClassValidator implements C
      * @return a MetaBeanFinder
      * @see org.apache.bval.MetaBeanManagerFactory#getFinder()
      */
-    public MetaBeanFinder getMetaBeanFinder() {
+    protected MetaBeanFinder getMetaBeanFinder() {
         return factoryContext.getMetaBeanFinder();
     }
 
@@ -138,7 +138,7 @@ public class ClassValidator implements C
         try {
 
             Class<T> objectClass = (Class<T>) object.getClass();
-            MetaBean objectMetaBean = factoryContext.getMetaBeanFinder().findForClass(objectClass);
+            MetaBean objectMetaBean = getMetaBeanFinder().findForClass(objectClass);
 
             final GroupValidationContext<T> context = createContext(objectMetaBean,
object, objectClass, groups);
             final ConstraintValidationListener<T> result = context.getListener();
@@ -270,7 +270,7 @@ public class ClassValidator implements C
             throw new IllegalArgumentException("Class cannot be null");
         }
         try {
-            MetaBean metaBean = factoryContext.getMetaBeanFinder().findForClass(clazz);
+            MetaBean metaBean = getMetaBeanFinder().findForClass(clazz);
             BeanDescriptorImpl edesc = metaBean.getFeature(Jsr303Features.Bean.BEAN_DESCRIPTOR);
             if (edesc == null) {
                 edesc = createBeanDescriptor(metaBean);



Mime
View raw message