Java 8 compatibility.

This commit is contained in:
Erik C. Thauvin 2017-05-21 01:20:40 -07:00
parent 993384c173
commit fa24701921
2 changed files with 11 additions and 14 deletions

View file

@ -5,9 +5,6 @@ version = '2.4.2'
description = 'OSCache' description = 'OSCache'
sourceCompatibility = 1.4
targetCompatibility = 1.4
repositories { repositories {
mavenCentral() mavenCentral()
} }
@ -24,3 +21,7 @@ dependencies {
testCompile group: 'junitperf', name: 'junitperf', version:'1.9.1' testCompile group: 'junitperf', name: 'junitperf', version:'1.9.1'
testCompile group: 'groboutils', name: 'groboutils-core', version:'5' testCompile group: 'groboutils', name: 'groboutils-core', version:'5'
} }
compileJava {
// options.compilerArgs << '-Xlint:deprecation'
}

View file

@ -10,17 +10,13 @@ import com.opensymphony.oscache.base.algorithm.UnlimitedCache;
import com.opensymphony.oscache.base.events.*; import com.opensymphony.oscache.base.events.*;
import com.opensymphony.oscache.base.persistence.PersistenceListener; import com.opensymphony.oscache.base.persistence.PersistenceListener;
import com.opensymphony.oscache.util.FastCronParser; import com.opensymphony.oscache.util.FastCronParser;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import java.io.Serializable;
import java.text.ParseException;
import java.util.*;
import javax.swing.event.EventListenerList; import javax.swing.event.EventListenerList;
import java.io.Serializable;
import java.text.ParseException;
import java.util.*;
/** /**
* Provides an interface to the cache itself. Creating an instance of this class * Provides an interface to the cache itself. Creating an instance of this class
@ -356,8 +352,8 @@ public class Cache implements Serializable {
* @since 2.4 * @since 2.4
*/ */
public void addCacheEventListener(CacheEventListener listener) { public void addCacheEventListener(CacheEventListener listener) {
// listenerList.add(CacheEventListener.class, listener); listenerList.add(CacheEventListener.class, listener);
listenerList.add(listener.getClass(), listener); // listenerList.add(listener.getClass(), listener);
} }
/** /**
@ -669,8 +665,8 @@ public class Cache implements Serializable {
* @since 2.4 * @since 2.4
*/ */
public void removeCacheEventListener(CacheEventListener listener) { public void removeCacheEventListener(CacheEventListener listener) {
// listenerList.remove(CacheEventListener.class, listener); listenerList.remove(CacheEventListener.class, listener);
listenerList.remove(listener.getClass(), listener); // listenerList.remove(listener.getClass(), listener);
} }
/** /**