commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nutty...@apache.org
Subject svn commit: r562621 - in /commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util: BlockingQueueFactory.java QueueFactory.java
Date Fri, 03 Aug 2007 23:56:32 GMT
Author: nuttycom
Date: Fri Aug  3 16:56:31 2007
New Revision: 562621

URL: http://svn.apache.org/viewvc?view=rev&rev=562621
Log:
Fixed missing generics

Modified:
    commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util/BlockingQueueFactory.java
    commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util/QueueFactory.java

Modified: commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util/BlockingQueueFactory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util/BlockingQueueFactory.java?view=diff&rev=562621&r1=562620&r2=562621
==============================================================================
--- commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util/BlockingQueueFactory.java
(original)
+++ commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util/BlockingQueueFactory.java
Fri Aug  3 16:56:31 2007
@@ -28,6 +28,8 @@
 import java.util.concurrent.PriorityBlockingQueue;
 import java.util.concurrent.SynchronousQueue;
 
+import org.apache.commons.pipeline.StageDriver;
+
 /**
  * Many {@link StageDriver} implementations require for one or more queues
  * to be created. This interface provides a consistent API for factories used
@@ -39,7 +41,7 @@
     public static class ArrayBlockingQueueFactory<T> extends AbstractQueueFactory<T>
implements BlockingQueueFactory<T> {
         public ArrayBlockingQueue<T> createQueue() {
             if (this.initialContents == null || this.initialContents.isEmpty()) {
-                return new ArrayBlockingQueue(this.capacity, this.fair);
+                return new ArrayBlockingQueue<T>(this.capacity, this.fair);
             } else {
                 if (this.initialContents.size() > this.capacity) {
                     throw new IllegalStateException("The number of elements in the initial
contents of the queue to be created exceeds its capacity.");
@@ -151,7 +153,7 @@
                     return new PriorityBlockingQueue<T>(this.initialContents);
                 }
             } else {
-                PriorityBlockingQueue queue = new PriorityBlockingQueue<T>(initialCapacity,
comparator);
+                PriorityBlockingQueue<T> queue = new PriorityBlockingQueue<T>(initialCapacity,
comparator);
                 if ( !(this.initialContents == null || this.initialContents.isEmpty()) )
{
                     queue.addAll(this.initialContents);
                 }

Modified: commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util/QueueFactory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util/QueueFactory.java?view=diff&rev=562621&r1=562620&r2=562621
==============================================================================
--- commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util/QueueFactory.java
(original)
+++ commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/util/QueueFactory.java
Fri Aug  3 16:56:31 2007
@@ -26,6 +26,8 @@
 import java.util.Queue;
 import java.util.concurrent.ConcurrentLinkedQueue;
 
+import org.apache.commons.pipeline.StageDriver;
+
 /**
  * Many {@link StageDriver} implementations require for one or more queues
  * to be created. This interface provides a consistent API for factories used
@@ -86,10 +88,10 @@
                 if (this.initialContents == null || this.initialContents.isEmpty()) {
                     return new PriorityQueue<T>(initialCapacity);
                 } else {
-                    return new PriorityQueue(this.initialContents);
+                    return new PriorityQueue<T>(this.initialContents);
                 }
             } else {
-                PriorityQueue queue = new PriorityQueue<T>(initialCapacity, comparator);
+                PriorityQueue<T> queue = new PriorityQueue<T>(initialCapacity,
comparator);
                 queue.addAll(this.initialContents);
                 return queue;
             }



Mime
View raw message