Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0.4
    • Component/s: XML code generator
    • Labels:
      None
    • Environment:
      Windows XP SP2, Java JDK 1.5.0_03, Castor 1.0
    • Number of attachments :
      4

      Description

      Allows the source generator tool to create the hashCode() method when the equals() method is created.

      1. c1417-final.diff
        9 kB
        Edward Kuns
      2. c1417-patch.diff
        7 kB
        Edward Kuns
      3. patch-C1417-20060602.txt
        5 kB
        Ralf Joachim
      4. SourceFactory.java
        86 kB
        Michele Mazzucco

        Activity

        Hide
        Edward Kuns added a comment -

        I can reproduce the test case failures with this patch applied. Something is bizarre!

        Show
        Edward Kuns added a comment - I can reproduce the test case failures with this patch applied. Something is bizarre!
        Hide
        Edward Kuns added a comment -

        There were two problems with hashCode(). One was that an object with multiple double variables would have multiple definitions of "long tmp". The other is that null objects caused the hashCode() recursion to return a null pointer exception. I'll shortly attach a new patch that is ready for review.

        Show
        Edward Kuns added a comment - There were two problems with hashCode(). One was that an object with multiple double variables would have multiple definitions of "long tmp". The other is that null objects caused the hashCode() recursion to return a null pointer exception. I'll shortly attach a new patch that is ready for review.
        Hide
        Edward Kuns added a comment -

        Attached is a new patch against trunk that works for me and that fixes the problems noted above. This patch also correctly does not include the has* variables in the hashCode() calculation. But only if it's the has* that was generated by Castor for a Primitive.

        Show
        Edward Kuns added a comment - Attached is a new patch against trunk that works for me and that fixes the problems noted above. This patch also correctly does not include the has * variables in the hashCode() calculation. But only if it's the has * that was generated by Castor for a Primitive.
        Hide
        Werner Guttmann added a comment -

        Great. I think Ralf will be quite reliefed to se this fixed finally ....

        Show
        Werner Guttmann added a comment - Great. I think Ralf will be quite reliefed to se this fixed finally ....
        Hide
        Edward Kuns added a comment -

        Final patch, including release notes.

        Show
        Edward Kuns added a comment - Final patch, including release notes.

          People

          • Assignee:
            Edward Kuns
            Reporter:
            Michele Mazzucco
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: