aboutcode-org / aboutcode-org/scancode.io

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

Aberta
#1,993 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
215
Forks
203
Merge médio
4d 8h
PRs com merge (30d)
6

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.