Skip to content

Commit

Permalink
Relax validations so it works with scala libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
beothorn committed Apr 27, 2024
1 parent c799776 commit 40c0673
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
import com.github.beothorn.agent.recorder.FunctionCallRecorder;
import com.github.beothorn.agent.transformer.CallRecorder;
import com.github.beothorn.agent.transformer.DebugListener;
import net.bytebuddy.ByteBuddy;
import net.bytebuddy.agent.builder.AgentBuilder;
import net.bytebuddy.agent.builder.AgentBuilder.Transformer;
import net.bytebuddy.asm.Advice;
import net.bytebuddy.description.NamedElement;
import net.bytebuddy.dynamic.scaffold.TypeValidation;
import net.bytebuddy.matcher.ElementMatcher;
import net.bytebuddy.matcher.ElementMatcher.Junction;

Expand Down Expand Up @@ -110,7 +112,7 @@ public static void premain(
maybeStopRecordingTriggerFunction.ifPresent(FunctionCallRecorder::setStopTrigger);

// Agent builder creation starts here
AgentBuilder agentBuilder = new AgentBuilder.Default();
AgentBuilder agentBuilder = new AgentBuilder.Default(new ByteBuddy().with(TypeValidation.DISABLED));
boolean coreClassesMode = CommandLine.argumentHasIncludeCoreClasses(argument);
if(coreClassesMode){
agentBuilder = agentBuilder.ignore(none());
Expand Down

0 comments on commit 40c0673

Please sign in to comment.