commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1735057 - in /commons/proper/pool/trunk/src: main/java/org/apache/commons/pool2/ main/java/org/apache/commons/pool2/impl/ test/java/org/apache/commons/pool2/impl/
Date Tue, 15 Mar 2016 11:16:14 GMT
Author: markt
Date: Tue Mar 15 11:16:13 2016
New Revision: 1735057

URL: http://svn.apache.org/viewvc?rev=1735057&view=rev
Log:
Fix various IDE warnings

Modified:
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObject.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObjectPool.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolConfig.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestPoolImplUtils.java

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObject.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObject.java?rev=1735057&r1=1735056&r2=1735057&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObject.java (original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObject.java Tue Mar
15 11:16:13 2016
@@ -18,7 +18,7 @@ package org.apache.commons.pool2;
 
 /**
  * A base class for common functionality.
- * 
+ *
  * @since 2.4.3
  */
 public abstract class BaseObject {
@@ -33,8 +33,13 @@ public abstract class BaseObject {
         return builder.toString();
     }
 
+    /**
+     * Used by sub-classes to include the fields defined by the sub-class in the
+     * {@link #toString()} output.
+     *
+     * @param builder Field names and values are appended to this object
+     */
     protected void toStringAppendFields(final StringBuilder builder) {
         // do nothing by default, needed for b/w compatibility.
     }
-
 }

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObjectPool.java?rev=1735057&r1=1735056&r2=1735057&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObjectPool.java (original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/BaseObjectPool.java Tue
Mar 15 11:16:13 2016
@@ -119,6 +119,7 @@ public abstract class BaseObjectPool<T>
 
     private volatile boolean closed = false;
 
+    @Override
     protected void toStringAppendFields(final StringBuilder builder) {
         builder.append("closed=");
         builder.append(closed);

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java?rev=1735057&r1=1735056&r2=1735057&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
Tue Mar 15 11:16:13 2016
@@ -1176,7 +1176,7 @@ public abstract class BaseGenericObjectP
         }
 
     }
-    
+
     /**
      * Wrapper for objects under management by the pool.
      *
@@ -1189,7 +1189,7 @@ public abstract class BaseGenericObjectP
     static class IdentityWrapper<T> {
         /** Wrapped object */
         private final T instance;
-        
+
         /**
          * Create a wrapper for an instance.
          *
@@ -1209,7 +1209,7 @@ public abstract class BaseGenericObjectP
         public boolean equals(final Object other) {
             return ((IdentityWrapper) other).instance == instance;
         }
-        
+
         /**
          * @return the wrapped object
          */
@@ -1227,6 +1227,7 @@ public abstract class BaseGenericObjectP
         }
     }
 
+    @Override
     protected void toStringAppendFields(final StringBuilder builder) {
         builder.append("maxTotal=");
         builder.append(maxTotal);

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java?rev=1735057&r1=1735056&r2=1735057&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java
Tue Mar 15 11:16:13 2016
@@ -640,6 +640,7 @@ public abstract class BaseObjectPoolConf
         this.jmxNamePrefix = jmxNamePrefix;
     }
 
+    @Override
     protected void toStringAppendFields(final StringBuilder builder) {
         builder.append("lifo=");
         builder.append(lifo);

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolConfig.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolConfig.java?rev=1735057&r1=1735056&r2=1735057&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolConfig.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolConfig.java
Tue Mar 15 11:16:13 2016
@@ -182,6 +182,7 @@ public class GenericKeyedObjectPoolConfi
         }
     }
 
+    @Override
     protected void toStringAppendFields(final StringBuilder builder) {
         super.toStringAppendFields(builder);
         builder.append(", minIdlePerKey=");

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java?rev=1735057&r1=1735056&r2=1735057&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java
Tue Mar 15 11:16:13 2016
@@ -27,7 +27,7 @@ import org.junit.Assert;
 import org.junit.Test;
 
 public class TestDefaultPooledObject {
-    
+
     /**
      * JIRA: POOL-279
      * @throws Exception
@@ -39,6 +39,7 @@ public class TestDefaultPooledObject {
         final ExecutorService executor = Executors.newFixedThreadPool(
                                       Runtime.getRuntime().availableProcessors()*3);
         final Runnable allocateAndDeallocateTask = new Runnable() {
+            @Override
             public void run() {
                 for (int i=0;i<10000;i++) {
                     if (dpo.getIdleTimeMillis() < 0) {
@@ -57,6 +58,7 @@ public class TestDefaultPooledObject {
             }
         };
         final Runnable getIdleTimeTask = new Runnable() {
+            @Override
             public void run() {
                 for (int i=0;i<10000;i++) {
                     if (dpo.getIdleTimeMillis() < 0) {

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestPoolImplUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestPoolImplUtils.java?rev=1735057&r1=1735056&r2=1735057&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestPoolImplUtils.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestPoolImplUtils.java
Tue Mar 15 11:16:13 2016
@@ -47,6 +47,7 @@ public class TestPoolImplUtils {
         }
     }
 
+    @SuppressWarnings("unused")
     private abstract static class FactoryAB<A,B>
             extends BasePooledObjectFactory<B> {
     }
@@ -57,6 +58,7 @@ public class TestPoolImplUtils {
     private abstract static class FactoryC<C> extends FactoryBA<C, String> {
     }
 
+    @SuppressWarnings("unused")
     private abstract static class FactoryDE<D,E> extends FactoryC<D>{
     }
 



Mime
View raw message