incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1002671 - /incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NestedPathNavigator.java
Date Wed, 29 Sep 2010 15:16:52 GMT
Author: mbenson
Date: Wed Sep 29 15:16:35 2010
New Revision: 1002671

URL: http://svn.apache.org/viewvc?rev=1002671&view=rev
Log:
format/svn keywords

Modified:
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NestedPathNavigator.java
  (contents, props changed)

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NestedPathNavigator.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NestedPathNavigator.java?rev=1002671&r1=1002670&r2=1002671&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NestedPathNavigator.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NestedPathNavigator.java
Wed Sep 29 15:16:35 2010
@@ -33,6 +33,8 @@ import org.apache.commons.lang3.reflect.
 /**
  * Navigates a {@link ValidationContext} to a specified location, which may be
  * <code>null</code>.
+ * 
+ * @version $Rev$ $Date$
  */
 public class NestedPathNavigator {
 
@@ -63,7 +65,8 @@ public class NestedPathNavigator {
      * @param validationContext
      * @param propertyPath
      */
-    public void navigate(ValidationContext<?> validationContext, String propertyPath)
{
+    public void navigate(ValidationContext<?> validationContext,
+        String propertyPath) {
         PathNavigation.navigate(propertyPath, new Traversal(validationContext));
     }
 
@@ -97,20 +100,21 @@ public class NestedPathNavigator {
                     access = new IndexedAccess(type, index);
                     validationContext.setCurrentIndex(index);
                 } catch (NumberFormatException e) {
-                    throw new UnknownPropertyException(String.format("Cannot parse %s as
an array/iterable index",
-                        token), e);
+                    throw new UnknownPropertyException(String.format(
+                        "Cannot parse %s as an array/iterable index", token), e);
                 }
             } else if (KeyedAccess.getJavaElementType(type) != null) {
                 access = new KeyedAccess(type, token);
                 validationContext.setCurrentKey(token);
             } else {
-                throw new UnknownPropertyException(String.format("Cannot determine index/key
type for %s", type));
+                throw new UnknownPropertyException(String.format(
+                    "Cannot determine index/key type for %s", type));
             }
             Object value = validationContext.getBean();
             Object child = access.get(value);
             setType(access.getJavaType());
-            validationContext.setBean(child,
-                validationContext.getMetaBean().resolveMetaBean(child == null ? rawType :
child));
+            validationContext.setBean(child, validationContext.getMetaBean()
+                .resolveMetaBean(child == null ? rawType : child));
         }
 
         /**
@@ -123,12 +127,14 @@ public class NestedPathNavigator {
 
             if (metaBean instanceof DynamicMetaBean) {
                 metaBean =
-                    metaBean.resolveMetaBean(validationContext.getBean() == null ? rawType
: validationContext
-                        .getBean());
+                    metaBean
+                        .resolveMetaBean(validationContext.getBean() == null
+                            ? rawType : validationContext.getBean());
             }
             MetaProperty mp = metaBean.getProperty(token);
             if (mp == null) {
-                throw new UnknownPropertyException("unknown property '" + token + "' in "
+ metaBean.getId());
+                throw new UnknownPropertyException("unknown property '" + token
+                    + "' in " + metaBean.getId());
             }
             validationContext.setMetaProperty(mp);
             setType(mp.getType());
@@ -143,8 +149,9 @@ public class NestedPathNavigator {
         protected void moveDownIfNecessary() {
             MetaProperty mp = validationContext.getMetaProperty();
             if (mp != null) {
-                validationContext.moveDown(mp, new NullSafePropertyAccess(validationContext.getMetaBean()
-                    .getBeanClass(), mp.getName()));
+                validationContext.moveDown(mp,
+                    new NullSafePropertyAccess(validationContext.getMetaBean()
+                        .getBeanClass(), mp.getName()));
             }
         }
 

Propchange: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NestedPathNavigator.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message