Some simplifications
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCacheFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCacheFactory.java
index 5702ffe..bca907f 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCacheFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCacheFactory.java
@@ -29,24 +29,6 @@
private String name = this.getClass().getSimpleName();
/**
- * Initialize this factory
- */
- @Override
- public void initialize()
- {
- // empty
- }
-
- /**
- * Dispose of this factory, clean up shared resources
- */
- @Override
- public void dispose()
- {
- // empty
- }
-
- /**
* Gets the name attribute of the DiskCacheFactory object
* <p>
* @return The name value
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AuxiliaryCacheFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AuxiliaryCacheFactory.java
index ffaf2ae..52bffcd 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AuxiliaryCacheFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AuxiliaryCacheFactory.java
@@ -48,12 +48,12 @@
/**
* Initialize this factory
*/
- void initialize();
+ default void initialize() { /* empty */ }
/**
* Dispose of this factory, clean up shared resources
*/
- void dispose();
+ default void dispose() { /* empty */ }
/**
* Sets the name attribute of the AuxiliaryCacheFactory object
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
index ce7d98d..e75936a 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
@@ -21,7 +21,6 @@
import java.io.IOException;
import java.util.ArrayList;
-import java.util.StringTokenizer;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheFactory;
@@ -96,12 +95,11 @@
// no servers are required.
if ( lac.getTcpServers() != null )
{
- StringTokenizer it = new StringTokenizer( lac.getTcpServers(), "," );
- log.debug( "Configured for [{0}] servers.", () -> it.countTokens() );
+ String servers[] = lac.getTcpServers().split("\\s*,\\s*");
+ log.debug( "Configured for [{0}] servers.", servers.length );
- while ( it.hasMoreElements() )
+ for (String server : servers)
{
- String server = (String) it.nextElement();
log.debug( "tcp server = {0}", server );
ITCPLateralCacheAttributes lacC = (ITCPLateralCacheAttributes) lac.clone();
lacC.setTcpServer( server );
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheObserver.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheObserver.java
index dfb85ff..8fffb6b 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheObserver.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheObserver.java
@@ -43,8 +43,6 @@
<K, V> void addCacheListener( String cacheName, ICacheListener<K, V> obj )
throws IOException;
- //, CacheNotFoundException;
-
/**
* Subscribes to all caches.
*