commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1021575 - in /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl: CursorableLinkedList.java SoftReferenceObjectPool.java StackKeyedObjectPool.java StackObjectPool.java
Date Tue, 12 Oct 2010 01:38:58 GMT
Author: sebb
Date: Tue Oct 12 01:38:57 2010
New Revision: 1021575

URL: http://svn.apache.org/viewvc?rev=1021575&view=rev
Log:
Missing @Override

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/CursorableLinkedList.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/CursorableLinkedList.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/CursorableLinkedList.java?rev=1021575&r1=1021574&r2=1021575&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/CursorableLinkedList.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/CursorableLinkedList.java
Tue Oct 12 01:38:57 2010
@@ -319,6 +319,7 @@ class CursorableLinkedList<T> implements
      * @param o the object to be compared for equality with this list.
      * @return <tt>true</tt> if the specified object is equal to this list.
      */
+    @Override
     public boolean equals(Object o) {
         if(o == this) {
             return true;
@@ -390,6 +391,7 @@ class CursorableLinkedList<T> implements
      * @see Object#equals(Object)
      * @see #equals(Object)
      */
+    @Override
     public int hashCode() {
         int hash = 1;
         for(Listable elt = _head.next(), past = null; null != elt && past != _head.prev();
elt = (past = elt).next()) {
@@ -695,6 +697,7 @@ class CursorableLinkedList<T> implements
      * Returns a {@link String} representation of this list, suitable for debugging.
      * @return a {@link String} representation of this list, suitable for debugging.
      */
+    @Override
     public String toString() {
         StringBuffer buf = new StringBuffer();
         buf.append("[");
@@ -1121,14 +1124,17 @@ class CursorableLinkedList<T> implements
             registerCursor(this);
         }
 
+        @Override
         public int previousIndex() {
             throw new UnsupportedOperationException();
         }
 
+        @Override
         public int nextIndex() {
             throw new UnsupportedOperationException();
         }
 
+        @Override
         public void add(T o) {
             checkForComod();
             Listable elt = insertListable(_cur.prev(),_cur.next(),o);
@@ -1175,6 +1181,7 @@ class CursorableLinkedList<T> implements
             }
         }
 
+        @Override
         protected void checkForComod() {
             if(!_valid) {
                 throw new ConcurrentModificationException();
@@ -1238,6 +1245,7 @@ class CursorableSubList<V> extends Curso
 
     //--- public methods ------------------------------------------
 
+    @Override
     public void clear() {
         checkForComod();
         Iterator<V> it = iterator();
@@ -1247,151 +1255,181 @@ class CursorableSubList<V> extends Curso
         }
     }
 
+    @Override
     public Iterator<V> iterator() {
         checkForComod();
         return super.iterator();
     }
 
+    @Override
     public int size() {
         checkForComod();
         return super.size();
     }
 
+    @Override
     public boolean isEmpty() {
         checkForComod();
         return super.isEmpty();
     }
 
+    @Override
     public Object[] toArray() {
         checkForComod();
         return super.toArray();
     }
 
+    @Override
     public <E> E[] toArray(E a[]) {
         checkForComod();
         return super.toArray(a);
     }
 
+    @Override
     public boolean contains(Object o) {
         checkForComod();
         return super.contains(o);
     }
 
+    @Override
     public boolean remove(Object o) {
         checkForComod();
         return super.remove(o);
     }
 
+    @Override
     public V removeFirst() {
         checkForComod();
         return super.removeFirst();
     }
 
+    @Override
     public V removeLast() {
         checkForComod();
         return super.removeLast();
     }
 
+    @Override
     public boolean addAll(Collection<? extends V> c) {
         checkForComod();
         return super.addAll(c);
     }
 
+    @Override
     public boolean add(V o) {
         checkForComod();
         return super.add(o);
     }
 
+    @Override
     public boolean addFirst(V o) {
         checkForComod();
         return super.addFirst(o);
     }
 
+    @Override
     public boolean addLast(V o) {
         checkForComod();
         return super.addLast(o);
     }
 
+    @Override
     public boolean removeAll(Collection<?> c) {
         checkForComod();
         return super.removeAll(c);
     }
 
+    @Override
     public boolean containsAll(Collection<?> c) {
         checkForComod();
         return super.containsAll(c);
     }
 
+    @Override
     public boolean addAll(int index, Collection<? extends V> c) {
         checkForComod();
         return super.addAll(index,c);
     }
 
+    @Override
     public int hashCode() {
         checkForComod();
         return super.hashCode();
     }
 
+    @Override
     public boolean retainAll(Collection<?> c) {
         checkForComod();
         return super.retainAll(c);
     }
 
+    @Override
     public V set(int index, V element) {
         checkForComod();
         return super.set(index,element);
     }
 
+    @Override
     public boolean equals(Object o) {
         checkForComod();
         return super.equals(o);
     }
 
+    @Override
     public V get(int index) {
         checkForComod();
         return super.get(index);
     }
 
+    @Override
     public Object getFirst() {
         checkForComod();
         return super.getFirst();
     }
 
+    @Override
     public Object getLast() {
         checkForComod();
         return super.getLast();
     }
 
+    @Override
     public void add(int index, V element) {
         checkForComod();
         super.add(index,element);
     }
 
+    @Override
     public ListIterator<V> listIterator(int index) {
         checkForComod();
         return super.listIterator(index);
     }
 
+    @Override
     public V remove(int index) {
         checkForComod();
         return super.remove(index);
     }
 
+    @Override
     public int indexOf(Object o) {
         checkForComod();
         return super.indexOf(o);
     }
 
+    @Override
     public int lastIndexOf(Object o) {
         checkForComod();
         return super.lastIndexOf(o);
     }
 
+    @Override
     public ListIterator<V> listIterator() {
         checkForComod();
         return super.listIterator();
     }
 
+    @Override
     public List<V> subList(int fromIndex, int toIndex) {
         checkForComod();
         return super.subList(fromIndex,toIndex);
@@ -1406,6 +1444,7 @@ class CursorableSubList<V> extends Curso
      *
      * @return the newly created {@link CursorableLinkedList.Listable}
      */
+    @Override
     protected Listable insertListable(Listable before, Listable after, V value) {
         _modCount++;
         _size++;
@@ -1427,6 +1466,7 @@ class CursorableSubList<V> extends Curso
     /**
      * Removes the given {@link CursorableLinkedList.Listable} from my list.
      */
+    @Override
     protected void removeListable(Listable elt) {
         _modCount++;
         _size--;

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java?rev=1021575&r1=1021574&r2=1021575&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java
Tue Oct 12 01:38:57 2010
@@ -104,6 +104,7 @@ public class SoftReferenceObjectPool<T> 
      * @throws Exception if an exception occurs creating a new instance
      * @return a valid, activated object instance
      */
+    @Override
     public synchronized T borrowObject() throws Exception {
         assertOpen();
         T obj = null;
@@ -163,6 +164,7 @@ public class SoftReferenceObjectPool<T> 
      * 
      * @param obj instance to return to the pool
      */
+    @Override
     public synchronized void returnObject(T obj) throws Exception {
         boolean success = !isClosed();
         if (_factory != null) {
@@ -196,6 +198,7 @@ public class SoftReferenceObjectPool<T> 
     /**
      * {@inheritDoc}
      */
+    @Override
     public synchronized void invalidateObject(T obj) throws Exception {
         _numActive--;
         if (_factory != null) {
@@ -218,6 +221,7 @@ public class SoftReferenceObjectPool<T> 
      * @throws IllegalStateException if invoked on a {@link #close() closed} pool
      * @throws Exception when the {@link #getFactory() factory} has a problem creating or
passivating an object.
      */
+    @Override
     public synchronized void addObject() throws Exception {
         assertOpen();
         if (_factory == null) {
@@ -252,6 +256,7 @@ public class SoftReferenceObjectPool<T> 
      * 
      * @return estimated number of idle instances in the pool
      */
+    @Override
     public synchronized int getNumIdle() {
         pruneClearedReferences();
         return _pool.size();
@@ -262,6 +267,7 @@ public class SoftReferenceObjectPool<T> 
      *
      * @return the number of instances currently borrowed from this pool
      */
+    @Override
     public synchronized int getNumActive() {
         return _numActive;
     }
@@ -269,6 +275,7 @@ public class SoftReferenceObjectPool<T> 
     /**
      * Clears any objects sitting idle in the pool.
      */
+    @Override
     public synchronized void clear() {
         if(null != _factory) {
             Iterator<SoftReference<T>> iter = _pool.iterator();
@@ -297,6 +304,7 @@ public class SoftReferenceObjectPool<T> 
      *
      * @throws Exception never - exceptions clearing the pool are swallowed
      */
+    @Override
     public void close() throws Exception {
         super.close();
         clear();
@@ -312,6 +320,7 @@ public class SoftReferenceObjectPool<T> 
      * @throws IllegalStateException when the factory cannot be set at this time
      * @deprecated to be removed in pool 2.0
      */
+    @Override
     public synchronized void setFactory(PoolableObjectFactory<T> factory) throws IllegalStateException
{
         assertOpen();
         if(0 < getNumActive()) {

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java?rev=1021575&r1=1021574&r2=1021575&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java
Tue Oct 12 01:38:57 2010
@@ -140,6 +140,7 @@ public class StackKeyedObjectPool<K,V> e
      * @param key the pool key
      * @return keyed poolable object instance
      */
+    @Override
     public synchronized V borrowObject(K key) throws Exception {
         assertOpen();
         Stack<V> stack = _pools.get(key);
@@ -199,6 +200,7 @@ public class StackKeyedObjectPool<K,V> e
      * @param key the pool key
      * @param obj returning instance
      */
+    @Override
     public synchronized void returnObject(K key, V obj) throws Exception {
         decrementActiveCount(key);
         if (null != _factory) {
@@ -255,6 +257,7 @@ public class StackKeyedObjectPool<K,V> e
     /**
      * {@inheritDoc}
      */
+    @Override
     public synchronized void invalidateObject(K key, V obj) throws Exception {
         decrementActiveCount(key);
         if(null != _factory) {
@@ -272,6 +275,7 @@ public class StackKeyedObjectPool<K,V> e
      * @throws Exception when {@link KeyedPoolableObjectFactory#makeObject} fails.
      * @throws IllegalStateException when no {@link #setFactory factory} has been set or
after {@link #close} has been called on this pool.
      */
+    @Override
     public synchronized void addObject(K key) throws Exception {
         assertOpen();
         if (_factory == null) {
@@ -327,6 +331,7 @@ public class StackKeyedObjectPool<K,V> e
      *
      * @return the total number of instances currently idle in this pool
      */
+    @Override
     public synchronized int getNumIdle() {
         return _totIdle;
     }
@@ -336,6 +341,7 @@ public class StackKeyedObjectPool<K,V> e
      *
      * @return the total number of instances currently borrowed from this pool
      */
+    @Override
     public synchronized int getNumActive() {
         return _totActive;
     }
@@ -347,6 +353,7 @@ public class StackKeyedObjectPool<K,V> e
      * @param key the key to query
      * @return the number of instances corresponding to the given <code>key</code>
currently borrowed in this pool
      */
+    @Override
     public synchronized int getNumActive(K key) {
         return getActiveCount(key);
     }
@@ -357,6 +364,7 @@ public class StackKeyedObjectPool<K,V> e
      * @param key the key to query
      * @return the number of instances corresponding to the given <code>key</code>
currently idle in this pool
      */
+    @Override
     public synchronized int getNumIdle(K key) {
         try {
             return _pools.get(key).size();
@@ -368,6 +376,7 @@ public class StackKeyedObjectPool<K,V> e
     /**
      * Clears the pool, removing all pooled instances.
      */
+    @Override
     public synchronized void clear() {
         Iterator<K> it = _pools.keySet().iterator();
         while(it.hasNext()) {
@@ -385,6 +394,7 @@ public class StackKeyedObjectPool<K,V> e
      *
      * @param key the key to clear
      */
+    @Override
     public synchronized void clear(K key) {
         Stack<V> stack = _pools.remove(key);
         destroyStack(key,stack);
@@ -422,6 +432,7 @@ public class StackKeyedObjectPool<K,V> e
      * 
      * @return Keys and pool sizes
      */
+    @Override
     public synchronized String toString() {
         StringBuffer buf = new StringBuffer();
         buf.append(getClass().getName());
@@ -445,6 +456,7 @@ public class StackKeyedObjectPool<K,V> e
      *
      * @throws Exception <strong>deprecated</strong>: implementations should
silently fail if not all resources can be freed.
      */
+    @Override
     public void close() throws Exception {
         super.close();
         clear();
@@ -460,6 +472,7 @@ public class StackKeyedObjectPool<K,V> e
      * @throws IllegalStateException when the factory cannot be set at this time
      * @deprecated to be removed in pool 2.0
      */
+    @Override
     public synchronized void setFactory(KeyedPoolableObjectFactory<K,V> factory) throws
IllegalStateException {
         if(0 < getNumActive()) {
             throw new IllegalStateException("Objects are already active");

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java?rev=1021575&r1=1021574&r2=1021575&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java Tue
Oct 12 01:38:57 2010
@@ -156,6 +156,7 @@ public class StackObjectPool<T> extends 
      * 
      * @return an instance from the pool
      */
+    @Override
     public synchronized T borrowObject() throws Exception {
         assertOpen();
         T obj = null;
@@ -218,6 +219,7 @@ public class StackObjectPool<T> extends 
      * 
      * @param obj instance to return to the pool
      */
+    @Override
     public synchronized void returnObject(T obj) throws Exception {
         boolean success = !isClosed();
         if(null != _factory) {
@@ -258,6 +260,7 @@ public class StackObjectPool<T> extends 
     /**
      * {@inheritDoc}
      */
+    @Override
     public synchronized void invalidateObject(T obj) throws Exception {
         _numActive--;
         if (null != _factory) {
@@ -272,6 +275,7 @@ public class StackObjectPool<T> extends 
      *
      * @return the number of instances currently idle in this pool
      */
+    @Override
     public synchronized int getNumIdle() {
         return _pool.size();
     }
@@ -281,6 +285,7 @@ public class StackObjectPool<T> extends 
      *
      * @return the number of instances currently borrowed from this pool
      */
+    @Override
     public synchronized int getNumActive() {
         return _numActive;
     }
@@ -289,6 +294,7 @@ public class StackObjectPool<T> extends 
      * Clears any objects sitting idle in the pool. Silently swallows any
      * exceptions thrown by {@link PoolableObjectFactory#destroyObject(Object)}.
      */
+    @Override
     public synchronized void clear() {
         if(null != _factory) {
             Iterator<T> it = _pool.iterator();
@@ -313,6 +319,7 @@ public class StackObjectPool<T> extends 
      *
      * @throws Exception never - exceptions clearing the pool are swallowed
      */
+    @Override
     public void close() throws Exception {
         super.close();
         clear();
@@ -336,6 +343,7 @@ public class StackObjectPool<T> extends 
      * 
      * @throws Exception when the {@link #getFactory() factory} has a problem creating or
passivating an object.
      */
+    @Override
     public synchronized void addObject() throws Exception {
         assertOpen();
         if (_factory == null) {
@@ -382,6 +390,7 @@ public class StackObjectPool<T> extends 
      * @throws IllegalStateException when the factory cannot be set at this time
      * @deprecated to be removed in pool 2.0
      */
+    @Override
     public synchronized void setFactory(PoolableObjectFactory<T> factory) throws IllegalStateException
{
         assertOpen();
         if(0 < getNumActive()) {



Mime
View raw message