Skip to content

Commit 953b0ed

Browse files
committed
Ensure the class name is valid when enhancing though SerialVersionUIDAdder
1 parent ab049bd commit 953b0ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/context/asm/SerialVersionUIDAdder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public void visit(
182182
final String[] interfaces) {
183183
// Get the class name, access flags, and interfaces information (step 1, 2 and 3) for SVUID
184184
// computation.
185-
computeSvuid = (access & Opcodes.ACC_ENUM) == 0;
185+
computeSvuid = name != null && (access & Opcodes.ACC_ENUM) == 0;
186186

187187
if (computeSvuid) {
188188
this.name = name;

0 commit comments

Comments
 (0)