incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r929551 - in /incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions: MethodBeanDescriptor.java MethodBeanDescriptorImpl.java
Date Wed, 31 Mar 2010 14:42:29 GMT
Author: simonetripodi
Date: Wed Mar 31 14:42:29 2010
New Revision: 929551

URL: http://svn.apache.org/viewvc?rev=929551&view=rev
Log:
fixed generics warning
fixed unknown bug: getConstrainedConstructors() returned methodConstraints instead of constructorConstraints!!!

Modified:
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/MethodBeanDescriptor.java
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/MethodBeanDescriptorImpl.java

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/MethodBeanDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/MethodBeanDescriptor.java?rev=929551&r1=929550&r2=929551&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/MethodBeanDescriptor.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/MethodBeanDescriptor.java
Wed Mar 31 14:42:29 2010
@@ -32,7 +32,7 @@ import java.util.Set;
 public interface MethodBeanDescriptor extends BeanDescriptor {
     MethodDescriptor getConstraintsForMethod(Method method);
 
-    ConstructorDescriptor getConstraintsForConstructor(Constructor constructor);
+    ConstructorDescriptor getConstraintsForConstructor(Constructor<?> constructor);
 
     Set<MethodDescriptor> getConstrainedMethods();
 

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/MethodBeanDescriptorImpl.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/MethodBeanDescriptorImpl.java?rev=929551&r1=929550&r2=929551&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/MethodBeanDescriptorImpl.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/MethodBeanDescriptorImpl.java
Wed Mar 31 14:42:29 2010
@@ -38,7 +38,7 @@ import org.apache.bval.model.Validation;
 class MethodBeanDescriptorImpl extends BeanDescriptorImpl
       implements MethodBeanDescriptor {
     private Map<Method, MethodDescriptorImpl> methodConstraints;
-    private Map<Constructor, ConstructorDescriptorImpl> constructorConstraints;
+    private Map<Constructor<?>, ConstructorDescriptor> constructorConstraints;
 
     protected MethodBeanDescriptorImpl(ApacheFactoryContext factoryContext,
                                        MetaBean metaBean, Validation[] validations) {
@@ -50,7 +50,7 @@ class MethodBeanDescriptorImpl extends B
     }
 
     public void setConstructorConstraints(
-          Map<Constructor, ConstructorDescriptorImpl> constructorConstraints) {
+          Map<Constructor<?>, ConstructorDescriptor> constructorConstraints)
{
         this.constructorConstraints = constructorConstraints;
     }
 
@@ -58,12 +58,12 @@ class MethodBeanDescriptorImpl extends B
         return methodConstraints.get(method);
     }
 
-    public ConstructorDescriptor getConstraintsForConstructor(Constructor constructor) {
+    public ConstructorDescriptor getConstraintsForConstructor(Constructor<?> constructor)
{
         return constructorConstraints.get(constructor);
     }
 
     public Set<MethodDescriptor> getConstrainedMethods() {
-        return new HashSet(methodConstraints.values());
+        return new HashSet<MethodDescriptor>(methodConstraints.values());
     }
 
     public void putMethodDescriptor(Method method, MethodDescriptorImpl desc) {
@@ -71,10 +71,10 @@ class MethodBeanDescriptorImpl extends B
     }
 
     public Set<ConstructorDescriptor> getConstrainedConstructors() {
-        return new HashSet(methodConstraints.values());
+        return new HashSet<ConstructorDescriptor>(this.constructorConstraints.values());
     }
 
-    public void putConstructorDescriptor(Constructor cons, ConstructorDescriptorImpl desc)
{
+    public void putConstructorDescriptor(Constructor<?> cons, ConstructorDescriptorImpl
desc) {
         constructorConstraints.put(cons, desc);
     }
 
@@ -82,7 +82,7 @@ class MethodBeanDescriptorImpl extends B
         return methodConstraints;
     }
 
-    public Map<Constructor, ConstructorDescriptorImpl> getConstructorConstraints()
{
+    public Map<Constructor<?>, ConstructorDescriptor> getConstructorConstraints()
{
         return constructorConstraints;
     }
 }



Mime
View raw message