diff --git a/java/core/src/main/java/com/google/protobuf/Descriptors.java b/java/core/src/main/java/com/google/protobuf/Descriptors.java index bade681e1d..19fd96b438 100644 --- a/java/core/src/main/java/com/google/protobuf/Descriptors.java +++ b/java/core/src/main/java/com/google/protobuf/Descriptors.java @@ -2805,9 +2805,10 @@ public final class Descriptors { } boolean hasPossibleUnknownJavaFeature = !unresolvedFeatures.getUnknownFields().isEmpty() - && unresolvedFeatures - .getUnknownFields() - .hasField(JavaFeaturesProto.java_.getNumber()); + && (unresolvedFeatures + .getUnknownFields() + .hasField(JavaFeaturesProto.java_.getNumber()) + ); if (hasPossibleCustomJavaFeature || hasPossibleUnknownJavaFeature) { ExtensionRegistry registry = ExtensionRegistry.newInstance(); registry.add(JavaFeaturesProto.java_);