Skip to content

Compiled .class May Differ from Source Filename - map_deploy_to_devel (Java) #1993

@chinyeungli

Description

@chinyeungli

Although uncommon, there are cases where the name of a compiled .class file does not directly match its source filename.

Use case

Project: lombok-1.18.42
source: https://repo1.maven.org/maven2/org/projectlombok/lombok/1.18.42/lombok-1.18.42-sources.jar
binary: https://repo1.maven.org/maven2/org/projectlombok/lombok/1.18.42/lombok-1.18.42.jar

The current D2D indicates the files to/lombok/delombok/ant/Tasks.class and to/lombok/launch/AnnotationProcessorHider.class don't have corresponding source file mapping.

Image

The source side doesn't have delombok/ant/Tasks.java or launch/AnnotationProcessorHider.java

However, there are
delombok/ant/DelombokTask.java and launch/AnnotationProcessor.java in the source side

where
delombok/ant/DelombokTask.java has Tasks as its class name

class Tasks {

and launch/AnnotationProcessor.java has AnnotationProcessorHider as its class name

class AnnotationProcessorHider {

which imply these are the sources for the above listed .class files.

In other words, we may need to extract the class name from the source file to establish the D2D mapping, rather than relying solely on file base name comparison.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions