Skip to content

Commit

Permalink
ref[storage]: refactor lambda of storage
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Oct 21, 2023
1 parent b64a7a4 commit 16f7997
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.springframework.util.ConcurrentReferenceHashMap;

import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Proxy;
import java.util.*;

Expand Down Expand Up @@ -168,7 +167,7 @@ private <INDEX> String getMethodToField(Func1<V, INDEX> func) {
try {
var lambda = new IdeaProxyLambdaMeta((Proxy) func);
indexName = FieldUtils.getMethodToField(clazz, lambda.getImplMethodName());
} catch (Exception e) {
} catch (Throwable t) {
}
}

Expand All @@ -179,7 +178,7 @@ private <INDEX> String getMethodToField(Func1<V, INDEX> func) {
ReflectionUtils.makeAccessible(method);
var lambda = new ReflectLambdaMeta((java.lang.invoke.SerializedLambda) method.invoke(func));
indexName = FieldUtils.getMethodToField(clazz, lambda.getImplMethodName());
} catch (InvocationTargetException | NoSuchMethodException | IllegalAccessException e) {
} catch (Throwable t) {
}
}

Expand All @@ -188,7 +187,7 @@ private <INDEX> String getMethodToField(Func1<V, INDEX> func) {
try {
var lambda = new ShadowLambdaMeta(SerializedLambda.extract(func));
indexName = FieldUtils.getMethodToField(clazz, lambda.getImplMethodName());
} catch (Exception e) {
} catch (Throwable t) {
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import com.zfoo.protocol.util.AssertionUtils;
import com.zfoo.protocol.util.ReflectionUtils;
import com.zfoo.protocol.util.StringUtils;
import com.zfoo.storage.model.IdDef;
import com.zfoo.storage.model.IndexDef;
import io.netty.util.collection.IntObjectHashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import com.zfoo.protocol.util.ReflectionUtils;
import com.zfoo.storage.model.IdDef;
import com.zfoo.storage.model.IndexDef;
import io.netty.util.collection.IntObjectHashMap;
import io.netty.util.collection.LongObjectHashMap;

import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.zfoo.protocol.util.ReflectionUtils;
import com.zfoo.storage.model.IdDef;
import com.zfoo.storage.model.IndexDef;
import io.netty.util.collection.LongObjectHashMap;

import java.util.*;

Expand Down

0 comments on commit 16f7997

Please sign in to comment.