Skip to content

Commit c4350d0

Browse files
committed
make the comments a bit better
1 parent da1c13d commit c4350d0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

instrumentation/internal/internal-lambda/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/lambda/LambdaTransformer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public static byte[] transform(byte[] classBytes, String slashClassName, Class<?
3030
}
3131

3232
try {
33+
// The 'targetClass' needs to be non-null as it is used in Java9LambdaClassFileTransformer
34+
// to get a reference to the jpms module. However, a null value must be passed to the
35+
// underlying transformer as this code is called when the lambda is defined.
3336
byte[] result =
3437
transformer.transform(
3538
targetClass.getClassLoader(), slashClassName, targetClass, null, classBytes);

javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/LambdaClassFileTransformer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public byte[] transform(
2929

3030
// lambda instrumentation happens only when the lambda is defined, thus the classBeingRedefined
3131
// must be null otherwise we get a partial instrumentation, for example virtual fields are not
32-
// properly applied. This parameter is however used in Java9LambdaClassFileTransformer.
32+
// properly applied.
3333
return delegate.transform(loader, className, null, null, classfileBuffer);
3434
}
3535
}

0 commit comments

Comments
 (0)