konveyor / konveyor/java-analyzer-bundle

SymbolInformation returned not accurate for annotation search

未关闭
#175 2 条评论 0 个 reaction 已指派 1 人 已被 @jmle 认领 在 GitHub 查看
kind/bug priority/important-soon triage/accepted
主要语言
Java
星标
2
派生
21
PR 合并指标
30 天内没有已合并 PR

描述

## Issue

I'm working a PR to add more tests to this project and when I execute the following query for an annotation, I got a response which is not fully correct.

Here is the class parsed: https://github.com/snowdrop/migration-tool/blob/main/applications/spring-boot-todo-app/src/main/java/com/todo/app/controller/TaskController.java#L77
and code
```
@PostMapping("/home")
@ResponseBody
public ResponseEntity> createTask(@RequestBody Task task) {
taskService.addTask(task);
List tasks = taskService.getAllTasks();
return ResponseEntity.ok(tasks);
}
```
The search engine is returning as Symbol the first annotation `@PostMapping` and not the 2nd `@ResponseBody`.

Query: `org.springframework.web.bind.annotation.ResponseBody`, location: `4`

```
!ENTRY org.eclipse.jdt.ls.core 1 0 2025-11-07 11:41:29.344
!MESSAGE FQDN from code select: org.springframework.web.bind.annotation.ResponseBody

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-11-07 11:41:29.345
!MESSAGE KONVEYOR_LOG: Got: 2 Number of search matching the query: "org.springframework.web.bind.annotation.ResponseBody" and location type: 4

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-11-07 11:41:29.345
!MESSAGE KONVEYOR_LOG: Results size: 1

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-11-07 11:41:29.347
!MESSAGE KONVEYOR_LOG:
-------------------------
Symbol name: PostMapping
kind: Property
Location: Location [
uri = "file:///Users/cmoullia/code/application-modernisation/02_konveyor/fork-java-analyzer-bundle/java-analyzer-bundle.test/target/workingProjects/maven/springboot-todo/src/main/java/com/todo/app/controller/TaskController.java"
range = Range [
start = Position [
line = 76
character = 5
]
end = Position [
line = 76
character = 17
]
]
]
%TESTE 2,shouldMatchSpringResponseBodyAnnotationTest(io.konveyor.tackle.core.test.JavaAnnotationTest)
%RUNTIME5599
```

Query: `ResponseBody`, location: `4`

```
!MESSAGE KONVEYOR_LOG: Got: 2 Number of search matching the query: "ResponseBody" and location type: 4
!MESSAGE KONVEYOR_LOG: Results size: 2
!MESSAGE KONVEYOR_LOG:
-------------------------
Symbol name: PostMapping
kind: Property
Location: Location [
uri = "file:///Users/cmoullia/code/application-modernisation/02_konveyor/fork-java-analyzer-bundle/java-analyzer-bundle.test/target/workingProjects/maven/springboot-todo/src/main/java/com/todo/app/controller/TaskController.java"
range = Range [
start = Position [
line = 76
character = 5
]
end = Position [
line = 76
character = 17
]
]
]
-------------------------
Symbol name: ResponseBody
kind: Property
Location: Location [
uri = "file:///Users/cmoullia/code/application-modernisation/02_konveyor/fork-java-analyzer-bundle/java-analyzer-bundle.test/target/workingProjects/maven/springboot-todo/src/main/java/com/todo/app/controller/TaskController.java"
range = Range [
start = Position [
line = 76
character = 5
]
end = Position [
line = 76
character = 17
]
]
]
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。