JDK-8156124 : Update compiler/unsafe/UnsafeGetConstantField after JDK-8148518 is fixed
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-05-05
  • Updated: 2017-01-27
  • Resolved: 2016-05-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b120Fixed
Related Reports
Duplicate :  
Relates :  
Description
diff --git a/test/compiler/unsafe/UnsafeGetConstantField.java b/test/compiler/unsafe/UnsafeGetConstantField.java
--- a/test/compiler/unsafe/UnsafeGetConstantField.java
+++ b/test/compiler/unsafe/UnsafeGetConstantField.java
@@ -147,10 +147,7 @@
             if (!hasDefaultValue && (stable || g.isFinal())) {
                 Asserts.assertEQ(t.value, test.testDirect(),
                         "direct read doesn't return prev value");
-                // fails for getCharUnaligned due to JDK-8148518
-                if (!(t == JavaType.C && "Unaligned".equals(postfix))) {
-                    Asserts.assertEQ(test.testDirect(), test.testUnsafe());
-                }
+                Asserts.assertEQ(test.testDirect(), test.testUnsafe());
             } else {
                 Asserts.assertEQ(t.defaultValue, test.testDirect(),
                         "direct read doesn't return default value");