sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1591979 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/metadata/ sis-referencing/src/main/java/org/apache/sis/referencing/ sis-utility/src/main/java/org/apache/sis/util/collection/
Date Fri, 02 May 2014 17:29:48 GMT
Author: desruisseaux
Date: Fri May  2 17:29:47 2014
New Revision: 1591979

URL: http://svn.apache.org/r1591979
Log:
Minor JDK 8 specific change: inherit Iterator.remove() implementation when appropriate.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyMap.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/CacheEntries.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedIterator.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyMap.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyMap.java?rev=1591979&r1=1591978&r2=1591979&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyMap.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyMap.java
[UTF-8] Fri May  2 17:29:47 2014
@@ -135,13 +135,10 @@ abstract class PropertyMap<V> extends Ab
             return index < accessor.count();
         }
 
-        /**
-         * Assumes that the underlying map is unmodifiable.
+        /*
+         * remove() is an unsupported operation since we assume that the underlying map is
unmodifiable.
+         * So we inherit the default implementation from Iterator.
          */
-        @Override
-        public final void remove() {
-            throw new UnsupportedOperationException();
-        }
     }
 
 

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java?rev=1591979&r1=1591978&r2=1591979&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java
[UTF-8] Fri May  2 17:29:47 2014
@@ -86,13 +86,10 @@ final class NameIterator implements Iter
         return n;
     }
 
-    /**
-     * Unsupported operation since this iterator is read-only.
+    /*
+     * remove() is an unsupported operation since this iterator is read-only.
+     * So we inherit the default implementation from Iterator.
      */
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException();
-    }
 
     /**
      * Returns the number of name and aliases in the given object.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java?rev=1591979&r1=1591978&r2=1591979&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java
[UTF-8] Fri May  2 17:29:47 2014
@@ -319,12 +319,9 @@ final class Properties extends AbstractM
             throw new NoSuchElementException();
         }
 
-        /**
-         * Unsupported operation, since this map is read-only.
+        /*
+         * remove() is an unsupported operation since this map is read-only.
+         * So we inherit the default implementation from Iterator.
          */
-        @Override
-        public void remove() {
-            throw new UnsupportedOperationException();
-        }
     }
 }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/CacheEntries.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/CacheEntries.java?rev=1591979&r1=1591978&r2=1591979&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/CacheEntries.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/CacheEntries.java
[UTF-8] Fri May  2 17:29:47 2014
@@ -150,13 +150,9 @@ final class CacheEntries<K,V> extends Ab
             throw new NoSuchElementException();
         }
 
-        /**
-         * Unsupported operation, because the wrapped iterator is not after the proper element
-         * (it is after the next one).
+        /*
+         * remove() is an unsupported operation because the wrapped iterator is not after
the proper element
+         * (it is after the next one). So we inherit the default implementation from Iterator.
          */
-        @Override
-        public void remove() {
-            throw new UnsupportedOperationException();
-        }
     }
 }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedIterator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedIterator.java?rev=1591979&r1=1591978&r2=1591979&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedIterator.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedIterator.java
[UTF-8] Fri May  2 17:29:47 2014
@@ -88,8 +88,7 @@ final class DerivedIterator<S,E> impleme
     /**
      * Removes from the underlying set the last element returned by the iterator.
      *
-     * @throws UnsupportedOperationException if the underlying collection doesn't supports
the
-     * {@code remove} operation.
+     * @throws UnsupportedOperationException if the underlying collection doesn't supports
the {@code remove} operation.
      */
     @Override
     public void remove() {



Mime
View raw message