Mark descriptor features as volatile to avoid data races in double-checked locking

PiperOrigin-RevId: 600547519
pull/15527/head
Sandy Zhang 10 months ago committed by Copybara-Service
parent 8b92099937
commit 882e7843de
  1. 2
      java/core/src/main/java/com/google/protobuf/Descriptors.java

@ -2751,7 +2751,7 @@ public final class Descriptors {
}
GenericDescriptor parent;
FeatureSet features;
volatile FeatureSet features;
}
/** Thrown when building descriptors fails because the source DescriptorProtos are not valid. */

Loading…
Cancel
Save