bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r999727 - in /incubator/bval/trunk: ./ bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java
Date Wed, 22 Sep 2010 02:29:51 GMT
Author: mbenson
Date: Wed Sep 22 02:29:50 2010
New Revision: 999727

URL: http://svn.apache.org/viewvc?rev=999727&view=rev
Log:
merge recent compatible changes from lang3 sandbox pseudo-branch

Modified:
    incubator/bval/trunk/   (props changed)
    incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java

Propchange: incubator/bval/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep 22 02:29:50 2010
@@ -1 +1 @@
-/incubator/bval/sandbox/lang3-work:993515-993522,995268
+/incubator/bval/sandbox/lang3-work:993515-993522,995268,999707-999708

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=999727&r1=999726&r2=999727&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
Wed Sep 22 02:29:50 2010
@@ -132,6 +132,15 @@ public abstract class FeaturesCapable im
     }
 
     /**
+     * Set the validations for this {@link FeaturesCapable}.
+     * 
+     * @param validations
+     */
+    public void setValidations(Validation[] validations) {
+        this.validations = validations;
+    }
+
+    /**
      * Add a validation to this {@link FeaturesCapable}.
      * @param validation to add
      */

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java?rev=999727&r1=999726&r2=999727&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java
Wed Sep 22 02:29:50 2010
@@ -20,10 +20,12 @@ package org.apache.bval.jsr303.groups;
 
 import javax.validation.groups.Default;
 
+import org.apache.commons.lang.ObjectUtils;
+
 /**
  * Immutable object that wraps an interface representing a single group.
  */
-public class Group {
+public final class Group {
     /**
      * the Default Group
      */
@@ -69,11 +71,8 @@ public class Group {
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-
-        Group group1 = (Group) o;
-
-        return !(group != null ? !group.equals(group1.group) : group1.group != null);
+        if (o instanceof Group == false) return false;
+        return ObjectUtils.equals(group, ((Group) o).group);
     }
 
     /**



Mime
View raw message