sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1809637 - in /sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis: util/collection/RangeSet.java util/iso/TypeNames.java xml/Pooled.java
Date Mon, 25 Sep 2017 15:25:44 GMT
Author: desruisseaux
Date: Mon Sep 25 15:25:43 2017
New Revision: 1809637

URL: http://svn.apache.org/viewvc?rev=1809637&view=rev
Log:
Minor code cleaning submitted by Michael Hausegger on https://github.com/apache/sis/pull/3

Modified:
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/TypeNames.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java?rev=1809637&r1=1809636&r2=1809637&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
[UTF-8] Mon Sep 25 15:25:43 2017
@@ -1133,10 +1133,8 @@ public class RangeSet<E extends Comparab
             if (object instanceof Range<?>) {
                 @SuppressWarnings("unchecked")              // Type will actally be checked
on the line after.
                 final Range<E> range = (Range<E>) object;
-                if (range.getElementType() == elementType) {
-                    if (!subRange.contains(range)) {
-                        return false;
-                    }
+                if (range.getElementType() == elementType && !subRange.contains(range))
{
+                    return false;
                 }
             }
             return RangeSet.this.contains(object);

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/TypeNames.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/TypeNames.java?rev=1809637&r1=1809636&r2=1809637&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/TypeNames.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/TypeNames.java
[UTF-8] Mon Sep 25 15:25:43 2017
@@ -67,7 +67,7 @@ final class TypeNames {
         m.put("Real",            Double.class);
         m.put("Decimal",         Double.class);
         m.put("Integer",         Integer.class);
-    };
+    }
 
     /**
      * The "OGC" namespace.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java?rev=1809637&r1=1809636&r2=1809637&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java [UTF-8]
(original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java [UTF-8]
Mon Sep 25 15:25:43 2017
@@ -399,11 +399,9 @@ abstract class Pooled {
         if (internal) {
             name = Implementation.toInternal(name);
         }
-        if (!initialProperties.containsKey(name)) {
-            if (initialProperties.put(name, getStandardProperty(name)) != null) {
-                // Should never happen, unless on concurrent changes in a backgroung thread.
-                throw new ConcurrentModificationException(name);
-            }
+        if (!initialProperties.containsKey(name) && initialProperties.put(name, getStandardProperty(name))
!= null) {
+            // Should never happen, unless on concurrent changes in a backgroung thread.
+            throw new ConcurrentModificationException(name);
         }
         setStandardProperty(name, value);
     }



Mime
View raw message