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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • None
    • 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) { } }

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

              Created:
              Updated:
              Resolved: