@@ -18,7 +18,7 @@ public synchronized static void put(final String key, Object data, int expire) {
1818 ThrottlingPool .remove (key );
1919 if (data != null ) {
2020 if (expire >= 0 ) {
21- Future future = executor .schedule (new Runnable () {
21+ Future <?> future = executor .schedule (new Runnable () {
2222 @ Override
2323 public void run () {
2424 synchronized (ThrottlingPool .class ) {
@@ -50,7 +50,7 @@ public synchronized static int getExpire(String key) {
5050 public synchronized static Object remove (String key ) {
5151 Entity entity = map .remove (key );
5252 if (entity == null ) return null ;
53- Future future = entity .getFuture ();
53+ Future <?> future = entity .getFuture ();
5454 if (future != null ) future .cancel (true );
5555 return entity .getValue ();
5656 }
@@ -62,7 +62,7 @@ public synchronized static int size() {
6262 public synchronized static void clear () {
6363 for (Entity entity : map .values ()) {
6464 if (entity != null ) {
65- Future future = entity .getFuture ();
65+ Future <?> future = entity .getFuture ();
6666 if (future != null ) future .cancel (true );
6767 }
6868 }
@@ -76,9 +76,9 @@ public synchronized static Map<String, Entity> getPool() {
7676 private static class Entity {
7777 private Object value ;
7878 private int expire ;
79- private Future future ;
79+ private Future <?> future ;
8080
81- public Entity (Object value , int expire , Future future ) {
81+ public Entity (Object value , int expire , Future <?> future ) {
8282 this .value = value ;
8383 this .expire = expire ;
8484 this .future = future ;
@@ -92,7 +92,7 @@ public int getExpire() {
9292 return expire ;
9393 }
9494
95- public Future getFuture () {
95+ public Future <?> getFuture () {
9696 return future ;
9797 }
9898 }
0 commit comments