use of com.pamirs.attach.plugin.caffeine.utils.WrapEntry in project LinkAgent by shulieTech.
the class EntrySetInterceptor method getResult0.
@Override
public Object getResult0(Advice advice) throws Throwable {
Object returnObj = advice.getReturnObj();
if (!(returnObj instanceof Set)) {
return new Object[0];
}
Set<Map.Entry> returnSet = (Set<Entry>) returnObj;
if (returnSet.size() == 0) {
return new Object[0];
}
Set<Map.Entry> resultSet = new HashSet();
for (Entry entry : returnSet) {
if (Pradar.isClusterTest()) {
if (entry.getKey() instanceof ClusterTestCacheWrapperKey) {
resultSet.add(new WrapEntry(entry));
}
} else {
if (!(entry.getKey() instanceof ClusterTestCacheWrapperKey)) {
resultSet.add(entry);
}
}
}
return resultSet;
}
Aggregations