apache / apache/maven-dependency-analyzer
[MSHARED-1212] Detection that class is required in compile scope not happening because class only used as generic type
- Dominant language
- Java
- Stars
- 43
- Forks
- 54
- Avg merge
- 10h 49m
- Merged PRs (30d)
- 1
Description
**[Richard Eckart de Castilho](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rec)** opened **[MSHARED-1212](https://issues.apache.org/jira/browse/MSHARED-1212?redirect=false)** and commented
Let's say we have a class in module A which calls a method `List getList()` from module B. The class `MyObject` comes from module C.
Also, there is some test class in module A which uses `MyObject`.
Eclipse will fail to compile this unless MyObject is in the compile scope.
The dependency analyzer will, however, not detect that MyObject is required in the compile scope because the class file for A does not contain a reference to MyObject (due to generic type erasure) and will indicate that module C/MyObject should be in scope test.
---
**Affects:** maven-dependency-analyzer-1.13.0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.