com.sun.javatest.TestDescription::equals can return true for different test

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P2
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None

      TestDescription::equals compares only each 2nd value from 'fields' array, it doesn't compare rrurl and rootRelativePath. so two different tests will be considered equal if they have the same values (even if keys are different) , for example, the following two jtreg tests will have equal TestDescription objects:

      foo/test.java
      /*
       * @test
       * @run main Test
       */
      public class Test { public static void main(String[]args) { throw new Error(); } }
      and

      bar/test.java
      /*
       * @test
       * @run main Test
       */
      public class Test { public static void main(String[]args) { } }

            Assignee:
            Alexey Fedorchenko (Inactive)
            Reporter:
            Igor Ignatyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: