sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1402460 - in /sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis: internal/jaxb/ measure/ util/collection/ util/resources/ util/type/
Date Fri, 26 Oct 2012 10:13:02 GMT
Author: desruisseaux
Date: Fri Oct 26 10:13:01 2012
New Revision: 1402460

URL: http://svn.apache.org/viewvc?rev=1402460&view=rev
Log:
Fixed some FindBugs warnings.

Modified:
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/WeakValueHashMap.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Loader.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/type/ResourceInternationalString.java

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java?rev=1402460&r1=1402459&r2=1402460&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
Fri Oct 26 10:13:01 2012
@@ -452,7 +452,7 @@ public class IdentifierMapAdapter extend
                             this.authority = authority;
                             return;
                         }
-                        if (state == Boolean.TRUE) {
+                        if (state) {
                             // Found a duplicated entry, and user asked for the
                             // removal of that authority.
                             it.remove();

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java?rev=1402460&r1=1402459&r2=1402460&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java Fri
Oct 26 10:13:01 2012
@@ -745,7 +745,7 @@ scan:   for (int i=0; i<length;) {
         if (maximumFractionDigits != minimumFractionDigits) {
             if      (secondsFieldWidth != 0) angle *= 3600;
             else if (minutesFieldWidth != 0) angle *=   60;
-            final int n = fractionDigitsForDelta(Math.ulp(angle));
+            final int n = fractionDigitsForDelta(Math.ulp(angle)) - 1;
             if (n < maximumFractionDigits) {
                 maximumFractionDigits = Math.max(minimumFractionDigits, n);
             }

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java?rev=1402460&r1=1402459&r2=1402460&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
Fri Oct 26 10:13:01 2012
@@ -519,7 +519,7 @@ public class Cache<K,V> extends Abstract
          * A calculation has already been completed. Returns a wrapper
          * which will just return the result without any processing.
          */
-        assert (value != null) && !isReservedType(value) : value;
+        assert !isReservedType(value) : value;
         @SuppressWarnings("unchecked")
         final V result = (V) value;
         return new Simple<>(result);

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java?rev=1402460&r1=1402459&r2=1402460&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
Fri Oct 26 10:13:01 2012
@@ -96,7 +96,7 @@ public class WeakHashSet<E> extends Abst
          */
         @Override
         public void dispose() {
-            clear();
+            super.clear();
             removeEntry(this);
         }
     }

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/WeakValueHashMap.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/WeakValueHashMap.java?rev=1402460&r1=1402459&r2=1402460&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/WeakValueHashMap.java
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/WeakValueHashMap.java
Fri Oct 26 10:13:01 2012
@@ -138,7 +138,7 @@ public class WeakValueHashMap<K,V> exten
          */
         @Override
         public void dispose() {
-            clear();
+            super.clear();
             removeEntry(this);
         }
 

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Loader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Loader.java?rev=1402460&r1=1402459&r2=1402460&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Loader.java
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Loader.java
Fri Oct 26 10:13:01 2012
@@ -20,7 +20,6 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Collections;
 import java.util.ResourceBundle;
-import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.io.IOException;
 import org.apache.sis.util.Exceptions;
@@ -123,7 +122,6 @@ final class Loader extends ResourceBundl
          *
          * Note: Do not call Constructor.setAccessible(true) - this is not allowed in Applet.
          */
-        final Constructor<?> c;
         try {
             return (ResourceBundle) classe.getDeclaredConstructor(String.class).newInstance(filename);
         } catch (NoSuchMethodException | InvocationTargetException e) {

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/type/ResourceInternationalString.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/type/ResourceInternationalString.java?rev=1402460&r1=1402459&r2=1402460&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/type/ResourceInternationalString.java
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/type/ResourceInternationalString.java
Fri Oct 26 10:13:01 2012
@@ -88,7 +88,7 @@ public class ResourceInternationalString
      * The class loader to use for loading the resources file, or {@code null} for the default
      * class loader.
      */
-    private final ClassLoader loader;
+    private final transient ClassLoader loader;
 
     /**
      * Creates a new international string from the specified resource bundle and key.



Mime
View raw message