QDox

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

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.
Hide
Mike Williams added a comment -

Closing old resolved issues.

Show
Mike Williams added a comment - Closing old resolved issues.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: