QDox
  1. QDox
  2. QDOX-17

JavaMethod.equals() failed for constructors

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: Java API
    • Labels:
      None
    • Environment:
      Windows 2K
      CVS Tarball (2003-09-01)
      Sun JDK 1.4.1
    • Number of attachments :
      0

      Description

      A NullPointerException is raised when testing equality between two constructors. The field "returnType" is null for a constructor which lead to the exception at line 64 in JavaMethod.
      A workaround is to test if the returnType of the JavaMethod instance is null before testing return types.

      if(getReturns() != null)

      { if (!m.getReturns().equals(getReturns())) return false; }

      I also noticed that the JavaMethodTest unit test only focuses on method testing and not on constructor testing.

        Activity

        Mike Williams made changes -
        Field Original Value New Value
        Assignee Mike Williams [ mdub ]
        Status Unassigned [ 1 ] Assigned [ 2 ]
        Mike Williams made changes -
        Fix Version/s 1.3 [ 10107 ]
        Status Assigned [ 2 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Mike Williams
            Reporter:
            Laurent Etiemble
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: