named-regexp
  1. named-regexp
  2. REGEX-10

NamedMatcher.equals() does not compare all instance fields with another; hashCode() also wrong

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1.9
    • Labels:
      None

      Description

      The NamedMatcher.equals() function currently only checks whether the matcher instance is equal to the other's matcher instance. It should also compare the parentPattern.

      It also does not do a basic type comparison or null-check (something that every equals() should do).

      Similarly, NamedMatcher.hashCode() currently only returns the hash code of the matcher instance when it should include parentPattern.hashCode() because parentPattern is also used in equals().

      This was found by FindBugs.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Anthony Trinh [Administrator]
            Reporter:
            Anthony Trinh [Administrator]
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours
              2h

                Development