Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-1212

Detection that class is required in compile scope not happening because class only used as generic type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • maven-dependency-analyzer-1.13.0
    • None
    • None

    Description

      Let's say we have a class in module A which calls a method `List<MyObject> 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rec Richard Eckart de Castilho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: