diff options
author | Andrey Loskutov | 2019-12-06 15:49:22 +0000 |
---|---|---|
committer | Andrey Loskutov | 2020-08-24 05:59:31 +0000 |
commit | fe841a02686108d1034262caba01c8bf786d72ff (patch) | |
tree | 557d5bb4c52aea965eb4231306064f91ad4a223d | |
parent | 94abb1e6f79b4113d98e973565b012535fa75bd0 (diff) | |
download | eclipse.jdt.core-fe841a02686108d1034262caba01c8bf786d72ff.tar.gz eclipse.jdt.core-fe841a02686108d1034262caba01c8bf786d72ff.tar.xz eclipse.jdt.core-fe841a02686108d1034262caba01c8bf786d72ff.zip |
Bug 544521 - Enum switch lookup table is not safely published, accordingS4_17_0_RC1I20200828-0150I20200826-1800I20200826-0600I20200825-1800I20200825-0600I20200824-1900I20200824-0600
to Java Memory Model
Added "volatile" modifier to the generated switch table.
Change-Id: I3fbb15ad881c97be7d4bc70ade35be442cf0ab0b
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java index a5ae9d924c..8fc628dc63 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java @@ -555,7 +555,7 @@ public SyntheticFieldBinding addSyntheticFieldForSwitchEnum(char[] fieldName, St synthField = new SyntheticFieldBinding( fieldName, this.scope.createArrayType(TypeBinding.INT,1), - (isInterface() ? (ClassFileConstants.AccPublic | ClassFileConstants.AccFinal) : ClassFileConstants.AccPrivate) | ClassFileConstants.AccStatic | ClassFileConstants.AccSynthetic, + (isInterface() ? (ClassFileConstants.AccPublic | ClassFileConstants.AccFinal) : ClassFileConstants.AccPrivate | ClassFileConstants.AccVolatile) | ClassFileConstants.AccStatic | ClassFileConstants.AccSynthetic, this, Constant.NotAConstant, this.synthetics[SourceTypeBinding.FIELD_EMUL].size()); |