QDox
  1. QDox
  2. QDOX-223

Package annotations not found if package-info.java is first file in package

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.12
    • Fix Version/s: 2.0
    • Component/s: Parser
    • Labels:
      None
    • Number of attachments :
      1

      Description

      If a package has package-info.java as the first file in the directory then annotations in that file are not added to JavaPackage object that is created.

      Example project with a failing test is attached.

        Activity

        Hide
        Robert Scholte added a comment -

        Actually this is a feature-request.

        QDox generates a Model from package-info.java as if it would just a normal JavaClass. Only the package of a JavaClass keeps its annotations.
        So when calling builder.getPackages() QDox should first check if there's a package-info.java. Also this file shouldn't be exposed under builder.getClasses()

        Show
        Robert Scholte added a comment - Actually this is a feature-request. QDox generates a Model from package-info.java as if it would just a normal JavaClass . Only the package of a JavaClass keeps its annotations. So when calling builder.getPackages() QDox should first check if there's a package-info.java . Also this file shouldn't be exposed under builder.getClasses()
        Robert Scholte made changes -
        Field Original Value New Value
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Assignee Robert Scholte [ rfscholte ]
        Hide
        Robert Scholte added a comment -

        Fixed in rev. 1021
        rev. 1022 and rev. 1023 contain the related integration-test

        Show
        Robert Scholte added a comment - Fixed in rev. 1021 rev. 1022 and rev. 1023 contain the related integration-test
        Robert Scholte made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0 [ 15636 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Robert Scholte
            Reporter:
            Lee Butts
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: