Skip to content

Commit

Permalink
FIX: Remove deprecated warnings to fix CI test.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhm0311 authored and jhpark816 committed Apr 1, 2024
1 parent 3729a2b commit a5c1e01
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/com/navercorp/arcus/spring/ArcusTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package com.navercorp.arcus.spring;

import com.navercorp.arcus.spring.callback.ArcusCallBack;
import net.spy.memcached.ArcusClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -38,7 +37,9 @@ public ArcusTemplate(ArcusClient arcusClient) {
this.arcusClient = arcusClient;
}

public <T> T execute(final ArcusCallBack<T> methodCall) {
// There is NO way to avoid deprecated warnings when import deprecated classes.
// Use full class path to avoid them.
public <T> T execute(final com.navercorp.arcus.spring.callback.ArcusCallBack<T> methodCall) {
return executeAndHandleException(methodCall, new FutureGetter<T>() {
public T get(Future<T> future) throws InterruptedException,
ExecutionException {
Expand All @@ -47,7 +48,8 @@ public T get(Future<T> future) throws InterruptedException,
});
}

public <T> T execute(final ArcusCallBack<T> methodCall, final long timeout,
public <T> T execute(final com.navercorp.arcus.spring.callback.ArcusCallBack<T> methodCall,
final long timeout,
final TimeUnit unit) {
return executeAndHandleException(methodCall, new FutureGetter<T>() {
public T get(Future<T> future) throws InterruptedException,
Expand All @@ -57,7 +59,7 @@ public T get(Future<T> future) throws InterruptedException,
});
}

private <T> T executeAndHandleException(final ArcusCallBack<T> methodCall,
private <T> T executeAndHandleException(final com.navercorp.arcus.spring.callback.ArcusCallBack<T> methodCall,
FutureGetter<T> futureGetter) {
T arcusResponse = null;
Future<T> link = null;
Expand Down

0 comments on commit a5c1e01

Please sign in to comment.