You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bval.apache.org by mb...@apache.org on 2010/09/29 17:21:56 UTC

svn commit: r1002674 - /incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NestedPathNavigator.java

Author: mbenson
Date: Wed Sep 29 15:21:55 2010
New Revision: 1002674

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

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

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=1002674&r1=1002673&r2=1002674&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:21:55 2010
@@ -65,8 +65,7 @@ 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));
     }
 
@@ -100,21 +99,20 @@ 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));
         }
 
         /**
@@ -127,14 +125,12 @@ 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());
@@ -149,9 +145,8 @@ 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()));
             }
         }