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

[lworld] Test jdk/internal/util/ReferencedKeyTest.java fails when run with migrated classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • repo-valhalla
    • core-libs

      Test jdk/internal/util/ReferencedKeyTest.java fails when run with Valhalla migrated classes because it tries to create a WeakReference from an instance of java.lang.Long:

      java.lang.IdentityException: java.lang.Long is not an identity class
      at java.base/java.util.Objects.requireIdentity(Objects.java:212)
      at java.base/java.lang.ref.Reference.<init>(Reference.java:515)
      at java.base/java.lang.ref.WeakReference.<init>(WeakReference.java:78)
      at java.base/jdk.internal.util.WeakReferenceKey.<init>(WeakReferenceKey.java:53)
      at java.base/jdk.internal.util.ReferencedKeyMap.entryKey(ReferencedKeyMap.java:165)
      at java.base/jdk.internal.util.ReferencedKeyMap.put(ReferencedKeyMap.java:217)
      at java.base/jdk.internal.util.ReferencedKeyTest.populate(ReferencedKeyTest.java:165)
      at java.base/jdk.internal.util.ReferencedKeyTest.mapTest(ReferencedKeyTest.java:68)
      at java.base/jdk.internal.util.ReferencedKeyTest.main(ReferencedKeyTest.java:49)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
      at java.base/java.lang.VirtualThread.run(VirtualThread.java:329)

            rriggs Roger Riggs
            fparain Frederic Parain
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: