Skip to content

Commit

Permalink
remove useless logger
Browse files Browse the repository at this point in the history
  • Loading branch information
apkreader committed Dec 9, 2023
1 parent a7b4811 commit 97d7414
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

import com.google.common.base.*;
import com.google.common.primitives.*;
import me.grax.jbytemod.JByteMod;
import org.objectweb.asm.*;
import org.objectweb.asm.tree.*;
import org.objectweb.asm.tree.analysis.*;
import org.objectweb.asm.tree.analysis.Frame;
import org.slf4j.*;

import java.io.*;
import java.util.*;
Expand Down Expand Up @@ -443,17 +443,16 @@ public static String insnsToString(Collection<AbstractInsnNode> insns) {

private static final Supplier<ExecutorService> ASYNC_SERVICE = Suppliers.memoize(Executors::newCachedThreadPool);

private static final Logger LOGGER = LoggerFactory.getLogger(TransformerHelper.class);

public static Frame<SourceValue>[] analyze(ClassNode classNode, MethodNode methodNode) {
Future<Frame<SourceValue>[]> future = ASYNC_SERVICE.get().submit(() -> new Analyzer<>(new SourceInterpreter()).analyze(classNode.name, methodNode));
try {
return future.get(10, TimeUnit.SECONDS);
} catch (InterruptedException | TimeoutException e) {
LOGGER.debug("timed out while analyzing {} {}{}", classNode.name, methodNode.name, methodNode.desc);
//JByteMod.LOGGER.debug("timed out while analyzing {} {}{}", classNode.name, methodNode.name, methodNode.desc);
return null;
} catch (ExecutionException e) {
LOGGER.debug("exception while analyzing {} {}{}", classNode.name, methodNode.name, methodNode.desc, e);
//LOGGER.debug("exception while analyzing {} {}{}", classNode.name, methodNode.name, methodNode.desc, e);
return null;
}
}
Expand Down

0 comments on commit 97d7414

Please sign in to comment.