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

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

    Details

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

      Description

      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) { } }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: