Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-6823019

APIdoc for TestFilter should mention necessity to implement .equals() method

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: jt4.5
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b03
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Description

      Javatest Harness has a public API class com.sun.javatest.TestFilter that test suite developers may use to implement their own test filters.

      Javadoc for this class should mention a strong recommendation to override and implement property .equals(Object) (and thus - .hashCode()) methods.

      This is necessary because Harness later may call for .equals() to test if thisFilter is equal to otherFilter. Depending on this comparison Harness then makes some functional decisions. For example it may trigger refresh of the Tree if it suspects filters were changed.
      See usages of com.sun.javatest.CompositeFilter.equals(TestFilter[], TestFilter[]) method for usecases.

        Attachments

          Activity

            People

            • Assignee:
              bkurotsu Brian Kurotsuchi (Inactive)
              Reporter:
              kromanovorcl Konstantin Romanovskiy (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: