commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r802516 - /commons/sandbox/nabla/trunk/src/test/java/org/apache/commons/nabla/AbstractStaticFunctionsTest.java
Date Sun, 09 Aug 2009 11:09:16 GMT
Author: luc
Date: Sun Aug  9 11:09:16 2009
New Revision: 802516

URL: http://svn.apache.org/viewvc?rev=802516&view=rev
Log:
fixed findbugs warnings

Modified:
    commons/sandbox/nabla/trunk/src/test/java/org/apache/commons/nabla/AbstractStaticFunctionsTest.java

Modified: commons/sandbox/nabla/trunk/src/test/java/org/apache/commons/nabla/AbstractStaticFunctionsTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/nabla/trunk/src/test/java/org/apache/commons/nabla/AbstractStaticFunctionsTest.java?rev=802516&r1=802515&r2=802516&view=diff
==============================================================================
--- commons/sandbox/nabla/trunk/src/test/java/org/apache/commons/nabla/AbstractStaticFunctionsTest.java
(original)
+++ commons/sandbox/nabla/trunk/src/test/java/org/apache/commons/nabla/AbstractStaticFunctionsTest.java
Sun Aug  9 11:09:16 2009
@@ -211,7 +211,11 @@
                             }
                         }
                         return ((Double) javaMethod.invoke(null, changed)).doubleValue();
-                    } catch (Exception e) {
+                    } catch (IllegalArgumentException e) {
+                        return Double.NaN;
+                    } catch (IllegalAccessException e) {
+                        return Double.NaN;
+                    } catch (InvocationTargetException e) {
                         return Double.NaN;
                     }
                 }
@@ -241,9 +245,9 @@
             } else if (types[i].equals(Double.TYPE)) {
                 arguments[i] = new Double(values[i]);
             } else if (types[i].equals(Integer.TYPE)) {
-                arguments[i] = new Integer((int) values[i]);
+                arguments[i] = Integer.valueOf((int) values[i]);
             } else if (types[i].equals(Long.TYPE)) {
-                arguments[i] = new Long((long) values[i]);
+                arguments[i] = Long.valueOf((long) values[i]);
             }
         }
         return arguments;



Mime
View raw message