QDox
  1. QDox
  2. QDOX-29

inner class names yields incorrect result from JavaSource.resolveType

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: Java API
    • Labels:
      None
    • Environment:
      I use Java 1.4.2 and HEAD of the qdox CVS.
    • Number of attachments :
      0

      Description

      Passing the name of an inner class in the form <name of outer class>.<name of inner class> (i.e. "Map.Entry") yields an incorrect result from JavaSource.resovleType. The reason is that it ends up in resolveTypeInternal which finds the '.' in the name and hence assumes it to be fully qualified.

      The correct behavior is propably to always strip of the leaf name and check if the remaining name resolves to a class or a package.

        Activity

        Mike Williams made changes -
        Field Original Value New Value
        Assignee Mike Williams [ mdub ]
        Mike Williams made changes -
        Fix Version/s 1.4 [ 10304 ]
        Description Passing the name of an inner class in the form <name of outer class>.<name of inner class> (i.e. "Map.Entry") yields an incorrect result from JavaSource.resovleType. The reason is that it ends up in resolveTypeInternal which finds the '.' in the name and hence assumes it to be fully qualified.

        The correct behavior is propably to always strip of the leaf name and check if the remaining name resolves to a class or a package.
        Passing the name of an inner class in the form <name of outer class>.<name of inner class> (i.e. "Map.Entry") yields an incorrect result from JavaSource.resovleType. The reason is that it ends up in resolveTypeInternal which finds the '.' in the name and hence assumes it to be fully qualified.

        The correct behavior is propably to always strip of the leaf name and check if the remaining name resolves to a class or a package.
        Hide
        Mike Williams added a comment -

        As Thomas suggested, the fix was simply to replace the last '.' with '$' and re-try.

        Show
        Mike Williams added a comment - As Thomas suggested, the fix was simply to replace the last '.' with '$' and re-try.
        Mike Williams made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mike Williams added a comment -

        Closing old resolved issues.

        Show
        Mike Williams added a comment - Closing old resolved issues.
        Mike Williams made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mike Williams
            Reporter:
            Thomas Hallgren
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: