Skip to content

fix: avoid skipping ordinary classes with $$Lambda in their names#3240

Merged
hengyunabc merged 1 commit into
alibaba:masterfrom
RynezzZ:codex/fix-lambda-name-detection
Jul 17, 2026
Merged

fix: avoid skipping ordinary classes with $$Lambda in their names#3240
hengyunabc merged 1 commit into
alibaba:masterfrom
RynezzZ:codex/fix-lambda-name-detection

Conversation

@RynezzZ

@RynezzZ RynezzZ commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • require the synthetic class flag in addition to $$Lambda in the binary name
  • add a real Instrumentation regression test for an ordinary Ordinary$$Lambda$1 class
  • verify that a JVM-generated lambda is still skipped by the existing safeguard

Background

#1512 added a conservative safeguard because retransformation of generated lambdas can break applications on JDK 8. The current classification relies only on the binary name, however, and ordinary application classes are allowed to contain $$Lambda in that name. As a result, such classes are skipped by bytecode capture even though they are not JVM-generated lambdas.

This change does not remove or relax the protection for real generated lambdas. It only avoids classifying a non-synthetic ordinary class as a lambda based on its name alone.

Related: #1512, JDK-8145964

Testing

  • JDK 17: mvnw.cmd -pl core test (264 tests, 0 failures, 0 errors, 7 skipped)
  • JDK 8u131: mvnw.cmd -pl core -Dtest=InstrumentationUtilsTest surefire:test (2 tests, 0 failures, 0 errors)

@CLAassistant

CLAassistant commented Jul 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@RynezzZ RynezzZ changed the title fix: avoid skipping ordinary classes with 290Lambda in their names fix: avoid skipping ordinary classes with $$Lambda in their names Jul 16, 2026
@hengyunabc
hengyunabc merged commit 4a0f6db into alibaba:master Jul 17, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants