commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1719104 - in /commons/proper/jcs/trunk/commons-jcs-core/src: main/java/org/apache/commons/jcs/auxiliary/ main/java/org/apache/commons/jcs/auxiliary/disk/ main/java/org/apache/commons/jcs/auxiliary/disk/indexed/ main/java/org/apache/commons...
Date Thu, 10 Dec 2015 16:15:26 GMT
Author: tv
Date: Thu Dec 10 16:15:25 2015
New Revision: 1719104

URL: http://svn.apache.org/viewvc?rev=1719104&view=rev
Log:
Replace copy() with standard clone()

Modified:
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheFactory.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/behavior/ILateralCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/TCPLateralCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/CommonRemoteCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/RemoteCacheManager.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/http/server/RemoteHttpCacheServerAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/CompositeCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/ElementAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/behavior/ICompositeCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/behavior/IElementAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCache.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheConfigurator.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/utils/config/OptionConverter.java
    commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/access/TestCacheAccess.java
    commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/MockAuxiliaryCacheAttributes.java
    commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/disk/jdbc/HsqlSetupTableUtil.java

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -127,4 +127,20 @@ public abstract class AbstractAuxiliaryC
     {
         return eventQueuePoolName;
     }
+
+    /**
+     * @see java.lang.Object#clone()
+     */
+    @Override
+    public AbstractAuxiliaryCacheAttributes clone()
+    {
+        try
+        {
+            return (AbstractAuxiliaryCacheAttributes)super.clone();
+        }
+        catch (CloneNotSupportedException e)
+        {
+            throw new RuntimeException("Clone not supported. This should never happen.", e);
+        }
+    }
 }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -19,10 +19,10 @@ package org.apache.commons.jcs.auxiliary
  * under the License.
  */
 
-import org.apache.commons.jcs.engine.behavior.ICacheEventQueue;
-
 import java.io.Serializable;
 
+import org.apache.commons.jcs.engine.behavior.ICacheEventQueue;
+
 /**
  * This is a nominal interface that auxiliary cache attributes should implement. This allows the
  * auxiliary mangers to share a common interface.
@@ -87,9 +87,7 @@ public interface AuxiliaryCacheAttribute
     String getEventQueuePoolName();
 
     /**
-     * Clones
-     * <p>
-     * @return a copy
+     * Clone object
      */
-    AuxiliaryCacheAttributes copy();
+    AuxiliaryCacheAttributes clone();
 }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -19,26 +19,23 @@ package org.apache.commons.jcs.auxiliary
  * under the License.
  */
 
+import java.io.File;
+
 import org.apache.commons.jcs.auxiliary.AbstractAuxiliaryCacheAttributes;
-import org.apache.commons.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs.auxiliary.disk.behavior.IDiskCacheAttributes;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.io.File;
-
 /**
  * This has common attributes that any conceivable disk cache would need.
  */
-public abstract class AbstractDiskCacheAttributes
-    extends AbstractAuxiliaryCacheAttributes
-    implements IDiskCacheAttributes
+public abstract class AbstractDiskCacheAttributes extends AbstractAuxiliaryCacheAttributes implements IDiskCacheAttributes
 {
     /** Don't change. */
     private static final long serialVersionUID = 8306631920391711229L;
 
     /** The logger */
-    private static final Log log = LogFactory.getLog( AbstractDiskCacheAttributes.class );
+    private static final Log log = LogFactory.getLog(AbstractDiskCacheAttributes.class);
 
     /** path to disk */
     private File diskPath;
@@ -58,34 +55,37 @@ public abstract class AbstractDiskCacheA
      */
     private int shutdownSpoolTimeLimit = DEFAULT_shutdownSpoolTimeLimit;
 
+    /** Type of disk limit: SIZE or COUNT */
     private DiskLimitType diskLimitType = DiskLimitType.COUNT;
 
-    private int chunkSize;
-
     /**
      * Sets the diskPath attribute of the DiskCacheAttributes object
      * <p>
-     * @param path The new diskPath value
+     *
+     * @param path
+     *            The new diskPath value
      */
     @Override
-    public void setDiskPath( String path )
+    public void setDiskPath(String path)
     {
-        setDiskPath( new File( path ) );
+        setDiskPath(new File(path));
     }
 
     /**
      * Sets the diskPath attribute of the DiskCacheAttributes object
      * <p>
-     * @param diskPath The new diskPath value
+     *
+     * @param diskPath
+     *            The new diskPath value
      */
-    public void setDiskPath( File diskPath )
+    public void setDiskPath(File diskPath)
     {
         this.diskPath = diskPath;
-        boolean result = this.diskPath.isDirectory(); 
-        
+        boolean result = this.diskPath.isDirectory();
+
         if (!result)
         {
-        		result = this.diskPath.mkdirs();
+            result = this.diskPath.mkdirs();
         }
         if (!result)
         {
@@ -96,6 +96,7 @@ public abstract class AbstractDiskCacheA
     /**
      * Gets the diskPath attribute of the attributes object
      * <p>
+     *
      * @return The diskPath value
      */
     @Override
@@ -107,6 +108,7 @@ public abstract class AbstractDiskCacheA
     /**
      * Gets the maxKeySize attribute of the DiskCacheAttributes object
      * <p>
+     *
      * @return The maxPurgatorySize value
      */
     @Override
@@ -118,10 +120,12 @@ public abstract class AbstractDiskCacheA
     /**
      * Sets the maxPurgatorySize attribute of the DiskCacheAttributes object
      * <p>
-     * @param maxPurgatorySize The new maxPurgatorySize value
+     *
+     * @param maxPurgatorySize
+     *            The new maxPurgatorySize value
      */
     @Override
-    public void setMaxPurgatorySize( int maxPurgatorySize )
+    public void setMaxPurgatorySize(int maxPurgatorySize)
     {
         this.maxPurgatorySize = maxPurgatorySize;
     }
@@ -130,6 +134,7 @@ public abstract class AbstractDiskCacheA
      * Get the amount of time in seconds we will wait for elements to move to disk during shutdown
      * for a particular region.
      * <p>
+     *
      * @return the time in seconds.
      */
     @Override
@@ -146,38 +151,22 @@ public abstract class AbstractDiskCacheA
      * <p>
      * The default is 60 seconds.
      * <p>
-     * @param shutdownSpoolTimeLimit the time in seconds
+     *
+     * @param shutdownSpoolTimeLimit
+     *            the time in seconds
      */
     @Override
-    public void setShutdownSpoolTimeLimit( int shutdownSpoolTimeLimit )
+    public void setShutdownSpoolTimeLimit(int shutdownSpoolTimeLimit)
     {
         this.shutdownSpoolTimeLimit = shutdownSpoolTimeLimit;
     }
 
     /**
-     * Simple clone.
-     * <p>
-     * @return AuxiliaryCacheAttributes
-     */
-    @Override
-    public AuxiliaryCacheAttributes copy()
-    {
-        try
-        {
-            return (AuxiliaryCacheAttributes) this.clone();
-        }
-        catch ( Exception e )
-        {
-            // swallow
-        }
-        return this;
-    }
-
-    /**
-     * @param allowRemoveAll The allowRemoveAll to set.
+     * @param allowRemoveAll
+     *            The allowRemoveAll to set.
      */
     @Override
-    public void setAllowRemoveAll( boolean allowRemoveAll )
+    public void setAllowRemoveAll(boolean allowRemoveAll)
     {
         this.allowRemoveAll = allowRemoveAll;
     }
@@ -194,40 +183,39 @@ public abstract class AbstractDiskCacheA
     /**
      * Includes the common attributes for a debug message.
      * <p>
+     *
      * @return String
      */
     @Override
     public String toString()
     {
         StringBuilder str = new StringBuilder();
-        str.append( "AbstractDiskCacheAttributes " );
-        str.append( "\n diskPath = " + getDiskPath() );
-        str.append( "\n maxPurgatorySize   = " + getMaxPurgatorySize() );
-        str.append( "\n allowRemoveAll   = " + isAllowRemoveAll() );
-        str.append( "\n ShutdownSpoolTimeLimit   = " + getShutdownSpoolTimeLimit() );
+        str.append("AbstractDiskCacheAttributes ");
+        str.append("\n diskPath = " + getDiskPath());
+        str.append("\n maxPurgatorySize   = " + getMaxPurgatorySize());
+        str.append("\n allowRemoveAll   = " + isAllowRemoveAll());
+        str.append("\n ShutdownSpoolTimeLimit   = " + getShutdownSpoolTimeLimit());
         return str.toString();
     }
+
     @Override
-    public void setDiskLimitType(DiskLimitType diskLimitType) {
+    public void setDiskLimitType(DiskLimitType diskLimitType)
+    {
         this.diskLimitType = diskLimitType;
-
     }
 
     @Override
-    public void setDiskLimitTypeName(String diskLimitTypeName) {
-        if (diskLimitTypeName != null) {
-            String name = diskLimitTypeName.trim();
-            if ("COUNT".equals(name)) {
-                diskLimitType = DiskLimitType.COUNT;
-            } else if ("SIZE".equals(name)) {
-                diskLimitType = DiskLimitType.SIZE;
-            }
+    public void setDiskLimitTypeName(String diskLimitTypeName)
+    {
+        if (diskLimitTypeName != null)
+        {
+            diskLimitType = DiskLimitType.valueOf(diskLimitTypeName.trim());
         }
-
     }
 
     @Override
-    public DiskLimitType getDiskLimitType() {
+    public DiskLimitType getDiskLimitType()
+    {
         return diskLimitType;
     }
 }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -19,7 +19,6 @@ package org.apache.commons.jcs.auxiliary
  * under the License.
  */
 
-import org.apache.commons.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs.auxiliary.disk.AbstractDiskCacheAttributes;
 
 /**
@@ -60,8 +59,6 @@ public class IndexedDiskCacheAttributes
     /** Should we clear the disk on startup. If true the congtents of disk are cleared. */
     private boolean clearDiskOnStartup = DEFAULT_CLEAR_DISK_ON_STARTUP;
 
-    private DiskLimitType diskLimitType = DiskLimitType.COUNT;
-
     /**
      * Constructor for the DiskCacheAttributes object
      */
@@ -168,25 +165,6 @@ public class IndexedDiskCacheAttributes
     }
 
     /**
-     * Returns a copy of the attributes.
-     * <p>
-     * @return AuxiliaryCacheAttributes
-     */
-    @Override
-    public AuxiliaryCacheAttributes copy()
-    {
-        try
-        {
-            return (AuxiliaryCacheAttributes) this.clone();
-        }
-        catch ( Exception e )
-        {
-            // swallow
-        }
-        return this;
-    }
-
-    /**
      * Write out the values for debugging purposes.
      * <p>
      * @return String

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheFactory.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheFactory.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheFactory.java Thu Dec 10 16:15:25 2015
@@ -152,7 +152,7 @@ public class HSQLDiskCacheFactory
 
         // TODO make the cached nature of the table configurable
         StringBuilder createSql = new StringBuilder();
-        createSql.append( "CREATE CACHED TABLE " + tableName );
+        createSql.append( "CREATE CACHED TABLE ").append( tableName );
         createSql.append( "( " );
         createSql.append( "CACHE_KEY             VARCHAR(250)          NOT NULL, " );
         createSql.append( "REGION                VARCHAR(250)          NOT NULL, " );

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -20,7 +20,6 @@ package org.apache.commons.jcs.auxiliary
  */
 
 import org.apache.commons.jcs.auxiliary.AbstractAuxiliaryCacheAttributes;
-import org.apache.commons.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes;
 
 /**
@@ -234,24 +233,6 @@ public class LateralCacheAttributes
     }
 
     /**
-     * Returns a clone of the attributes.
-     * @return Self
-     */
-    @Override
-    public AuxiliaryCacheAttributes copy()
-    {
-        try
-        {
-            return (AuxiliaryCacheAttributes) this.clone();
-        }
-        catch ( Exception e )
-        {
-            //noop
-        }
-        return this;
-    }
-
-    /**
      * @param receive The receive to set.
      */
     @Override

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/behavior/ILateralCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/behavior/ILateralCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/behavior/ILateralCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/behavior/ILateralCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -21,8 +21,6 @@ package org.apache.commons.jcs.auxiliary
 
 import org.apache.commons.jcs.auxiliary.AuxiliaryCacheAttributes;
 
-import java.io.Serializable;
-
 /**
  * This interface defines configuration options common to lateral cache plugins.
  * <p>
@@ -30,7 +28,7 @@ import java.io.Serializable;
  * individual laterals have their own specific attributes interfaces.
  */
 public interface ILateralCacheAttributes
-    extends Serializable, AuxiliaryCacheAttributes
+    extends AuxiliaryCacheAttributes
 {
     enum Type
     {

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java Thu Dec 10 16:15:25 2015
@@ -112,7 +112,7 @@ public class LateralTCPCacheFactory
                 {
                     log.debug( "tcp server = " + server );
                 }
-                ITCPLateralCacheAttributes lacC = (ITCPLateralCacheAttributes) lac.copy();
+                ITCPLateralCacheAttributes lacC = (ITCPLateralCacheAttributes) lac.clone();
                 lacC.setTcpServer( server );
 
                 LateralCacheNoWait<K, V> lateralNoWait = createCacheNoWait(lacC, cacheEventLogger, elementSerializer);

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/TCPLateralCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/TCPLateralCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/TCPLateralCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/TCPLateralCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -19,7 +19,6 @@ package org.apache.commons.jcs.auxiliary
  * under the License.
  */
 
-import org.apache.commons.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs.auxiliary.lateral.LateralCacheAttributes;
 import org.apache.commons.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes;
 
@@ -303,25 +302,8 @@ public class TCPLateralCacheAttributes
     }
 
     /**
-     * @return AuxiliaryCacheAttributes
-     */
-    @Override
-    public AuxiliaryCacheAttributes copy()
-    {
-        try
-        {
-            return (AuxiliaryCacheAttributes) this.clone();
-        }
-        catch ( Exception e )
-        {
-            //noop
-        }
-        return this;
-    }
-
-    /**
      * Should the receiver try to match hashcodes. If true, the receiver will see if the client
-     * supplied a hshcode. If it did, then it will try to get the item locally. If the item exists,
+     * supplied a hashcode. If it did, then it will try to get the item locally. If the item exists,
      * then it will compare the hashcode. if they are the same, it will not remove. This isn't
      * perfect since different objects can have the same hashcode, but it is unlikely of objects of
      * the same type.
@@ -336,7 +318,7 @@ public class TCPLateralCacheAttributes
 
     /**
      * Should the receiver try to match hashcodes. If true, the receiver will see if the client
-     * supplied a hshcode. If it did, then it will try to get the item locally. If the item exists,
+     * supplied a hashcode. If it did, then it will try to get the item locally. If the item exists,
      * then it will compare the hashcode. if they are the same, it will not remove. This isn't
      * perfect since different objects can have the same hashcode, but it is unlikely of objects of
      * the same type.

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/CommonRemoteCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/CommonRemoteCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/CommonRemoteCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/CommonRemoteCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -20,7 +20,6 @@ package org.apache.commons.jcs.auxiliary
  */
 
 import org.apache.commons.jcs.auxiliary.AbstractAuxiliaryCacheAttributes;
-import org.apache.commons.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs.auxiliary.remote.behavior.ICommonRemoteCacheAttributes;
 import org.apache.commons.jcs.auxiliary.remote.behavior.IRemoteCacheConstants;
 import org.apache.commons.jcs.auxiliary.remote.server.behavior.RemoteType;
@@ -114,23 +113,6 @@ public class CommonRemoteCacheAttributes
     }
 
     /**
-     * @return AuxiliaryCacheAttributes
-     */
-    @Override
-    public AuxiliaryCacheAttributes copy()
-    {
-        try
-        {
-            return (AuxiliaryCacheAttributes) this.clone();
-        }
-        catch ( Exception e )
-        {
-            // swallow
-        }
-        return this;
-    }
-
-    /**
      * Gets the remoteServiceName attribute of the RemoteCacheAttributes object.
      * <p>
      * @return The remoteServiceName value

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java Thu Dec 10 16:15:25 2015
@@ -182,7 +182,7 @@ public class RemoteCacheFailoverRunner<K
                     RemoteCacheAttributes rca = null;
                     try
                     {
-                        rca = (RemoteCacheAttributes) facade.getRemoteCacheAttributes().copy();
+                        rca = (RemoteCacheAttributes) facade.getRemoteCacheAttributes().clone();
                         rca.setRemoteLocation(server);
                         RemoteCacheManager rcm = RemoteCacheFactory.getManager( rca, cacheMgr,
                             facade.getCacheEventLogger(), facade.getElementSerializer() );
@@ -313,7 +313,7 @@ public class RemoteCacheFailoverRunner<K
             log.info( "Trying to restore connection to primary remote server [" + server + "]" );
         }
 
-        RemoteCacheAttributes rca = (RemoteCacheAttributes) facade.getRemoteCacheAttributes().copy();
+        RemoteCacheAttributes rca = (RemoteCacheAttributes) facade.getRemoteCacheAttributes().clone();
         rca.setRemoteLocation(server);
         RemoteCacheManager rcm = RemoteCacheFactory.getManager( rca, cacheMgr,
             facade.getCacheEventLogger(), facade.getElementSerializer() );
@@ -354,7 +354,7 @@ public class RemoteCacheFailoverRunner<K
                         {
                             // create attributes that reflect the
                             // previous failed over configuration.
-                            RemoteCacheAttributes rcaOld = (RemoteCacheAttributes) facade.getRemoteCacheAttributes().copy();
+                            RemoteCacheAttributes rcaOld = (RemoteCacheAttributes) facade.getRemoteCacheAttributes().clone();
                             rcaOld.setRemoteLocation(serverOld);
                             RemoteCacheManager rcmOld = RemoteCacheFactory.getManager( rcaOld, cacheMgr,
                                 facade.getCacheEventLogger(), facade.getElementSerializer() );

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/RemoteCacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/RemoteCacheManager.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/RemoteCacheManager.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/RemoteCacheManager.java Thu Dec 10 16:15:25 2015
@@ -274,7 +274,7 @@ public class RemoteCacheManager
      */
     public <K, V> RemoteCacheNoWait<K, V> getCache( String cacheName )
     {
-        IRemoteCacheAttributes ca = (IRemoteCacheAttributes) remoteCacheAttributes.copy();
+        IRemoteCacheAttributes ca = (IRemoteCacheAttributes) remoteCacheAttributes.clone();
         ca.setCacheName( cacheName );
         return getCache( ca );
     }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/http/server/RemoteHttpCacheServerAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/http/server/RemoteHttpCacheServerAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/http/server/RemoteHttpCacheServerAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/http/server/RemoteHttpCacheServerAttributes.java Thu Dec 10 16:15:25 2015
@@ -20,7 +20,6 @@ package org.apache.commons.jcs.auxiliary
  */
 
 import org.apache.commons.jcs.auxiliary.AbstractAuxiliaryCacheAttributes;
-import org.apache.commons.jcs.auxiliary.AuxiliaryCacheAttributes;
 
 /**
  * Configuration for the RemoteHttpCacheServer. Most of these properties are used only by the
@@ -39,25 +38,6 @@ public class RemoteHttpCacheServerAttrib
     private boolean allowClusterGet = true;
 
     /**
-     * clones
-     * <p>
-     * @return AuxiliaryCacheAttributes clone
-     */
-    @Override
-    public AuxiliaryCacheAttributes copy()
-    {
-        try
-        {
-            return (AuxiliaryCacheAttributes) this.clone();
-        }
-        catch ( Exception e )
-        {
-            // swallow
-        }
-        return this;
-    }
-
-    /**
      * Should cluster updates be propagated to the locals
      * <p>
      * @return The localClusterConsistency value

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/CompositeCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/CompositeCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/CompositeCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/CompositeCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -29,7 +29,7 @@ import org.apache.commons.jcs.engine.beh
  * the hard coded defaults will be used.
  */
 public class CompositeCacheAttributes
-    implements ICompositeCacheAttributes, Cloneable
+    implements ICompositeCacheAttributes
 {
     /** Don't change */
     private static final long serialVersionUID = 6754049978134196787L;
@@ -403,26 +403,6 @@ public class CompositeCacheAttributes
     }
 
     /**
-     * Description of the Method
-     * <p>
-     * @return ICompositeCacheAttributes a copy
-     */
-    @Override
-    public ICompositeCacheAttributes copy()
-    {
-        try
-        {
-            ICompositeCacheAttributes cattr = (ICompositeCacheAttributes) this.clone();
-            return cattr;
-        }
-        catch ( Exception e )
-        {
-            System.err.println( e.toString() );
-            return new CompositeCacheAttributes();
-        }
-    }
-
-    /**
      * Dumps the core attributes.
      * <p>
      * @return For debugging.
@@ -444,4 +424,20 @@ public class CompositeCacheAttributes
 
         return dump.toString();
     }
+
+    /**
+     * @see java.lang.Object#clone()
+     */
+    @Override
+    public ICompositeCacheAttributes clone()
+    {
+        try
+        {
+            return (ICompositeCacheAttributes)super.clone();
+        }
+        catch (CloneNotSupportedException e)
+        {
+            throw new RuntimeException("Clone not supported. This should never happen.", e);
+        }
+    }
 }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/ElementAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/ElementAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/ElementAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/ElementAttributes.java Thu Dec 10 16:15:25 2015
@@ -19,13 +19,12 @@ package org.apache.commons.jcs.engine;
  * under the License.
  */
 
-import org.apache.commons.jcs.engine.behavior.IElementAttributes;
-import org.apache.commons.jcs.engine.control.event.behavior.IElementEventHandler;
-
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.commons.jcs.engine.behavior.IElementAttributes;
+import org.apache.commons.jcs.engine.control.event.behavior.IElementEventHandler;
+
 /**
  * This it the element attribute descriptor class. Each element in the cache has an ElementAttribute
  * object associated with it. An ElementAttributes object can be associated with an element in 3
@@ -39,7 +38,7 @@ import java.util.List;
  * </ol>
  */
 public class ElementAttributes
-    implements IElementAttributes, Serializable
+    implements IElementAttributes
 {
     /** Don't change. */
     private static final long serialVersionUID = 7814990748035017441L;
@@ -122,34 +121,6 @@ public class ElementAttributes
     }
 
     /**
-     * Copies the attributes, including references to event handlers.
-     * <p>
-     * @return a copy of the Attributes
-     */
-    @Override
-    public IElementAttributes copy()
-    {
-        try
-        {
-            // need to make this more efficient. Just want to insure
-            // a proper copy
-            ElementAttributes attr = new ElementAttributes();
-            attr.setIdleTime( this.getIdleTime() );
-            attr.setIsEternal( this.getIsEternal() );
-            attr.setIsLateral( this.getIsLateral() );
-            attr.setIsRemote( this.getIsRemote() );
-            attr.setIsSpool( this.getIsSpool() );
-            attr.setMaxLife(this.getMaxLife());
-            attr.addElementEventHandlers( this.eventHandlers );
-            return attr;
-        }
-        catch ( Exception e )
-        {
-            return new ElementAttributes();
-        }
-    }
-
-    /**
      * Sets the maxLife attribute of the IAttributes object.
      * <p>
      * @param mls The new MaxLifeSeconds value
@@ -466,4 +437,20 @@ public class ElementAttributes
 
         return dump.toString();
     }
+
+    /**
+     * @see java.lang.Object#clone()
+     */
+    @Override
+    public IElementAttributes clone()
+    {
+        try
+        {
+            return (IElementAttributes)super.clone();
+        }
+        catch (CloneNotSupportedException e)
+        {
+            throw new RuntimeException("Clone not supported. This should never happen.", e);
+        }
+    }
 }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/behavior/ICompositeCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/behavior/ICompositeCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/behavior/ICompositeCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/behavior/ICompositeCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -25,7 +25,7 @@ import java.io.Serializable;
  * This defines the minimal behavior for the Cache Configuration settings.
  */
 public interface ICompositeCacheAttributes
-    extends Serializable
+    extends Serializable, Cloneable
 {
     enum DiskUsagePattern
     {
@@ -203,13 +203,6 @@ public interface ICompositeCacheAttribut
     int getMaxSpoolPerRun();
 
     /**
-     * Clones the attributes.
-     * <p>
-     * @return a new object with the same settings.
-     */
-    ICompositeCacheAttributes copy();
-
-    /**
      * By default this is SWAP_ONLY.
      * <p>
      * @param diskUsagePattern The diskUsagePattern to set.
@@ -243,4 +236,9 @@ public interface ICompositeCacheAttribut
      * @param spoolChunkSize
      */
     void setSpoolChunkSize( int spoolChunkSize );
+
+    /**
+     * Clone object
+     */
+    ICompositeCacheAttributes clone();
 }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/behavior/IElementAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/behavior/IElementAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/behavior/IElementAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/behavior/IElementAttributes.java Thu Dec 10 16:15:25 2015
@@ -19,17 +19,18 @@ package org.apache.commons.jcs.engine.be
  * under the License.
  */
 
-import org.apache.commons.jcs.engine.control.event.behavior.IElementEventHandler;
-
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.commons.jcs.engine.control.event.behavior.IElementEventHandler;
+
 /**
  * Interface for cache element attributes classes. Every item is the cache is associated with an
  * element attributes object. It is used to track the life of the object as well as to restrict its
  * behavior. By default, elements get a clone of the region's attributes.
  */
-public interface IElementAttributes
+public interface IElementAttributes extends Serializable, Cloneable
 {
     /**
      * Sets the maxLife attribute of the IAttributes object.
@@ -110,12 +111,6 @@ public interface IElementAttributes
     long getTimeToLiveSeconds();
 
     /**
-     * Returns a copy of the object.
-     * @return IElementAttributes
-     */
-    IElementAttributes copy();
-
-    /**
      * Can this item be spooled to disk
      * <p>
      * By default this is true.
@@ -200,4 +195,9 @@ public interface IElementAttributes
     long getTimeFactorForMilliseconds();
 
     void setTimeFactorForMilliseconds(long factor);
+
+    /**
+     * Clone object
+     */
+    IElementAttributes clone();
 }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCache.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCache.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCache.java Thu Dec 10 16:15:25 2015
@@ -1514,7 +1514,7 @@ public class CompositeCache<K, V>
     {
         if ( attr != null )
         {
-            return attr.copy();
+            return attr.clone();
         }
         return null;
     }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheConfigurator.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheConfigurator.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheConfigurator.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheConfigurator.java Thu Dec 10 16:15:25 2015
@@ -453,7 +453,7 @@ public class CompositeCacheConfigurator
             }
 
             ICompositeCacheAttributes ccAttr2 = compositeCacheManager.getDefaultCacheAttributes();
-            ccAttr = ccAttr2.copy();
+            ccAttr = ccAttr2.clone();
         }
 
         if ( log.isDebugEnabled() )
@@ -499,7 +499,7 @@ public class CompositeCacheConfigurator
             }
 
             IElementAttributes eAttr2 = compositeCacheManager.getDefaultElementAttributes();
-            eAttr = eAttr2.copy();
+            eAttr = eAttr2.clone();
         }
 
         if ( log.isDebugEnabled() )
@@ -583,7 +583,7 @@ public class CompositeCacheConfigurator
                 compositeCacheManager.registryAttrPut( auxAttr );
             }
 
-            auxAttr = auxAttr.copy();
+            auxAttr = auxAttr.clone();
 
             if ( log.isDebugEnabled() )
             {

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java Thu Dec 10 16:15:25 2015
@@ -501,7 +501,7 @@ public class CompositeCacheManager
      */
     public ICompositeCacheAttributes getDefaultCacheAttributes()
     {
-        return this.defaultCacheAttr.copy();
+        return this.defaultCacheAttr.clone();
     }
 
     /**
@@ -531,7 +531,7 @@ public class CompositeCacheManager
      */
     public IElementAttributes getDefaultElementAttributes()
     {
-        return this.defaultElementAttr.copy();
+        return this.defaultElementAttr.clone();
     }
 
     /**
@@ -543,7 +543,7 @@ public class CompositeCacheManager
     @Override
     public <K, V> CompositeCache<K, V>  getCache( String cacheName )
     {
-        return getCache( cacheName, this.defaultCacheAttr.copy() );
+        return getCache( cacheName, this.defaultCacheAttr.clone() );
     }
 
     /**

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/utils/config/OptionConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/utils/config/OptionConverter.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/utils/config/OptionConverter.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/utils/config/OptionConverter.java Thu Dec 10 16:15:25 2015
@@ -181,14 +181,14 @@ public class OptionConverter
      * <p>
      * Case of value is unimportant.
      * @param value
-     * @param dEfault
+     * @param defaultValue
      * @return Object
      */
-    public static boolean toBoolean( String value, boolean dEfault )
+    public static boolean toBoolean( String value, boolean defaultValue )
     {
         if ( value == null )
         {
-            return dEfault;
+            return defaultValue;
         }
         String trimmedVal = value.trim();
         if ( "true".equalsIgnoreCase( trimmedVal ) )
@@ -199,17 +199,17 @@ public class OptionConverter
         {
             return false;
         }
-        return dEfault;
+        return defaultValue;
     }
 
     /**
      * Converts to int.
      * <p>
      * @param value
-     * @param dEfault
+     * @param defaultValue
      * @return int
      */
-    public static int toInt( String value, int dEfault )
+    public static int toInt( String value, int defaultValue )
     {
         if ( value != null )
         {
@@ -224,19 +224,19 @@ public class OptionConverter
                 e.printStackTrace();
             }
         }
-        return dEfault;
+        return defaultValue;
     }
 
     /**
      * @param value
-     * @param dEfault
+     * @param defaultValue
      * @return long
      */
-    public static long toFileSize( String value, long dEfault )
+    public static long toFileSize( String value, long defaultValue )
     {
         if ( value == null )
         {
-            return dEfault;
+            return defaultValue;
         }
 
         String s = value.trim().toUpperCase();
@@ -270,7 +270,7 @@ public class OptionConverter
                 log.error( "[" + value + "] not in expected format", e );
             }
         }
-        return dEfault;
+        return defaultValue;
     }
 
     /**
@@ -344,7 +344,7 @@ public class OptionConverter
      * Perform variable substitution in string <code>val</code> from the values of keys found in the
      * system properties.
      * <p>
-     * The variable substitution delimeters are <b>${ </b> and <b>} </b>.
+     * The variable substitution delimiters are <b>${ </b> and <b>} </b>.
      * <p>
      * For example, if the System properties contains "key=value", then the call
      *
@@ -358,7 +358,7 @@ public class OptionConverter
      * searched, if the value could not be found there, then substitution defaults to the empty
      * string.
      * <p>
-     * For example, if system propeties contains no value for the key "inexistentKey", then the call
+     * For example, if system properties contains no value for the key "inexistentKey", then the call
      *
      * <pre>
      * String s = OptionConverter.subsVars( &quot;Value of inexistentKey is [${inexistentKey}]&quot; );
@@ -367,7 +367,7 @@ public class OptionConverter
      * will set <code>s</code> to "Value of inexistentKey is []"
      * <p>
      * An {@link java.lang.IllegalArgumentException}is thrown if <code>val</code> contains a start
-     * delimeter "${" which is not balanced by a stop delimeter "}".
+     * delimiter "${" which is not balanced by a stop delimiter "}".
      * </p>
      * <p>
      * <b>Author </b> Avy Sharell </a>

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/access/TestCacheAccess.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/access/TestCacheAccess.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/access/TestCacheAccess.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/access/TestCacheAccess.java Thu Dec 10 16:15:25 2015
@@ -246,7 +246,7 @@ public class TestCacheAccess
                         long n_start = System.currentTimeMillis();
                         for ( int n = 0; n < num; n++ )
                         {
-                            attrp.copy();
+                            attrp.clone();
                         }
                         long n_end = System.currentTimeMillis();
                         p( "---cloned attr " + num + " in " + String.valueOf( n_end - n_start ) + " millis ---" );

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/MockAuxiliaryCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/MockAuxiliaryCacheAttributes.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/MockAuxiliaryCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/MockAuxiliaryCacheAttributes.java Thu Dec 10 16:15:25 2015
@@ -26,15 +26,4 @@ public class MockAuxiliaryCacheAttribute
     /** Don't change. */
     private static final long serialVersionUID = 1091238902450504108L;
 
-    /**
-     * Doesn't really copy
-     * <p>
-     * @return this
-     */
-    @Override
-    public AuxiliaryCacheAttributes copy()
-    {
-        return this;
-    }
-
 }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/disk/jdbc/HsqlSetupTableUtil.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/disk/jdbc/HsqlSetupTableUtil.java?rev=1719104&r1=1719103&r2=1719104&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/disk/jdbc/HsqlSetupTableUtil.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/disk/jdbc/HsqlSetupTableUtil.java Thu Dec 10 16:15:25 2015
@@ -39,7 +39,7 @@ public class HsqlSetupTableUtil
         boolean newT = true;
 
         StringBuilder createSql = new StringBuilder();
-        createSql.append( "CREATE CACHED TABLE " + tableName + " " );
+        createSql.append( "CREATE CACHED TABLE ").append( tableName );
         createSql.append( "( " );
         createSql.append( "CACHE_KEY             VARCHAR(250)          NOT NULL, " );
         createSql.append( "REGION                VARCHAR(250)          NOT NULL, " );



Mime
View raw message