Skip to content

Commit 033d6f7

Browse files
committed
minor changes
1 parent b743787 commit 033d6f7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

javaagent-tooling/src/testExceptionHandler/java/io/opentelemetry/javaagent/tooling/bytebuddy/BadAdvice.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public class BadAdvice {
1313

1414
@Advice.OnMethodExit(suppress = Throwable.class)
15-
public static boolean throwAnException(@Advice.Argument(0) AtomicBoolean isInstrumented) {
15+
public static void throwAnException(@Advice.Argument(0) AtomicBoolean isInstrumented) {
1616
// mark that the advice has been executed
1717
isInstrumented.set(true);
1818
throw new IllegalStateException("Test Exception");

javaagent-tooling/src/testExceptionHandler/java/io/opentelemetry/javaagent/tooling/bytebuddy/ExceptionHandlerTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ void exceptionOnNondelegatingClassloader() throws Exception {
116116
AtomicBoolean instrumented = new AtomicBoolean(false);
117117
someClazz.getMethod("isInstrumented", AtomicBoolean.class).invoke(null, instrumented);
118118
assertThat(testHandler.getRecords()).hasSize(initLogEvents);
119+
assertThat(instrumented.get()).describedAs("method should have been instrumented").isTrue();
119120
}
120121

121122
@Test

0 commit comments

Comments
 (0)