bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r954574 - in /incubator/bval/trunk/bval-core/src/main/java/org/apache/bval: model/MetaProperty.java util/BeanValidationVersion.java util/PrivilegedActions.java xml/XMLMetaValidator.java
Date Mon, 14 Jun 2010 18:04:52 GMT
Author: dwoods
Date: Mon Jun 14 18:04:52 2010
New Revision: 954574

URL: http://svn.apache.org/viewvc?rev=954574&view=rev
Log:
BVAL-68 Remove 4 findbugs hits

Modified:
    incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java
    incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/util/BeanValidationVersion.java
    incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/util/PrivilegedActions.java
    incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/xml/XMLMetaValidator.java

Modified: incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java?rev=954574&r1=954573&r2=954574&view=diff
==============================================================================
--- incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java (original)
+++ incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/model/MetaProperty.java Mon
Jun 14 18:04:52 2010
@@ -108,6 +108,10 @@ public class MetaProperty extends Featur
         this.name = name;
     }
 
+    public MetaProperty clone() throws CloneNotSupportedException {
+        return (MetaProperty) super.clone();
+    }
+
     public String toString() {
         return "MetaProperty{" + "name='" + name + '\'' + ", type=" + type + '}';
     }

Modified: incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/util/BeanValidationVersion.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/util/BeanValidationVersion.java?rev=954574&r1=954573&r2=954574&view=diff
==============================================================================
--- incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/util/BeanValidationVersion.java
(original)
+++ incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/util/BeanValidationVersion.java
Mon Jun 14 18:04:52 2010
@@ -20,6 +20,7 @@ package org.apache.bval.util;
 
 import java.io.File;
 import java.io.InputStream;
+import java.io.IOException;
 import java.security.AccessController;
 import java.util.Properties;
 import java.util.StringTokenizer;
@@ -52,7 +53,7 @@ public class BeanValidationVersion {
                     in.close();
                 }
             }
-        } catch (Exception e) {
+        } catch (IOException ioe) {
         }
 
         String vers = revisionProps.getProperty("project.version");

Modified: incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/util/PrivilegedActions.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/util/PrivilegedActions.java?rev=954574&r1=954573&r2=954574&view=diff
==============================================================================
--- incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/util/PrivilegedActions.java
(original)
+++ incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/util/PrivilegedActions.java
Mon Jun 14 18:04:52 2010
@@ -164,10 +164,13 @@ public class PrivilegedActions {
           throws IllegalAccessException, InvocationTargetException {
         return run(new PrivilegedAction<Object>() {
             public Object run() {
-                Method valueMethod = null;
+                Method valueMethod;
                 try {
                     valueMethod = annotation.annotationType().getDeclaredMethod(name);
-                } catch (NoSuchMethodException ex) { /* do nothing */ }
+                } catch (NoSuchMethodException ex) {
+                    // do nothing
+                    valueMethod = null;
+                }
                 if (null != valueMethod) {
                     try {
                         valueMethod.setAccessible(true);

Modified: incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/xml/XMLMetaValidator.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/xml/XMLMetaValidator.java?rev=954574&r1=954573&r2=954574&view=diff
==============================================================================
--- incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/xml/XMLMetaValidator.java
(original)
+++ incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/xml/XMLMetaValidator.java
Mon Jun 14 18:04:52 2010
@@ -29,6 +29,10 @@ import org.apache.bval.model.Validation;
  */
 @XStreamAlias("validator")
 public class XMLMetaValidator implements Serializable {
+
+    @XStreamOmitField
+    private static final long serialVersionUID = 1L;
+
     @XStreamAsAttribute
     private String id;
     @XStreamAsAttribute
@@ -38,7 +42,7 @@ public class XMLMetaValidator implements
     private String jsFunction; // name of java script function
 
     @XStreamOmitField
-    private Validation validation;
+    private transient Validation validation;
 
     public String getId() {
         return id;



Mime
View raw message