-
Bug
-
Resolution: Fixed
-
P3
-
hs25, 8
-
b16
-
b34
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8015532 | 8 | Unassigned | P3 | Resolved | Fixed | b92 |
if class annotated by @Contended, its fields must be padded. but they don't padded againts subclasses's fields.
e.g. offset of T1E.int2 and T1E.int3 must be equal to 272 and 276 respectively:
@Contended
class T1 {
private int int1;
}
class T1E extends T1 {
private int int2;
private int int3;
}
PrintFieldLayout:
T1: field layout
@140 --- instance fields start ---
@140 "int1" I
@140 --- instance fields end ---
@272 --- instance ends ---
@ 88 --- static fields start ---
@344 --- static fields end ---
T1E: field layout
@144 --- instance fields start ---
@144 "int2" I
@148 "int3" I
@144 --- instance fields end ---
@152 --- instance ends ---
@ 88 --- static fields start ---
@ 88 --- static fields end ---
e.g. offset of T1E.int2 and T1E.int3 must be equal to 272 and 276 respectively:
@Contended
class T1 {
private int int1;
}
class T1E extends T1 {
private int int2;
private int int3;
}
PrintFieldLayout:
T1: field layout
@140 --- instance fields start ---
@140 "int1" I
@140 --- instance fields end ---
@272 --- instance ends ---
@ 88 --- static fields start ---
@344 --- static fields end ---
T1E: field layout
@144 --- instance fields start ---
@144 "int2" I
@148 "int3" I
@144 --- instance fields end ---
@152 --- instance ends ---
@ 88 --- static fields start ---
@ 88 --- static fields end ---
- backported by
-
JDK-8015532 @Contended doesn't work correctly with inheritance
- Resolved
- relates to
-
JDK-8003985 Support @Contended Annotation - JEP 142
- Closed
-
JDK-8003985 Support @Contended Annotation - JEP 142
- Closed