Return-Path: Delivered-To: apmail-incubator-bval-commits-archive@minotaur.apache.org Received: (qmail 6058 invoked from network); 29 Sep 2010 15:17:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Sep 2010 15:17:14 -0000 Received: (qmail 92050 invoked by uid 500); 29 Sep 2010 15:17:14 -0000 Delivered-To: apmail-incubator-bval-commits-archive@incubator.apache.org Received: (qmail 92019 invoked by uid 500); 29 Sep 2010 15:17:13 -0000 Mailing-List: contact bval-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bval-dev@incubator.apache.org Delivered-To: mailing list bval-commits@incubator.apache.org Received: (qmail 92012 invoked by uid 99); 29 Sep 2010 15:17:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 15:17:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 15:17:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9258923888FD; Wed, 29 Sep 2010 15:16:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: bval-commits@incubator.apache.org From: mbenson@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100929151652.9258923888FD@eris.apache.org> 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 * null. + * + * @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