commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1681434 - in /commons/proper/collections/trunk: ./ src/changes/ src/main/java/org/apache/commons/collections4/iterators/ src/main/java/org/apache/commons/collections4/list/
Date Sun, 24 May 2015 10:49:59 GMT
Author: tn
Date: Sun May 24 10:49:58 2015
New Revision: 1681434

URL: http://svn.apache.org/r1681434
Log:
[COLLECTIONS-562] Upgrade minimum java requirement to Java 6. Replace ArrayStack with ArrayDeque.

Modified:
    commons/proper/collections/trunk/pom.xml
    commons/proper/collections/trunk/src/changes/changes.xml
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/TreeList.java

Modified: commons/proper/collections/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/pom.xml?rev=1681434&r1=1681433&r2=1681434&view=diff
==============================================================================
--- commons/proper/collections/trunk/pom.xml (original)
+++ commons/proper/collections/trunk/pom.xml Sun May 24 10:49:58 2015
@@ -460,8 +460,8 @@
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-    <maven.compiler.source>1.5</maven.compiler.source>
-    <maven.compiler.target>1.5</maven.compiler.target>
+    <maven.compiler.source>1.6</maven.compiler.source>
+    <maven.compiler.target>1.6</maven.compiler.target>
 
     <!--
        This is also  used to generate download_xxx file name.

Modified: commons/proper/collections/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/changes/changes.xml?rev=1681434&r1=1681433&r2=1681434&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/changes/changes.xml (original)
+++ commons/proper/collections/trunk/src/changes/changes.xml Sun May 24 10:49:58 2015
@@ -22,6 +22,9 @@
   <body>
 
   <release version="4.1" date="TBD" description="">
+    <action issue="COLLECTIONS-562" dev="tn" type="update">
+      Upgraded minimum java requirement to Java 6 (up from Java 5).
+    </action>
     <action issue="COLLECTIONS-395" dev="tn" type="add" due-to="David Hawthorne">
       Added method "LRUMap#get(Object, boolean)" that allows to query the map
       without affecting the least recently used order.

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java?rev=1681434&r1=1681433&r2=1681434&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java
Sun May 24 10:49:58 2015
@@ -16,10 +16,11 @@
  */
 package org.apache.commons.collections4.iterators;
 
+import java.util.ArrayDeque;
+import java.util.Deque;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
-import org.apache.commons.collections4.ArrayStack;
 import org.apache.commons.collections4.Transformer;
 
 /**
@@ -73,11 +74,10 @@ import org.apache.commons.collections4.T
  * @since 3.1
  * @version $Id$
  */
-@SuppressWarnings("deprecation") // we use the deprecated ArrayStack - change to ArrayDeque
(Java 1.6)
 public class ObjectGraphIterator<E> implements Iterator<E> {
 
     /** The stack of iterators */
-    private final ArrayStack<Iterator<? extends E>> stack = new ArrayStack<Iterator<?
extends E>>(8);
+    private final Deque<Iterator<? extends E>> stack = new ArrayDeque<Iterator<?
extends E>>(8);
     /** The root object in the tree */
     private E root;
     /** The transformer to use */

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java?rev=1681434&r1=1681433&r2=1681434&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
Sun May 24 10:49:58 2015
@@ -17,10 +17,10 @@
  */
 package org.apache.commons.collections4.iterators;
 
+import java.util.ArrayDeque;
+import java.util.Deque;
 import java.util.Iterator;
 
-import org.apache.commons.collections4.ArrayStack;
-
 /**
  * Decorates an iterator to support pushback of elements.
  * <p>
@@ -33,14 +33,13 @@ import org.apache.commons.collections4.A
  * @since 4.0
  * @version $Id$
  */
-@SuppressWarnings("deprecation") // replace ArrayStack with ArrayDeque when moving to Java
6
 public class PushbackIterator<E> implements Iterator<E> {
 
     /** The iterator being decorated. */
     private final Iterator<? extends E> iterator;
 
     /** The LIFO queue containing the pushed back items. */
-    private ArrayStack<E> items = new ArrayStack<E>();
+    private Deque<E> items = new ArrayDeque<E>();
 
     //-----------------------------------------------------------------------
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/TreeList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/TreeList.java?rev=1681434&r1=1681433&r2=1681434&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/TreeList.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/TreeList.java
Sun May 24 10:49:58 2015
@@ -17,13 +17,14 @@
 package org.apache.commons.collections4.list;
 
 import java.util.AbstractList;
+import java.util.ArrayDeque;
 import java.util.Collection;
 import java.util.ConcurrentModificationException;
+import java.util.Deque;
 import java.util.Iterator;
 import java.util.ListIterator;
 import java.util.NoSuchElementException;
 
-import org.apache.commons.collections4.ArrayStack;
 import org.apache.commons.collections4.OrderedIterator;
 
 /**
@@ -54,7 +55,6 @@ import org.apache.commons.collections4.O
  * @since 3.1
  * @version $Id$
  */
-@SuppressWarnings("deprecation") // replace ArrayStack by ArrayDeque when moving to Java
1.6
 public class TreeList<E> extends AbstractList<E> {
 //    add; toArray; iterator; insert; get; indexOf; remove
 //    TreeList = 1260;7360;3080;  160;   170;3400;  170;
@@ -828,7 +828,7 @@ public class TreeList<E> extends Abstrac
                 // find a subtree, s, that is no taller than me. (While we are
                 // navigating left, we store the nodes we encounter in a stack
                 // so that we can re-balance them in step 4.)
-                final ArrayStack<AVLNode<E>> sAncestors = new ArrayStack<AVLNode<E>>();
+                final Deque<AVLNode<E>> sAncestors = new ArrayDeque<AVLNode<E>>();
                 AVLNode<E> s = otherTree;
                 int sAbsolutePosition = s.relativePosition + currentSize;
                 int sParentAbsolutePosition = 0;
@@ -868,7 +868,7 @@ public class TreeList<E> extends Abstrac
             }
             otherTree = otherTree.removeMin();
 
-            final ArrayStack<AVLNode<E>> sAncestors = new ArrayStack<AVLNode<E>>();
+            final Deque<AVLNode<E>> sAncestors = new ArrayDeque<AVLNode<E>>();
             AVLNode<E> s = this;
             int sAbsolutePosition = s.relativePosition;
             int sParentAbsolutePosition = 0;



Mime
View raw message