Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8256152

tests fail because of ambiguous method resolution

    XMLWordPrintable

    Details

      Description

      A bunch of methods have been added to `org.testng.Assert` such that a block of streams tests fail because of ambiguous method resolution.

      Here is a representative error:

      /Volumes/J2GWork/jdk/jdk.testng7/open/test/jdk/java/util/stream/boottest/java.base/java/util/stream/DoubleNodeTest.java:69: error: reference to assertEquals is ambiguous
                  assertEquals(array[i], list.get(i));
                  ^
        both method assertEquals(Object,Object) in Assert and method assertEquals(double,double) in Assert match
      1 error

      These tests are affected:

      java/util/stream/boottest/java.base/java/util/stream/DoubleNodeTest.java Failed. Compilation failed: Compilation failed
      java/util/stream/boottest/java.base/java/util/stream/FlagOpTest.java Failed. Compilation failed: Compilation failed
      java/util/stream/boottest/java.base/java/util/stream/IntNodeTest.java Failed. Compilation failed: Compilation failed
      java/util/stream/boottest/java.base/java/util/stream/LongNodeTest.java Failed. Compilation failed: Compilation failed
      java/util/stream/boottest/java.base/java/util/stream/NodeBuilderTest.java Failed. Compilation failed: Compilation failed
      java/util/stream/boottest/java.base/java/util/stream/NodeTest.java Failed. Compilation failed: Compilation failed
      java/util/stream/boottest/java.base/java/util/stream/SliceSpliteratorTest.java Failed. Compilation failed: Compilation failed
      java/util/stream/boottest/java.base/java/util/stream/SpinedBufferTest.java Failed. Compilation failed: Compilation failed
      java/util/stream/boottest/java.base/java/util/stream/StreamFlagsTest.java Failed. Compilation failed: Compilation failed
      java/util/stream/boottest/java.base/java/util/stream/StreamOpFlagsTest.java Failed. Compilation failed: Compilation failed
      java/util/stream/boottest/java.base/java/util/stream/StreamReuseTest.java Failed. Compilation failed: Compilation failed

      According to a comparison of java output, these methods were added:

      > public static void assertEquals(boolean[], boolean[]);
      > public static void assertEquals(char[], char[]);
      > public static void assertEquals(double, double);
      > public static void assertEquals(double[], double[]);
      > public static void assertEquals(float, float);
      > public static void assertEquals(float[], float[]);
      > public static void assertEquals(int[], int[]);
      > public static void assertEquals(long[], long[]);
      > public static void assertEquals(short[], short[]);


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              smarks Stuart Marks
              Reporter:
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: