@Contended: explicit default value behaves differently from the implicit value

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • hs25
    • Affects Version/s: hs25
    • Component/s: hotspot
    • Environment:

      jdk: Java(TM) SE Runtime Environment 1.8.0 b89 (1.8.0-ea-b89)
      vm: Java HotSpot(TM) Client VM 25.0 b31 (25.0-b31)
      vmopts: -XX:+EnableContended -XX:-RestrictContended

    • b34

        public class Test {
            private static class T0 {
                @Contended("")
                private double double1;
                @Contended("")
                private double double2;
            }
            private static class T1 {
                @Contended
                private double double1;
                @Contended
                private double double2;
            }
        }

        Test$T0: field layout
          @ 12 --- instance fields start ---
          @144 "double1" D
          @152 "double2" D
          @ 12 --- instance fields end ---
          @288 --- instance ends ---
          @ 88 --- static fields start ---
          @ 88 --- static fields end ---

        Test$T1: field layout
          @ 12 --- instance fields start ---
          @144 "double1" D
          @280 "double2" D
          @ 12 --- instance fields end ---
          @416 --- instance ends ---
          @ 88 --- static fields start ---
          @ 88 --- static fields end ---

              Assignee:
              Aleksey Shipilev
              Reporter:
              Igor Ignatyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: