From bval-commits-returnjoseph67@example.org Tue Feb 01 16:45:39 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 55935 invoked from network); 1 Feb 2011 16:45:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Feb 2011 16:45:39 -0000 Received: (qmail 32263 invoked by uid 500); 1 Feb 2011 16:45:39 -0000 Delivered-To: joseph67@example.org Received: (qmail 32228 invoked by uid 500); 1 Feb 2011 16:45:38 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 32221 invoked by uid 99); 1 Feb 2011 16:45:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 16:45:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 16:45:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0C06323889D7; Tue, 1 Feb 2011 16:45:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066090 - /incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java Date: Tue, 01 Feb 2011 16:45:17 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> Author: mbenson Date: Tue Feb 1 16:45:16 2011 New Revision: 1066090 URL: http://svn.apache.org/viewvc?rev=1066090&view=rev Log: make it possible for FeaturesCapable subclasses to use a specific type of features Map Modified: incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java Modified: incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java?rev=1066090&r1=1066089&r2=1066090&view=diff ============================================================================== --- incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java (original) +++ incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java Tue Feb 1 16:45:16 2011 @@ -31,7 +31,7 @@ import org.apache.commons.lang3.ArrayUti public abstract class FeaturesCapable implements Serializable { private static final long serialVersionUID = -4045110242904814218L; - private ConcurrentMap<String, Object> features = new ConcurrentHashMap<String, Object>(); + private ConcurrentMap<String, Object> features = createFeaturesMap(); /** key = validation id, value = the validation */ private Validation[] validations = new Validation[0]; @@ -153,7 +153,8 @@ public abstract class FeaturesCapable im * @param target */ protected <T extends FeaturesCapable> void copyInto(T target) { - target.features = new ConcurrentHashMap<String, Object>(features); + target.features = target.createFeaturesMap(); + target.features.putAll(features); if (validations != null) { target.validations = validations.clone(); } @@ -203,6 +204,14 @@ public abstract class FeaturesCapable im return false; } + /** + * Create a features map for this {@link FeaturesCapable} object. + * @return ConcurrentMap + */ + protected ConcurrentMap<String, Object> createFeaturesMap() { + return new ConcurrentHashMap<String, Object>(); + } + private boolean acquireLockIfNeeded() { if (locking) { lock.lock(); From bval-commits-returnjoseph67@example.org Tue Feb 01 16:48:17 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 56617 invoked from network); 1 Feb 2011 16:48:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Feb 2011 16:48:17 -0000 Received: (qmail 35429 invoked by uid 500); 1 Feb 2011 16:48:17 -0000 Delivered-To: joseph67@example.org Received: (qmail 35383 invoked by uid 500); 1 Feb 2011 16:48:16 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 35374 invoked by uid 99); 1 Feb 2011 16:48:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 16:48:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 16:48:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BB59123888D2; Tue, 1 Feb 2011 16:47:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066093 - /incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java Date: Tue, 01 Feb 2011 16:47:55 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> Author: mbenson Date: Tue Feb 1 16:47:55 2011 New Revision: 1066093 URL: http://svn.apache.org/viewvc?rev=1066093&view=rev Log: simplify featuresCapable.getFeature() Modified: incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java Modified: incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java?rev=1066093&r1=1066092&r2=1066093&view=diff ============================================================================== --- incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java (original) +++ incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java Tue Feb 1 16:47:55 2011 @@ -94,15 +94,7 @@ public abstract class FeaturesCapable im public <T> T getFeature(String key, T defaultValue) { boolean release = acquireLockIfNeeded(); try { - if (!features.containsKey(key)) { - return defaultValue; - } - final T v = (T) features.get(key); - if (v == null) { - return (features.containsKey(key)) ? null : defaultValue; - } else { - return v; - } + return features.containsKey(key) ? (T) features.get(key) : defaultValue; } finally { if (release) { lock.unlock(); From bval-commits-returnjoseph67@example.org Tue Feb 01 17:50:04 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 89013 invoked from network); 1 Feb 2011 17:50:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Feb 2011 17:50:04 -0000 Received: (qmail 54335 invoked by uid 500); 1 Feb 2011 17:50:04 -0000 Delivered-To: joseph67@example.org Received: (qmail 54295 invoked by uid 500); 1 Feb 2011 17:50:03 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 54279 invoked by uid 99); 1 Feb 2011 17:50:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 17:50:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 17:50:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CB82C23889CB; Tue, 1 Feb 2011 17:49:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066100 - in /incubator/bval/trunk: ./ bval-core/ bval-core/src/main/java/org/apache/bval/ bval-core/src/main/java/org/apache/bval/model/ bval-xstream/src/main/java/org/apache/bval/xml/ Date: Tue, 01 Feb 2011 17:49:40 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> Author: mbenson Date: Tue Feb 1 17:49:39 2011 New Revision: 1066100 URL: http://svn.apache.org/viewvc?rev=1066100&view=rev Log: available merges from lang3-work sandbox pseudo-branch Modified: incubator/bval/trunk/ (props changed) incubator/bval/trunk/bval-core/pom.xml incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/MetaBeanCache.java incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java incubator/bval/trunk/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java incubator/bval/trunk/pom.xml Propchange: incubator/bval/trunk/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Feb 1 17:49:39 2011 @@ -1 +1 @@ -/incubator/bval/sandbox/lang3-work:993515-993522,995268,999707-999708,1000290,1000623,1000633 +/incubator/bval/sandbox/lang3-work:993515-993522,995265,995268,995804,999707-999708,1000290,1000623,1000633,1066090,1066093 Modified: incubator/bval/trunk/bval-core/pom.xml URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-core/pom.xml?rev=1066100&r1=1066099&r2=1066100&view=diff ============================================================================== --- incubator/bval/trunk/bval-core/pom.xml (original) +++ incubator/bval/trunk/bval-core/pom.xml Tue Feb 1 17:49:39 2011 @@ -47,11 +47,7 @@ </dependency> <dependency> <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - </dependency> - <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> + <artifactId>commons-beanutils-core</artifactId> </dependency> <dependency> <groupId>junit</groupId> Modified: incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/MetaBeanCache.java URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/MetaBeanCache.java?rev=1066100&r1=1066099&r2=1066100&view=diff ============================================================================== --- incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/MetaBeanCache.java (original) +++ incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/MetaBeanCache.java Tue Feb 1 17:49:39 2011 @@ -16,11 +16,12 @@ */ package org.apache.bval; -import org.apache.bval.model.MetaBean; -import org.apache.commons.collections.FastHashMap; - import java.io.Serializable; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + +import org.apache.bval.model.MetaBean; /** * Description: a cache to hold metabeans by id and by class.<br/> @@ -31,20 +32,17 @@ public class MetaBeanCache implements Me /** * Cache keyed by id. */ - protected final FastHashMap cacheById; + protected final ConcurrentMap<String, MetaBean> cacheById = new ConcurrentHashMap<String, MetaBean>(); /** * Cache keyed by class. */ - protected final FastHashMap cacheByClass; + protected final ConcurrentMap<Class<?>, MetaBean> cacheByClass = new ConcurrentHashMap<Class<?>, MetaBean>(); /** * Create a new MetaBeanCache instance. */ public MetaBeanCache() { - this.cacheById = new FastHashMap(); - cacheByClass = new FastHashMap(); - cacheByClass.setFast(true); - cacheById.setFast(true); + super(); } /** @@ -70,21 +68,20 @@ public class MetaBeanCache implements Me * {@inheritDoc} */ public MetaBean findForId(String beanInfoId) { - return (MetaBean) cacheById.get(beanInfoId); + return cacheById.get(beanInfoId); } /** * {@inheritDoc} */ public MetaBean findForClass(Class<?> clazz) { - return (MetaBean) cacheByClass.get(clazz); + return cacheByClass.get(clazz); } /** * Return all cached MetaBeans by id. * @return live map */ - @SuppressWarnings("unchecked") public Map<String, MetaBean> findAll() { return cacheById; } @@ -97,7 +94,7 @@ public class MetaBeanCache implements Me cacheById.put(beanInfo.getId(), beanInfo); if (beanInfo.getBeanClass() != null && beanInfo.getId().equals(beanInfo.getBeanClass().getName())) { - cacheByClass.put(beanInfo.getBeanClass(), beanInfo); + cacheByClass.putIfAbsent(beanInfo.getBeanClass(), beanInfo); } } Modified: incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java?rev=1066100&r1=1066099&r2=1066100&view=diff ============================================================================== --- incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java (original) +++ incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java Tue Feb 1 17:49:39 2011 @@ -16,60 +16,75 @@ */ package org.apache.bval.model; -import org.apache.commons.collections.FastHashMap; -import org.apache.commons.lang.ArrayUtils; - import java.io.Serializable; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.locks.ReentrantLock; + +import org.apache.commons.lang.ArrayUtils; /** - * Description: abstract superclass of meta objects that support a map of features.<br/> + * Description: abstract superclass of meta objects that support a map of + * features.<br/> */ public abstract class FeaturesCapable implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -4045110242904814218L; + + private ConcurrentMap<String, Object> features = createFeaturesMap(); - private FastHashMap features = new FastHashMap(); /** key = validation id, value = the validation */ private Validation[] validations = new Validation[0]; + private volatile boolean locking; + private ReentrantLock lock = new ReentrantLock(true); + /** * Create a new FeaturesCapable instance. */ public FeaturesCapable() { - features.setFast(true); + super(); } /** * Get the (live) map of features. + * * @return Map<String, Object> */ - @SuppressWarnings("unchecked") public Map<String, Object> getFeatures() { return features; } /** - * Set whether to optimize read operations by accessing the - * features map in an unsynchronized manner. + * Set whether to optimize read operations by accessing the features map in + * an unsynchronized manner. + * * @param fast */ public void optimizeRead(boolean fast) { - features.setFast(fast); + lock.lock(); + try { + this.locking = !fast; + } finally { + lock.unlock(); + } } /** * Get the specified feature. + * * @param <T> * @param key * @return T */ - @SuppressWarnings("unchecked") public <T> T getFeature(String key) { - return (T) features.get(key); + return getFeature(key, (T) null); } /** - * Get the specified feature, returning <code>defaultValue</code> if undeclared. + * Get the specified feature, returning <code>defaultValue</code> if + * undeclared. + * * @param <T> * @param key * @param defaultValue @@ -77,33 +92,44 @@ public abstract class FeaturesCapable im */ @SuppressWarnings("unchecked") public <T> T getFeature(String key, T defaultValue) { - final T v = (T) features.get(key); - if (v == null) { - return (features.containsKey(key)) ? null : defaultValue; - } else { - return v; + boolean release = acquireLockIfNeeded(); + try { + return features.containsKey(key) ? (T) features.get(key) : defaultValue; + } finally { + if (release) { + lock.unlock(); + } } } /** * Convenience method to set a particular feature value. + * * @param <T> * @param key * @param value */ public <T> void putFeature(String key, T value) { - features.put(key, value); + boolean release = acquireLockIfNeeded(); + try { + features.put(key, value); + } finally { + if (release) { + lock.unlock(); + } + } } /** * Create a deep copy (copy receiver and copy properties). + * * @param <T> * @return new T instance */ - @SuppressWarnings("unchecked") public <T extends FeaturesCapable> T copy() { try { - T self = (T) clone(); + @SuppressWarnings("unchecked") + final T self = (T) clone(); copyInto(self); return self; } catch (CloneNotSupportedException e) { @@ -112,12 +138,15 @@ public abstract class FeaturesCapable im } /** - * Copy this {@link FeaturesCapable} into another {@link FeaturesCapable} instance. + * Copy this {@link FeaturesCapable} into another {@link FeaturesCapable} + * instance. + * * @param <T> * @param target */ protected <T extends FeaturesCapable> void copyInto(T target) { - target.features = (FastHashMap) features.clone(); + target.features = target.createFeaturesMap(); + target.features.putAll(features); if (validations != null) { target.validations = validations.clone(); } @@ -125,6 +154,7 @@ public abstract class FeaturesCapable im /** * Get any validations set for this {@link FeaturesCapable}. + * * @return Validation array */ public Validation[] getValidations() { @@ -142,7 +172,9 @@ public abstract class FeaturesCapable im /** * Add a validation to this {@link FeaturesCapable}. - * @param validation to add + * + * @param validation + * to add */ public void addValidation(Validation validation) { validations = (Validation[]) ArrayUtils.add(validations, validation); @@ -150,14 +182,38 @@ public abstract class FeaturesCapable im /** * Search for an equivalent validation among those configured. + * * @param aValidation * @return true if found */ public boolean hasValidation(Validation aValidation) { - if (validations == null) return false; + if (validations == null) + return false; for (Validation validation : validations) { - if (validation.equals(aValidation)) return true; + if (validation.equals(aValidation)) + return true; + } + return false; + } + + /** + * Create a features map for this {@link FeaturesCapable} object. + * @return ConcurrentMap + */ + protected ConcurrentMap<String, Object> createFeaturesMap() { + return new ConcurrentHashMap<String, Object>(); + } + + private boolean acquireLockIfNeeded() { + if (locking) { + lock.lock(); + // double read + if (locking) { + return true; + } + lock.unlock(); } return false; } + } Modified: incubator/bval/trunk/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java?rev=1066100&r1=1066099&r2=1066100&view=diff ============================================================================== --- incubator/bval/trunk/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java (original) +++ incubator/bval/trunk/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java Tue Feb 1 17:49:39 2011 @@ -16,17 +16,19 @@ */ package org.apache.bval.xml; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import org.apache.bval.model.Validation; +import org.apache.commons.lang.ClassUtils; + import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; import com.thoughtworks.xstream.annotations.XStreamImplicit; import com.thoughtworks.xstream.annotations.XStreamOmitField; -import org.apache.bval.model.Validation; -import org.apache.commons.collections.FastHashMap; -import org.apache.commons.lang.ClassUtils; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; /** * Description: root element of a xml-beanInfos document<br/> @@ -94,28 +96,28 @@ public class XMLMetaBeanInfos { } private void initBeanLookup() { - beanLookup = new FastHashMap(); + final HashMap<String, XMLMetaBean> map = new HashMap<String, XMLMetaBean>(beans.size()); for (XMLMetaBean bean : beans) { - beanLookup.put(bean.getId(), bean); + map.put(bean.getId(), bean); } - ((FastHashMap) beanLookup).setFast(true); + beanLookup = new ConcurrentHashMap<String, XMLMetaBean>(map); } private void initValidationLookup() throws Exception { - validationLookup = new FastHashMap(); + final HashMap<String, XMLMetaValidator> map = new HashMap<String, XMLMetaValidator>(validators.size()); for (XMLMetaValidator xv : validators) { if (xv.getJava() != null) { Validation validation = (Validation) ClassUtils.getClass(xv.getJava()).newInstance(); xv.setValidation(validation); - validationLookup.put(xv.getId(), xv); + map.put(xv.getId(), xv); } } - ((FastHashMap) validationLookup).setFast(true); + validationLookup = new ConcurrentHashMap<String, XMLMetaValidator>(map); } public void addBean(XMLMetaBean bean) { - if (beans == null) beans = new ArrayList(); + if (beans == null) beans = new ArrayList<XMLMetaBean>(); beans.add(bean); } @@ -126,7 +128,7 @@ public class XMLMetaBeanInfos { } public void addValidator(XMLMetaValidator validator) { - if (validators == null) validators = new ArrayList(); + if (validators == null) validators = new ArrayList<XMLMetaValidator>(); validators.add(validator); } } Modified: incubator/bval/trunk/pom.xml URL: http://svn.apache.org/viewvc/incubator/bval/trunk/pom.xml?rev=1066100&r1=1066099&r2=1066100&view=diff ============================================================================== --- incubator/bval/trunk/pom.xml (original) +++ incubator/bval/trunk/pom.xml Tue Feb 1 17:49:39 2011 @@ -324,7 +324,7 @@ </dependency> <dependency> <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> + <artifactId>commons-beanutils-core</artifactId> <version>1.8.3</version> <exclusions> <exclusion> @@ -338,11 +338,6 @@ <artifactId>xstream</artifactId> <version>1.3.1</version> </dependency> - <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - <version>3.2.1</version> - </dependency> <!-- Optional - only used by bval-json --> <dependency> <groupId>org.freemarker</groupId> From bval-commits-returnjoseph67@example.org Tue Feb 01 19:14:27 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 52762 invoked from network); 1 Feb 2011 19:14:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Feb 2011 19:14:27 -0000 Received: (qmail 45571 invoked by uid 500); 1 Feb 2011 19:14:27 -0000 Delivered-To: joseph67@example.org Received: (qmail 45535 invoked by uid 500); 1 Feb 2011 19:14:26 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 45528 invoked by uid 99); 1 Feb 2011 19:14:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 19:14:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 19:14:23 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3EA5D23889B3; Tue, 1 Feb 2011 19:14:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066145 - /incubator/bval/trunk/bval-tck/pom.xml Date: Tue, 01 Feb 2011 19:14:02 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mbenson Date: Tue Feb 1 19:14:01 2011 New Revision: 1066145 URL: http://svn.apache.org/viewvc?rev=1066145&view=rev Log: merge c996247 from lang3-work pseudo-branch: fix tck pom to work with recent beanutils/collections dependency changes Modified: incubator/bval/trunk/bval-tck/pom.xml Modified: incubator/bval/trunk/bval-tck/pom.xml URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-tck/pom.xml?rev=1066145&r1=1066144&r2=1066145&view=diff ============================================================================== --- incubator/bval/trunk/bval-tck/pom.xml (original) +++ incubator/bval/trunk/bval-tck/pom.xml Tue Feb 1 19:14:01 2011 @@ -169,7 +169,7 @@ </artifactItem> <artifactItem> <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> + <artifactId>commons-beanutils-core</artifactId> <overWrite>true</overWrite> <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory> </artifactItem> @@ -180,12 +180,6 @@ <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory> </artifactItem> <artifactItem> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - <overWrite>true</overWrite> - <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory> - </artifactItem> - <artifactItem> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <overWrite>true</overWrite> From bval-commits-returnjoseph67@example.org Tue Feb 01 19:15:39 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 55164 invoked from network); 1 Feb 2011 19:15:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Feb 2011 19:15:15 -0000 Received: (qmail 49957 invoked by uid 500); 1 Feb 2011 19:15:15 -0000 Delivered-To: joseph67@example.org Received: (qmail 49923 invoked by uid 500); 1 Feb 2011 19:15:14 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 49914 invoked by uid 99); 1 Feb 2011 19:15:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 19:15:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 19:15:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D465923889B3; Tue, 1 Feb 2011 19:14:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066147 - /incubator/bval/trunk/ Date: Tue, 01 Feb 2011 19:14:51 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mbenson Date: Tue Feb 1 19:14:51 2011 New Revision: 1066147 URL: http://svn.apache.org/viewvc?rev=1066147&view=rev Log: mergeinfo Modified: incubator/bval/trunk/ (props changed) Propchange: incubator/bval/trunk/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Feb 1 19:14:51 2011 @@ -1 +1 @@ -/incubator/bval/sandbox/lang3-work:993515-993522,995265,995268,995804,999707-999708,1000290,1000623,1000633,1066090,1066093 +/incubator/bval/sandbox/lang3-work:993515-993522,995265,995268,995804,996247,999707-999708,1000290,1000623,1000633,1066090,1066093 From bval-commits-returnjoseph67@example.org Tue Feb 01 22:53:10 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 76649 invoked from network); 1 Feb 2011 22:53:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Feb 2011 22:53:10 -0000 Received: (qmail 62919 invoked by uid 500); 1 Feb 2011 22:53:10 -0000 Delivered-To: joseph67@example.org Received: (qmail 62880 invoked by uid 500); 1 Feb 2011 22:53:10 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 62873 invoked by uid 99); 1 Feb 2011 22:53:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 22:53:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 22:53:09 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id ED82B2388A40; Tue, 1 Feb 2011 22:52:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066255 - in /incubator/bval/sandbox/lang3-work: bval-jsr303/src/test/java/org/apache/bval/jsr303/util/TestUtils.java bval-jsr303d/src/test/java/org/apache/bval/jsr303/dynamic/DynamicCollectionValidationTest.java Date: Tue, 01 Feb 2011 22:52:48 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> Author: mbenson Date: Tue Feb 1 22:52:48 2011 New Revision: 1066255 URL: http://svn.apache.org/viewvc?rev=1066255&view=rev Log: add more dynamic tests Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/TestUtils.java incubator/bval/sandbox/lang3-work/bval-jsr303d/src/test/java/org/apache/bval/jsr303/dynamic/DynamicCollectionValidationTest.java Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/TestUtils.java URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/TestUtils.java?rev=1066255&r1=1066254&r2=1066255&view=diff ============================================================================== --- incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/TestUtils.java (original) +++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/TestUtils.java Tue Feb 1 22:52:48 2011 @@ -44,6 +44,27 @@ public class TestUtils { return null; } + /** + * @param violations + * @param propertyPath + * @return count of violations + */ + public static <T> int countViolations(Set<ConstraintViolation<T>> violations, String propertyPath) { + int result = 0; + for (ConstraintViolation<T> each : violations) { + if (each.getPropertyPath().toString().equals(propertyPath)) { + result++; + } + } + return result; + } + + /** + * @param <T> + * @param violations + * @param message + * @return the constraint violation with the specified message found, if any + */ public static <T> ConstraintViolation<T> getViolationWithMessage(Set<ConstraintViolation<T>> violations, String message) { for (ConstraintViolation<T> each : violations) { Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/test/java/org/apache/bval/jsr303/dynamic/DynamicCollectionValidationTest.java URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303d/src/test/java/org/apache/bval/jsr303/dynamic/DynamicCollectionValidationTest.java?rev=1066255&r1=1066254&r2=1066255&view=diff ============================================================================== --- incubator/bval/sandbox/lang3-work/bval-jsr303d/src/test/java/org/apache/bval/jsr303/dynamic/DynamicCollectionValidationTest.java (original) +++ incubator/bval/sandbox/lang3-work/bval-jsr303d/src/test/java/org/apache/bval/jsr303/dynamic/DynamicCollectionValidationTest.java Tue Feb 1 22:52:48 2011 @@ -23,6 +23,7 @@ import java.util.Set; import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; +import javax.validation.constraints.Min; import javax.validation.constraints.Pattern; import org.apache.bval.constraints.AuthorAddressKnown; @@ -38,12 +39,13 @@ import org.apache.bval.jsr303.example.Co import org.apache.bval.jsr303.example.Library; import org.apache.bval.jsr303.groups.CollectionValidationTest; import org.apache.bval.jsr303.util.TestUtils; +import org.apache.commons.proxy2.stub.AnnotationConfigurer; import org.apache.commons.proxy2.stub.AnnotationFactory; import org.apache.commons.proxy2.stub.StubConfigurer; /** - * - * + * + * * @version $Rev$ $Date$ */ public class DynamicCollectionValidationTest extends CollectionValidationTest { @@ -57,9 +59,12 @@ public class DynamicCollectionValidation @Override public void setUp() throws Exception { DynamicValidatorFactory factory = - Validation.byProvider(ApacheValidationProvider.class).configure().addProperty( - ApacheValidatorConfiguration.Properties.VALIDATOR_FACTORY_CLASSNAME, - DynamicValidatorFactory.class.getName()).buildValidatorFactory().unwrap(DynamicValidatorFactory.class); + Validation + .byProvider(ApacheValidationProvider.class) + .configure() + .addProperty(ApacheValidatorConfiguration.Properties.VALIDATOR_FACTORY_CLASSNAME, + DynamicValidatorFactory.class.getName()).buildValidatorFactory() + .unwrap(DynamicValidatorFactory.class); ((DefaultMessageInterpolator) factory.getMessageInterpolator()).setLocale(Locale.ENGLISH); validatorContext = factory.usingContext(); super.setUp(); @@ -147,4 +152,82 @@ public class DynamicCollectionValidation assertEquals(3, violations.size()); assertNotNull(TestUtils.getViolation(violations, "taggedBooks[science].author.addresses[0].addressline1")); } + + public void testDynamicMultilevelGenericIterable() { + Library lib = new Library(); + lib.setLibraryName("Leibnitz Bibliothek"); + + Book book1, book2, book3; + + book1 = new Book(); + book1.setTitle("History of time"); + book1.setSubtitle("How it really works"); + Author hawking = new Author(); + hawking.setFirstName("Stephen"); + hawking.setFirstName("Hawking"); + hawking.setAddresses(new ArrayList<Address>(1)); + Address addressHawking = new Address(); + addressHawking.setAddressline1("Street 1"); + addressHawking.setCity("London"); + addressHawking.setCountry(new Country()); + addressHawking.getCountry().setName("England"); + hawking.getAddresses().add(addressHawking); + book1.setAuthor(hawking); + + book2 = new Book(); + Author castro = new Author(); + castro.setFirstName("Fidel"); + castro.setLastName("Castro Ruz"); + book2.setAuthor(castro); + book2.setTitle("My life"); + Address addressCastro = new Address(); + addressCastro.setAddressline1("1 Cigar Street"); + addressCastro.setCity("havana"); + addressCastro.setCountry(new Country()); + addressCastro.getCountry().setName("Cuba"); + castro.setAddresses(new ArrayList<Address>()); + castro.getAddresses().add(addressCastro); + + book3 = new Book(); + book3.setTitle("How To Make Friends And Influence People"); + Author blag = new Author(); + blag.setFirstName("Blag"); + blag.setLastName("Dahlia"); + book3.setAuthor(blag); + Address addressBlag = new Address(); + addressBlag.setAddressline1("1 Dwarves Lane"); + addressBlag.setCity(""); + addressBlag.setCountry(new Country()); + addressBlag.getCountry().setName("USA"); + blag.setAddresses(new ArrayList<Address>()); + blag.getAddresses().add(addressBlag); + + lib.getTaggedBooks().put("science", book1); + lib.getTaggedBooks().put("politics", book2); + lib.getTaggedBooks().put("self-help", book3); + + validatorContext.constrain(Library.class, "taggedBooks[].author.addresses[].city", annotationFactory.create(new AnnotationConfigurer<Pattern>() { + + @Override + protected void configure(Pattern stub) { + when(stub.regexp()).thenReturn("[A-Z].*"); + } + })); + + validatorContext.constrain(Library.class, "taggedBooks[self-help].author.addresses[].city", annotationFactory.create(new AnnotationConfigurer<Min>() { + + @Override + protected void configure(Min stub) { + when(stub.value()).thenReturn(1L); + } + })); + + Set<ConstraintViolation<Library>> violations; + + violations = validator.validate(lib); + assertEquals(0, TestUtils.countViolations(violations, "taggedBooks[science].author.addresses[0].city")); + assertEquals(1, TestUtils.countViolations(violations, "taggedBooks[politics].author.addresses[0].city")); + assertEquals(2, TestUtils.countViolations(violations, "taggedBooks[self-help].author.addresses[0].city")); + } + } From bval-commits-returnjoseph67@example.org Wed Feb 02 04:23:40 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 25856 invoked from network); 2 Feb 2011 04:23:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2011 04:23:40 -0000 Received: (qmail 79008 invoked by uid 500); 2 Feb 2011 04:23:40 -0000 Delivered-To: joseph67@example.org Received: (qmail 78966 invoked by uid 500); 2 Feb 2011 04:23:38 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 78959 invoked by uid 99); 2 Feb 2011 04:23:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 04:23:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO aegis.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 04:23:33 +0000 Received: from aegis (localhost [83.161.120.155]) by aegis.apache.org (Postfix) with ESMTP id C96C2C0013 for <joseph67@example.org>; Wed, 2 Feb 2011 04:23:11 +0000 (UTC) Date: Wed, 2 Feb 2011 04:23:11 +0000 (UTC) From: Apache Hudson Server <joseph67@example.org> To: joseph67@example.org Message-ID: <2116797814.14291296620591794.JavaMail.hudson@aegis> Subject: Build failed in Hudson: BeanValidation-trunk-linux-tck-deploy #66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org See <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/66/changes> Changes: [mbenson] mergeinfo [mbenson] merge c996247 from lang3-work pseudo-branch: fix tck pom to work with recent beanutils/collections dependency changes [mbenson] available merges from lang3-work sandbox pseudo-branch ------------------------------------------ [...truncated 427 lines...] A bval-json/src/main/java/org/apache/bval A bval-json/src/main/java/org/apache/bval/json AU bval-json/src/main/java/org/apache/bval/json/JSONGenerator.java A bval-json/src/main/appended-resources A bval-json/src/main/appended-resources/META-INF AU bval-json/src/main/appended-resources/META-INF/NOTICE.vm A bval-json/src/main/resources A bval-json/src/main/resources/org A bval-json/src/main/resources/org/apache A bval-json/src/main/resources/org/apache/bval A bval-json/src/main/resources/org/apache/bval/json A bval-json/src/main/resources/org/apache/bval/json/bean-infos-json.ftl AU bval-json/pom.xml AU DISCLAIMER A bval-guice A bval-guice/src A bval-guice/src/test A bval-guice/src/test/java A bval-guice/src/test/java/org A bval-guice/src/test/java/org/apache A bval-guice/src/test/java/org/apache/bval A bval-guice/src/test/java/org/apache/bval/guice AU bval-guice/src/test/java/org/apache/bval/guice/Update.java AU bval-guice/src/test/java/org/apache/bval/guice/Country.java AU bval-guice/src/test/java/org/apache/bval/guice/DummyCountryDao.java AU bval-guice/src/test/java/org/apache/bval/guice/GuiceAwareValidationTestCase.java AU bval-guice/src/test/java/org/apache/bval/guice/Insert.java AU bval-guice/src/test/java/org/apache/bval/guice/DummyException.java A bval-guice/src/test/resources A bval-guice/src/main A bval-guice/src/main/java A bval-guice/src/main/java/org A bval-guice/src/main/java/org/apache A bval-guice/src/main/java/org/apache/bval A bval-guice/src/main/java/org/apache/bval/guice AU bval-guice/src/main/java/org/apache/bval/guice/GuiceAwareConstraintValidatorFactory.java AU bval-guice/src/main/java/org/apache/bval/guice/ValidationModule.java AU bval-guice/src/main/java/org/apache/bval/guice/ValidatorProvider.java AU bval-guice/src/main/java/org/apache/bval/guice/ConfigurationStateProvider.java AU bval-guice/src/main/java/org/apache/bval/guice/package-info.java AU bval-guice/src/main/java/org/apache/bval/guice/ValidatorFactoryProvider.java AU bval-guice/src/main/java/org/apache/bval/guice/Validate.java AU bval-guice/src/main/java/org/apache/bval/guice/ValidateMethodInterceptor.java A bval-guice/src/main/resources AU bval-guice/pom.xml U . At revision 1066323 Found mavenVersion 2.2.1 from file jar:file:/home/hudson/tools/maven/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties Parsing POMs [trunk] $ /home/hudson/tools/java/latest1.6/bin/java -Xmx1024m -XX:MaxPermSize=256m -cp /home/hudson/hudson-slave/maven-agent.jar:/home/hudson/hudson-slave/classworlds.jar hudson.maven.agent.Main /home/hudson/tools/maven/apache-maven-2.2.1 /home/hudson/hudson-slave/slave.jar /home/hudson/hudson-slave/maven-interceptor.jar 44004 /home/hudson/hudson-slave/maven2.1-interceptor.jar <===[HUDSON REMOTING CAPACITYchannel started ]===> Executing Maven: -B -f <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/pom.xml> clean site deploy -Ptck [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Apache Bean Validation 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 bval-parent (Parent POM) [INFO] Apache Bean Validation 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 bval-core [INFO] Apache Bean Validation 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 bval-xstream (optional) [INFO] Apache Bean Validation 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 bval-jsr303 [INFO] Apache Bean Validation 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 org.apache.bval.bundle [INFO] Apache Bean Validation 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 bval-json (optional) [INFO] Apache Bean Validation 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 bval-guice (optional) [INFO] Apache Bean Validation 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 bval-tck (TCK Runner) [INFO] Apache Bean Validation 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 bval-extras (optional) [INFO] ------------------------------------------------------------------------ [INFO] Building Apache Bean Validation 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 bval-parent (Parent POM) [INFO] task-segment: [clean, site, deploy] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Preparing javadoc:test-javadoc [HUDSON] Archiving <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/pom.xml> to /home/hudson/hudson/jobs/BeanValidation-trunk-linux-tck-deploy/modules/org.apache.bval$bval-parent/builds/2011-02-02_04-21-59/archive/org.apache.bval/bval-parent/0.3-incubating-SNAPSHOT/pom.xml [INFO] [enforcer:enforce {execution: default}] [INFO] [buildnumber:create {execution: default}] [INFO] Checking for local modifications: skipped. [INFO] Updating project files from SCM: skipped. [INFO] Executing: /bin/sh -c cd <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk> && svn --non-interactive info [INFO] Working directory: <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk> [INFO] Storing buildNumber: 1066323 at timestamp: 1296620561532 [INFO] Executing: /bin/sh -c cd <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk> && svn --non-interactive info [INFO] Working directory: <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk> [INFO] Storing buildScmBranch: trunk [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] [remote-resources:process {execution: process-remote-resources}] [INFO] [remote-resources:process {execution: default}] [INFO] Preparing javadoc:javadoc [WARNING] Removing: javadoc from forked lifecycle, to prevent recursive invocation. [INFO] [enforcer:enforce {execution: default}] [INFO] [buildnumber:create {execution: default}] [WARNING] DEPRECATED [aggregate]: since 2.5. Use the goals <code>javadoc:aggregate</code> and <code>javadoc:test-aggregate</code> instead. [INFO] [javadoc:javadoc {execution: default}] [INFO] snapshot org.apache.bval:bval-core:0.3-incubating-SNAPSHOT: checking for updates from apache.snapshots Downloading: http://repository.apache.org/snapshots/org/apache/bval/bval-core/0.3-incubating-SNAPSHOT/bval-core-0.3-incubating-20101210.052533-22.jar 57K downloaded (bval-core-0.3-incubating-20101210.052533-22.jar) [INFO] snapshot org.apache.bval:bval-xstream:0.3-incubating-SNAPSHOT: checking for updates from apache.snapshots Downloading: http://repository.apache.org/snapshots/org/apache/bval/bval-xstream/0.3-incubating-SNAPSHOT/bval-xstream-0.3-incubating-20101210.052533-22.jar 39K downloaded (bval-xstream-0.3-incubating-20101210.052533-22.jar) [INFO] snapshot org.apache.bval:bval-jsr303:0.3-incubating-SNAPSHOT: checking for updates from apache.snapshots Downloading: http://repository.apache.org/snapshots/org/apache/bval/bval-jsr303/0.3-incubating-SNAPSHOT/bval-jsr303-0.3-incubating-20101210.052533-22.jar 220K downloaded (bval-jsr303-0.3-incubating-20101210.052533-22.jar) Downloading: http://repository.apache.org/snapshots/org/apache/bval/bval-core/0.3-incubating-SNAPSHOT/bval-core-0.3-incubating-20101210.052533-22-tests.jar 11K downloaded (bval-core-0.3-incubating-20101210.052533-22-tests.jar) Downloading: http://repository.apache.org/snapshots/org/apache/bval/bval-xstream/0.3-incubating-SNAPSHOT/bval-xstream-0.3-incubating-20101210.052533-22-tests.jar 23K downloaded (bval-xstream-0.3-incubating-20101210.052533-22-tests.jar) [INFO] snapshot org.apache.bval:org.apache.bval.bundle:0.3-incubating-SNAPSHOT: checking for updates from apache.snapshots Downloading: http://repository.apache.org/snapshots/org/apache/bval/org.apache.bval.bundle/0.3-incubating-SNAPSHOT/org.apache.bval.bundle-0.3-incubating-20101210.052533-22.jar 279K downloaded (org.apache.bval.bundle-0.3-incubating-20101210.052533-22.jar) 39 warnings [WARNING] Javadoc Warnings [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/BeanValidator.java>:199: warning - @inheritDoc used but validateBeanNet(ValidationContext<VL>) does not override or implement any method. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/BeanValidator.java>:199: warning - @inheritDoc used but validateBeanNet(ValidationContext<VL>) does not override or implement any method. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/ValidationResults.java>:116: warning - Tag @see:illegal character: "123" in "{@link Error#getOwner()}" [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/ValidationResults.java>:116: warning - Tag @see:illegal character: "64" in "{@link Error#getOwner()}" [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/ValidationResults.java>:100: warning - Tag @see:illegal character: "123" in "{@link Error#getReason()}" [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/ValidationResults.java>:100: warning - Tag @see:illegal character: "64" in "{@link Error#getReason()}" [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/ValidationResults.java>:177: warning - Tag @see:illegal character: "123" in "{@link Error#getReason()}" [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/ValidationResults.java>:177: warning - Tag @see:illegal character: "64" in "{@link Error#getReason()}" [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/ValidationResults.java>:100: warning - Tag @see: reference not found: {@link Error#getReason()} [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/ValidationResults.java>:116: warning - Tag @see: reference not found: {@link Error#getOwner()} [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/ValidationResults.java>:177: warning - Tag @see: reference not found: {@link Error#getReason()} [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/util/ValidationHelper.java>:60: warning - Parameter "context" is documented more than once. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java>:65: warning - @return tag has no arguments. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java>:97: warning - @return tag has no arguments. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java>:135: warning - Tag @see:illegal character: "123" in "{@link Features.Property#MANDATORY}" [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java>:135: warning - Tag @see:illegal character: "64" in "{@link Features.Property#MANDATORY}" [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java>:144: warning - Tag @see:illegal character: "123" in "{@link Features.Property#MANDATORY}" [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java>:144: warning - Tag @see:illegal character: "64" in "{@link Features.Property#MANDATORY}" [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java>:135: warning - Tag @see: reference not found: {@link Features.Property#MANDATORY} [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java>:144: warning - Tag @see: reference not found: {@link Features.Property#MANDATORY} [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanManagerFactory.java>:59: warning - @return tag has no arguments. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanManagerFactory.java>:33: warning - @return tag has no arguments. [HUDSON] Archiving aggregated javadoc[WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanManagerFactory.java>:51: warning - @return tag has no arguments. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/BeanDescriptorImpl.java>:101: warning - Parameter "propertyName" is documented more than once. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java>:412: warning - @param argument "validationContext" is not a parameter name. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidation.java>:279: warning - @return tag has no arguments. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/GraphBeanIdentity.java>:74: warning - @return tag has no arguments. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/ConstructorDescriptor.java>:37: warning - @return tag has no arguments. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationIgnores.java>:65: warning - @param argument "b," is not a parameter name. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeBuilderCustomizableContextImpl.java>:29: warning - Tag @link: reference not found: NodeBuilderCustomizableContext [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeBuilderDefinedContextImpl.java>:29: warning - Tag @link: reference not found: NodeBuilderDefinedContext [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java>:48: warning - @return tag has no arguments. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeBuilderCustomizableContextImpl.java>:29: warning - Tag @link: reference not found: NodeBuilderCustomizableContext [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeBuilderDefinedContextImpl.java>:29: warning - Tag @link: reference not found: NodeBuilderDefinedContext [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/BeanValidator.java>:199: warning - @inheritDoc used but validateBeanNet(ValidationContext<VL>) does not override or implement any method. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/BeanValidator.java>:199: warning - @inheritDoc used but validateBeanNet(ValidationContext<VL>) does not override or implement any method. [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeBuilderCustomizableContextImpl.java>:29: warning - Tag @link: reference not found: NodeBuilderCustomizableContext [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeBuilderDefinedContextImpl.java>:29: warning - Tag @link: reference not found: NodeBuilderDefinedContext [WARNING] <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/bval-core/src/main/java/org/apache/bval/BeanValidator.java>:199: warning - @inheritDoc used but validateBeanNet(ValidationContext<VL>) does not override or implement any method. [INFO] Preparing javadoc:javadoc [WARNING] Removing: javadoc from forked lifecycle, to prevent recursive invocation. [INFO] [enforcer:enforce {execution: default}] [INFO] [buildnumber:create {execution: default}] [INFO] Preparing jdepend:generate [WARNING] Removing: javadoc from forked lifecycle, to prevent recursive invocation. [INFO] [enforcer:enforce {execution: default}] [INFO] [buildnumber:create {execution: default}] [INFO] [remote-resources:process {execution: process-remote-resources}] [INFO] [remote-resources:process {execution: default}] [INFO] Preparing findbugs:findbugs [WARNING] Removing: javadoc from forked lifecycle, to prevent recursive invocation. [INFO] [enforcer:enforce {execution: default}] [INFO] [buildnumber:create {execution: default}] [INFO] [remote-resources:process {execution: process-remote-resources}] [INFO] [remote-resources:process {execution: default}] [INFO] [site:site {execution: default-site}] [INFO] Parent project loaded from repository. [INFO] Parent project loaded from repository. [INFO] artifact org.apache.maven.skins:maven-default-skin: checking for updates from central [INFO] Generating "Issue Tracking" report. [INFO] Generating "Project Team" report. [INFO] Generating "Dependency Management" report. [INFO] Generating "Continuous Integration" report. [INFO] Generating "Project Plugins" report. [INFO] Generating "Dependencies" report. [INFO] Generating "Source Repository" report. [INFO] Generating "Plugin Management" report. [INFO] Generating "Mailing Lists" report. [INFO] Generating "Project Summary" report. [INFO] Generating "About" report. [INFO] Generating "Project License" report. [INFO] Generating "Dependency Convergence" report. [HUDSON] Archiving site from <https://hudson.apache.org/hudson/job/BeanValidation-trunk-linux-tck-deploy/ws/trunk/target/site> to /home/hudson/hudson/jobs/BeanValidation-trunk-linux-tck-deploy/site [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] null [INFO] ------------------------------------------------------------------------ [INFO] Trace joseph67@example.org$Chunk.<init>(ProxyOutputStream.java:175) at hudson.remoting.ProxyOutputStream._write(ProxyOutputStream.java:123) at hudson.remoting.ProxyOutputStream.write(ProxyOutputStream.java:103) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109) at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:161) at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:118) at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:72) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105) at org.apache.tools.tar.TarBuffer.writeBlock(TarBuffer.java:410) at org.apache.tools.tar.TarBuffer.writeRecord(TarBuffer.java:351) at hudson.org.apache.tools.tar.TarOutputStream.writeEOFRecord(TarOutputStream.java:356) at hudson.org.apache.tools.tar.TarOutputStream.finish(TarOutputStream.java:137) at hudson.org.apache.tools.tar.TarOutputStream.close(TarOutputStream.java:149) at hudson.util.io.TarArchiver.close(TarArchiver.java:114) at hudson.FilePath.writeToTar(FilePath.java:1579) at hudson.FilePath.copyRecursiveTo(FilePath.java:1504) at hudson.FilePath.copyRecursiveTo(FilePath.java:1433) at hudson.maven.reporters.MavenSiteArchiver.postExecute(MavenSiteArchiver.java:81) at hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:946) at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:336) at hudson.maven.agent.PluginManagerInterceptor$1MojoIntercepterImpl.callPost(PluginManagerInterceptor.java:170) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:183) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at hudson.maven.agent.Main.launch(Main.java:173) at hudson.maven.MavenBuilder.call(MavenBuilder.java:164) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:868) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:799) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) [INFO] ------------------------------------------------------------------------ [INFO] Total time: 45 seconds [INFO] Finished at: Tue Feb 01 20:23:10 PST 2011 [INFO] Final Memory: 88M/426M [INFO] ------------------------------------------------------------------------ channel stopped From bval-commits-returnjoseph67@example.org Wed Feb 02 18:51:30 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 29527 invoked from network); 2 Feb 2011 18:51:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2011 18:51:30 -0000 Received: (qmail 34621 invoked by uid 500); 2 Feb 2011 18:51:30 -0000 Delivered-To: joseph67@example.org Received: (qmail 34585 invoked by uid 500); 2 Feb 2011 18:51:28 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 34578 invoked by uid 99); 2 Feb 2011 18:51:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 18:51:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 18:51:27 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2E41523889CB; Wed, 2 Feb 2011 18:51:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066577 - /incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java Date: Wed, 02 Feb 2011 18:51:07 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> Author: mbenson Date: Wed Feb 2 18:51:06 2011 New Revision: 1066577 URL: http://svn.apache.org/viewvc?rev=1066577&view=rev Log: javadoc; reorder members; extract MetaBean creation to template method Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java?rev=1066577&r1=1066576&r2=1066577&view=diff ============================================================================== --- incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java (original) +++ incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java Wed Feb 2 18:51:06 2011 @@ -27,11 +27,10 @@ import org.apache.commons.lang3.reflect. /** * Represents a "container." - * + * * @version $Rev$ $Date$ */ public abstract class MetaContainer<K> { - private final Class<K> idType; private final Type elementType; private final MetaBean prototype; @@ -39,46 +38,47 @@ public abstract class MetaContainer<K> { /** * Create a new MetaContainer instance. + * * @param parent */ protected MetaContainer(Class<K> idType, Type type) { this.idType = idType; this.elementType = getElementType(type); - prototype = new MetaBean(); + prototype = createMetaBean(); prototype.setBeanClass(TypeUtils.getRawType(elementType, type)); } /** - * Get the element type of a container of type <code>type</code>. - * @param type - * @return Type - */ - protected abstract Type getElementType(Type type); - - /** - * @return the idType + * Get the idType. + * + * @return Class<K> */ public Class<K> getIdType() { return idType; } /** - * @return the elementType + * Get the elementType. + * + * @return Type */ public Type getElementType() { - return elementType; } /** - * @return the prototype + * Get the prototype. + * + * @return MetaBean */ public MetaBean getPrototype() { return prototype; } /** - * @return the elements + * Get the elements. + * + * @return ConcurrentMap<K,MetaBean> */ public ConcurrentMap<K, MetaBean> getElements() { return elements; @@ -86,7 +86,7 @@ public abstract class MetaContainer<K> { /** * Get the raw element bean keyed by <code>id</code>. - * + * * @param id * @return MetaBean */ @@ -96,7 +96,7 @@ public abstract class MetaContainer<K> { } MetaBean result = elements.get(id); if (result == null) { - result = new MetaBean(); + result = createMetaBean(); result.setBeanClass(prototype.getBeanClass()); MetaBean faster = elements.putIfAbsent(id, result); if (faster != null) { @@ -107,14 +107,13 @@ public abstract class MetaContainer<K> { } /** - * Get a MetaBean representing the bean keyed by id, merged with the - * prototype. - * + * Get a MetaBean representing the bean keyed by id, merged with the prototype. + * * @param id * @return MetaBean */ public MetaBean getMergedElement(K id) { - MetaBean result = new MetaBean(); + MetaBean result = createMetaBean(); copy(result, prototype); if (id != null) { copy(result, elements.get(id)); @@ -122,4 +121,21 @@ public abstract class MetaContainer<K> { return result; } + /** + * Create a {@link MetaBean}. + * + * @return MetaBean + */ + protected MetaBean createMetaBean() { + return new MetaBean(); + } + + /** + * Get the element type of a container of type <code>type</code>. + * + * @param type + * @return Type + */ + protected abstract Type getElementType(Type type); + } From bval-commits-returnjoseph67@example.org Wed Feb 02 19:03:25 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 94608 invoked from network); 2 Feb 2011 19:03:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2011 19:03:25 -0000 Received: (qmail 59118 invoked by uid 500); 2 Feb 2011 19:03:25 -0000 Delivered-To: joseph67@example.org Received: (qmail 59079 invoked by uid 500); 2 Feb 2011 19:03:24 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 59072 invoked by uid 99); 2 Feb 2011 19:03:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 19:03:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO thor.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 19:03:22 +0000 Received: from thor (localhost [83.161.120.155]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p12J31KV019220 for <joseph67@example.org>; Wed, 2 Feb 2011 19:03:01 GMT Date: Wed, 2 Feb 2011 14:03:01 -0500 (EST) From: joseph67@example.org To: joseph67@example.org Message-ID: <20523881.3562.1296673381319.JavaMail.root@thor> Subject: [CONF] Apache Bean Validation > Samples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org Space: Apache Bean Validation (https://cwiki.apache.org/confluence/display/BeanValidation) Page: Samples (https://cwiki.apache.org/confluence/display/BeanValidation/Samples) Edited by Albert Lee: --------------------------------------------------------------------- We'll use this page to publicize Bean Validation samples from our project, other projects at Apache, and other external projects that use a ASL 2.0 friendly license..... h3. bval-samples [BeanValidation:Obtaining a validator] h3. Apache OpenJPA The Apache OpenJPA community has created a [Bean Validation Primer|http://openjpa.apache.org/bean-validation-primer.html] section showing how JPA2 and Bean Validation can be used. Currently, this includes an [image-gallery|http://svn.apache.org/repos/asf/openjpa/trunk/openjpa-examples/image-gallery/] sample which must be built from source. Additional JPA2 and Bean Validation integration tests can be found under the [openjpa-integration-validation|http://svn.apache.org/repos/asf/openjpa/trunk/openjpa-integration/validation/] component in the OpenJPA source tree. h3. Apache Geronimo The Apache Geronimo community is working on a 3.0 release to deliver a Java EE 6 application server, which will include Bean Validation. For now, no samples have been created for Bean Validation, but keep checking the latest [Geronimo Samples|http://svn.apache.org/repos/asf/geronimo/samples/trunk/samples/] source tree.... h3. Apache MyFaces The Apache MyFaces Core project implements the JSF 2.0 specification, which includes support for using Bean Validation. Please check back later for updated samples.... \\ Change your notification preferences: https://cwiki.apache.org/confluence/users/viewnotifications.action From bval-commits-returnjoseph67@example.org Wed Feb 02 20:21:36 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 54185 invoked from network); 2 Feb 2011 20:21:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2011 20:21:35 -0000 Received: (qmail 91136 invoked by uid 500); 2 Feb 2011 20:21:35 -0000 Delivered-To: joseph67@example.org Received: (qmail 91100 invoked by uid 500); 2 Feb 2011 20:21:35 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 91076 invoked by uid 99); 2 Feb 2011 20:21:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 20:21:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 20:21:35 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EB70323889E3; Wed, 2 Feb 2011 20:21:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> 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; From bval-commits-returnjoseph67@example.org Wed Feb 02 20:24:37 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 57044 invoked from network); 2 Feb 2011 20:24:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2011 20:24:36 -0000 Received: (qmail 96865 invoked by uid 500); 2 Feb 2011 20:24:36 -0000 Delivered-To: joseph67@example.org Received: (qmail 96825 invoked by uid 500); 2 Feb 2011 20:24:36 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 96818 invoked by uid 99); 2 Feb 2011 20:24:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 20:24:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 20:24:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 024ED23889E3; Wed, 2 Feb 2011 20:24:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066610 - /incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java Date: Wed, 02 Feb 2011 20:24:15 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> Author: mbenson Date: Wed Feb 2 20:24:15 2011 New Revision: 1066610 URL: http://svn.apache.org/viewvc?rev=1066610&view=rev Log: Extract merged MetaBean creation as well as actual merge logic to overridable methods Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java?rev=1066610&r1=1066609&r2=1066610&view=diff ============================================================================== --- incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java (original) +++ incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java Wed Feb 2 20:24:15 2011 @@ -113,10 +113,11 @@ public abstract class MetaContainer<K> { * @return MetaBean */ public MetaBean getMergedElement(K id) { - MetaBean result = createMetaBean(); - copy(result, prototype); - if (id != null) { - copy(result, elements.get(id)); + MetaBean result = createMergeBean(); + if (id == null) { + merge(result, prototype); + } else { + merge(result, prototype, elements.get(id)); } return result; } @@ -131,6 +132,28 @@ public abstract class MetaContainer<K> { } /** + * Create a {@link MetaBean} instance for merging. + * + * @return MetaBean + */ + protected MetaBean createMergeBean() { + return new MetaBean(); + } + + /** + * Merge MetaBeans. Provides a hook for subclasses to see the sources. + * + * @param target + * @param sources + * in order of increasing specificity + */ + protected void merge(MetaBean target, MetaBean... sources) { + for (MetaBean source : sources) { + copy(target, source); + } + } + + /** * Get the element type of a container of type <code>type</code>. * * @param type From bval-commits-returnjoseph67@example.org Wed Feb 02 20:30:05 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 59978 invoked from network); 2 Feb 2011 20:30:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2011 20:30:05 -0000 Received: (qmail 2774 invoked by uid 500); 2 Feb 2011 20:30:05 -0000 Delivered-To: joseph67@example.org Received: (qmail 2741 invoked by uid 500); 2 Feb 2011 20:30:05 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 2733 invoked by uid 99); 2 Feb 2011 20:30:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 20:30:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 20:30:04 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 97A8C23889E3; Wed, 2 Feb 2011 20:29:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066614 - /incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java Date: Wed, 02 Feb 2011 20:29:43 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> Author: mbenson Date: Wed Feb 2 20:29:43 2011 New Revision: 1066614 URL: http://svn.apache.org/viewvc?rev=1066614&view=rev Log: fmt; refactor to make more clear that only when dynamic metadata is present do we merge Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java?rev=1066614&r1=1066613&r2=1066614&view=diff ============================================================================== --- incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java (original) +++ incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java Wed Feb 2 20:29:43 2011 @@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory; /** * {@link DynamicMetaGraphManager} implementation. - * + * * @version $Rev$ $Date$ */ final class DynamicMetaGraphManagerImpl implements DynamicMetaGraphManager { @@ -121,7 +121,7 @@ final class DynamicMetaGraphManagerImpl /** * Create a new SetupConstraintCallback instance. - * + * * @param root */ NavigateOrBuildGraph(MetaBean root) { @@ -220,7 +220,6 @@ final class DynamicMetaGraphManagerImpl */ public MetaBean getMetaBean(Class<?> type) { final MetaBean initial = metaBeanFinder.findForClass(type); - MetaBean result = initial; final PathImpl path; final Object rootBean; @@ -238,17 +237,15 @@ final class DynamicMetaGraphManagerImpl } try { /* - * For each step of the path, we need to know whether the bean - * we are looking for matches a mapped property, so we build a - * stack of path/bean pairs. We use a stack so that when we - * process, the longest path goes last and therefore wins over - * short paths: the rationale here is that the longer path is - * more specific thus more likely to be rooted at more important - * part of your domain model. + * For each step of the path, we need to know whether the bean we are looking for matches a mapped + * property, so we build a stack of path/bean pairs. We use a stack so that when we process, the longest + * path goes last and therefore wins over short paths: the rationale here is that the longer path is + * more specific thus more likely to be rooted at more important part of your domain model. */ Deque<Pair<? extends PathImpl, Class<?>>> pathStack = buildPathStack(path, rootBean, rootMetaBean.getBeanClass()); + ArrayList<MetaBean> toMerge = new ArrayList<MetaBean>(); while (!pathStack.isEmpty()) { Pair<? extends PathImpl, Class<?>> pair = pathStack.pop(); List<MetaBean> dynamicInfo = getAssignableDynamicInfo(pair.right); @@ -256,13 +253,16 @@ final class DynamicMetaGraphManagerImpl PathImpl relativePath = pair.left; for (MetaBean root : dynamicInfo) { MetaBean leaf = findLeaf(root, relativePath); - if (leaf == null) { - continue; - } - if (result == initial) { - result = initial.copy(); + if (leaf != null) { + toMerge.add(leaf); } + } + } + if (!toMerge.isEmpty()) { + + MetaBean result = initial.copy(); + for (MetaBean leaf : toMerge) { // copy bean + property features and constraints: mergeFeatures(result, leaf); @@ -270,36 +270,31 @@ final class DynamicMetaGraphManagerImpl MetaProperty targetProperty = getRequiredProperty(result, sourceProperty.getName()); mergeFeatures(targetProperty, sourceProperty); } - - // TODO try paring down data returned from readOnly implementation } - } - if (result == initial) { - return result; - } - // now the dynamic constraints should FINALLY be fully - // populated: + // now the dynamic constraints should FINALLY be fully + // populated: - { - Collection<Annotation> constraints = - result.getFeature(DYNAMIC_CONSTRAINT_COLLECTION, EMPTY_DYNAMIC_ANNOTATIONS); - for (Annotation constraint : constraints) { - annotationProcessor.processAnnotation(constraint, result.getBeanClass(), - new AppendValidationToMeta(result)); + { + Collection<Annotation> constraints = + result.getFeature(DYNAMIC_CONSTRAINT_COLLECTION, EMPTY_DYNAMIC_ANNOTATIONS); + for (Annotation constraint : constraints) { + annotationProcessor.processAnnotation(constraint, result.getBeanClass(), + new AppendValidationToMeta(result)); + } } - } - for (MetaProperty property : result.getProperties()) { - String propertyName = property.getName(); - Collection<Annotation> constraints = - property.getFeature(DYNAMIC_CONSTRAINT_COLLECTION, EMPTY_DYNAMIC_ANNOTATIONS); - for (Annotation constraint : constraints) { - annotationProcessor.processAnnotation(constraint, property, result.getBeanClass(), - new PropertyAccess(result.getBeanClass(), propertyName), new AppendValidationToMeta( - property)); + for (MetaProperty property : result.getProperties()) { + String propertyName = property.getName(); + Collection<Annotation> constraints = + property.getFeature(DYNAMIC_CONSTRAINT_COLLECTION, EMPTY_DYNAMIC_ANNOTATIONS); + for (Annotation constraint : constraints) { + annotationProcessor.processAnnotation(constraint, property, result.getBeanClass(), + new PropertyAccess(result.getBeanClass(), propertyName), new AppendValidationToMeta( + property)); + } } + return result; } - } catch (Exception e) { StringBuilder msg = new StringBuilder("Encountered error applying dynamic constraints for type ") @@ -309,7 +304,7 @@ final class DynamicMetaGraphManagerImpl } log.error(msg.toString(), e); } - return result; + return initial; } /** @@ -372,7 +367,7 @@ final class DynamicMetaGraphManagerImpl /** * Create a new DynamicMetaGraphManagerImpl instance. - * + * * @param annotationProcessor * @param metaBeanFinder */ @@ -460,8 +455,8 @@ final class DynamicMetaGraphManagerImpl } /* - * build a stack of pairs of path + metabean representing each object in the - * currently known path, i.e. what we're trying to complete the bean for + * build a stack of pairs of path + metabean representing each object in the currently known path, i.e. what we're + * trying to complete the bean for */ private static Deque<Pair<? extends PathImpl, Class<?>>> buildPathStack(final PathImpl fullPath, Object rootBean, Class<?> rootType) { @@ -503,7 +498,7 @@ final class DynamicMetaGraphManagerImpl rawType = TypeUtils.getRawType(access.getJavaType(), type); type = access.getJavaType(); if (node.getName() != null) { - //substitute a name-only node and repeat the loop: + // substitute a name-only node and repeat the loop: nodes.add(0, new NodeImpl(node.getName())); continue; } From bval-commits-returnjoseph67@example.org Wed Feb 02 22:29:11 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 48484 invoked from network); 2 Feb 2011 22:29:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2011 22:29:11 -0000 Received: (qmail 44107 invoked by uid 500); 2 Feb 2011 22:29:11 -0000 Delivered-To: joseph67@example.org Received: (qmail 44071 invoked by uid 500); 2 Feb 2011 22:29:11 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 44064 invoked by uid 99); 2 Feb 2011 22:29:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 22:29:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 22:29:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9F5A823889BF; Wed, 2 Feb 2011 22:28:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066665 - /incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java Date: Wed, 02 Feb 2011 22:28:50 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> Author: mbenson Date: Wed Feb 2 22:28:50 2011 New Revision: 1066665 URL: http://svn.apache.org/viewvc?rev=1066665&view=rev Log: consolidate createMergeBean() and merge() for greater flexibility Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java?rev=1066665&r1=1066664&r2=1066665&view=diff ============================================================================== --- incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java (original) +++ incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/MetaContainer.java Wed Feb 2 22:28:50 2011 @@ -113,13 +113,7 @@ public abstract class MetaContainer<K> { * @return MetaBean */ public MetaBean getMergedElement(K id) { - MetaBean result = createMergeBean(); - if (id == null) { - merge(result, prototype); - } else { - merge(result, prototype, elements.get(id)); - } - return result; + return elements.containsKey(id) ? merge(prototype, elements.get(id)) : merge(prototype); } /** @@ -132,25 +126,18 @@ public abstract class MetaContainer<K> { } /** - * Create a {@link MetaBean} instance for merging. - * - * @return MetaBean - */ - protected MetaBean createMergeBean() { - return new MetaBean(); - } - - /** - * Merge MetaBeans. Provides a hook for subclasses to see the sources. + * Merge MetaBeans. * - * @param target * @param sources * in order of increasing specificity + * @return merged MetaBean */ - protected void merge(MetaBean target, MetaBean... sources) { + protected MetaBean merge(MetaBean... sources) { + MetaBean result = new MetaBean(); for (MetaBean source : sources) { - copy(target, source); + copy(result, source); } + return result; } /** From bval-commits-returnjoseph67@example.org Wed Feb 02 22:40:19 2011 Return-Path: <bval-commits-returnjoseph67@example.org> Delivered-To: joseph67@example.org Received: (qmail 53563 invoked from network); 2 Feb 2011 22:40:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2011 22:40:19 -0000 Received: (qmail 70358 invoked by uid 500); 2 Feb 2011 22:40:19 -0000 Delivered-To: joseph67@example.org Received: (qmail 70318 invoked by uid 500); 2 Feb 2011 22:40:19 -0000 Mailing-List: contact joseph67@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:joseph67@example.org> List-Unsubscribe: <mailto:joseph67@example.org> List-Post: <mailto:joseph67@example.org> List-Id: <bval-commits.incubator.apache.org> Reply-To: joseph67@example.org Delivered-To: mailing list joseph67@example.org Received: (qmail 70311 invoked by uid 99); 2 Feb 2011 22:40:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 22:40:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 22:40:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8545123889CB; Wed, 2 Feb 2011 22:39:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066670 - /incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java Date: Wed, 02 Feb 2011 22:39:56 -0000 To: joseph67@example.org From: joseph67@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <joseph67@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mbenson Date: Wed Feb 2 22:39:56 2011 New Revision: 1066670 URL: http://svn.apache.org/viewvc?rev=1066670&view=rev Log: javadoc Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java?rev=1066670&r1=1066669&r2=1066670&view=diff ============================================================================== --- incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java (original) +++ incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagerImpl.java Wed Feb 2 22:39:56 2011 @@ -454,9 +454,14 @@ final class DynamicMetaGraphManagerImpl return metaBean; } - /* - * build a stack of pairs of path + metabean representing each object in the currently known path, i.e. what we're - * trying to complete the bean for + /** + * Build
{'source': 'Apache Software Foundation Public Mail Archives'}