Skip to content

Conversation

@Adityakk9031
Copy link

Problem

The current Deploy-to-Develop (D2D) Java mapping assumes that a compiled .class file name always matches its source .java filename.

This assumption breaks for some projects (e.g. Lombok), where:

The declared class name does not match the source file name

As a result, valid Java sources are not mapped to their compiled .class files

Example from Lombok:

Tasks.class ← source file is DelombokTask.java

AnnotationProcessorHider.class ← source file is AnnotationProcessor.java

This causes these .class files to be reported as having no corresponding source mapping.

Solution

This PR improves Java D2D mapping by:

Extracting the declared class name from .java source files

Using the declared class name (instead of only the filename) to build the JVM mapping index

Allowing .class files to correctly map even when the source filename differs

The change is limited to Java JVM mapping logic and does not affect other ecosystems.

Related issue

Fixes: Compiled .class May Differ from Source Filename – map_deploy_to_devel (Java)
🔗 #1993

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.

1 participant