From 3c0f05c1fa4c75afbf4b8a149b320d77c4471fd0 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 1 Nov 2022 08:24:33 -0700 Subject: [PATCH] Fix lint warnings for protobuf GeneratedMessage.java Specifically this CL changes the [type variable names](https://engdoc.corp.google.com/eng/doc/devguide/java/style/index.md?cl=head#s5.2.8-type-variable-names) only. PiperOrigin-RevId: 485323620 --- .../google/protobuf/GeneratedMessageV3.java | 362 +++++++++--------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java b/java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java index 89f9b7236f..6518116867 100644 --- a/java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java +++ b/java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java @@ -520,8 +520,8 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri /** Builder class for {@link GeneratedMessageV3}. */ @SuppressWarnings("unchecked") - public abstract static class Builder> - extends AbstractMessage.Builder { + public abstract static class Builder> + extends AbstractMessage.Builder { private BuilderParent builderParent; @@ -583,8 +583,8 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri } @Override - public BuilderType clone() { - BuilderType builder = (BuilderType) getDefaultInstanceForType().newBuilderForType(); + public BuilderT clone() { + BuilderT builder = (BuilderT) getDefaultInstanceForType().newBuilderForType(); builder.mergeFrom(buildPartial()); return builder; } @@ -594,10 +594,10 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri * builtin fields back to the initial values. */ @Override - public BuilderType clear() { + public BuilderT clear() { unknownFieldsOrBuilder = UnknownFieldSet.getDefaultInstance(); onChanged(); - return (BuilderType) this; + return (BuilderT) this; } /** @@ -701,21 +701,21 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri } @Override - public BuilderType setField(final FieldDescriptor field, final Object value) { + public BuilderT setField(final FieldDescriptor field, final Object value) { internalGetFieldAccessorTable().getField(field).set(this, value); - return (BuilderType) this; + return (BuilderT) this; } @Override - public BuilderType clearField(final FieldDescriptor field) { + public BuilderT clearField(final FieldDescriptor field) { internalGetFieldAccessorTable().getField(field).clear(this); - return (BuilderType) this; + return (BuilderT) this; } @Override - public BuilderType clearOneof(final OneofDescriptor oneof) { + public BuilderT clearOneof(final OneofDescriptor oneof) { internalGetFieldAccessorTable().getOneof(oneof).clear(this); - return (BuilderType) this; + return (BuilderT) this; } @Override @@ -729,51 +729,51 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri } @Override - public BuilderType setRepeatedField( + public BuilderT setRepeatedField( final FieldDescriptor field, final int index, final Object value) { internalGetFieldAccessorTable().getField(field).setRepeated(this, index, value); - return (BuilderType) this; + return (BuilderT) this; } @Override - public BuilderType addRepeatedField(final FieldDescriptor field, final Object value) { + public BuilderT addRepeatedField(final FieldDescriptor field, final Object value) { internalGetFieldAccessorTable().getField(field).addRepeated(this, value); - return (BuilderType) this; + return (BuilderT) this; } - private BuilderType setUnknownFieldsInternal(final UnknownFieldSet unknownFields) { + private BuilderT setUnknownFieldsInternal(final UnknownFieldSet unknownFields) { unknownFieldsOrBuilder = unknownFields; onChanged(); - return (BuilderType) this; + return (BuilderT) this; } @Override - public BuilderType setUnknownFields(final UnknownFieldSet unknownFields) { + public BuilderT setUnknownFields(final UnknownFieldSet unknownFields) { return setUnknownFieldsInternal(unknownFields); } /** * This method is obsolete, but we must retain it for compatibility with older generated code. */ - protected BuilderType setUnknownFieldsProto3(final UnknownFieldSet unknownFields) { + protected BuilderT setUnknownFieldsProto3(final UnknownFieldSet unknownFields) { return setUnknownFieldsInternal(unknownFields); } @Override - public BuilderType mergeUnknownFields(final UnknownFieldSet unknownFields) { + public BuilderT mergeUnknownFields(final UnknownFieldSet unknownFields) { if (UnknownFieldSet.getDefaultInstance().equals(unknownFields)) { - return (BuilderType) this; + return (BuilderT) this; } if (UnknownFieldSet.getDefaultInstance().equals(unknownFieldsOrBuilder)) { unknownFieldsOrBuilder = unknownFields; onChanged(); - return (BuilderType) this; + return (BuilderT) this; } getUnknownFieldSetBuilder().mergeFrom(unknownFields); onChanged(); - return (BuilderType) this; + return (BuilderT) this; } @Override @@ -919,49 +919,49 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri // Extensions-related stuff /** Extends {@link MessageOrBuilder} with extension-related functions. */ - public interface ExtendableMessageOrBuilder + public interface ExtendableMessageOrBuilder extends MessageOrBuilder { // Re-define for return type covariance. @Override Message getDefaultInstanceForType(); /** Check if a singular extension is present. */ - boolean hasExtension(ExtensionLite extension); + boolean hasExtension(ExtensionLite extension); /** Get the number of elements in a repeated extension. */ - int getExtensionCount(ExtensionLite> extension); + int getExtensionCount(ExtensionLite> extension); /** Get the value of an extension. */ - Type getExtension(ExtensionLite extension); + T getExtension(ExtensionLite extension); /** Get one element of a repeated extension. */ - Type getExtension(ExtensionLite> extension, int index); + T getExtension(ExtensionLite> extension, int index); /** Check if a singular extension is present. */ - boolean hasExtension( - Extension extension); + boolean hasExtension( + Extension extension); /** Check if a singular extension is present. */ - boolean hasExtension( - GeneratedExtension extension); + boolean hasExtension( + GeneratedExtension extension); /** Get the number of elements in a repeated extension. */ - int getExtensionCount( - Extension> extension); + int getExtensionCount( + Extension> extension); /** Get the number of elements in a repeated extension. */ - int getExtensionCount( - GeneratedExtension> extension); + int getExtensionCount( + GeneratedExtension> extension); /** Get the value of an extension. */ - Type getExtension( - Extension extension); + T getExtension( + Extension extension); /** Get the value of an extension. */ - Type getExtension( - GeneratedExtension extension); + T getExtension( + GeneratedExtension extension); /** Get one element of a repeated extension. */ - Type getExtension( - Extension> extension, + T getExtension( + Extension> extension, int index); /** Get one element of a repeated extension. */ - Type getExtension( - GeneratedExtension> extension, + T getExtension( + GeneratedExtension> extension, int index); } @@ -997,8 +997,8 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri * *

See also {@link ExtendableBuilder}. */ - public abstract static class ExtendableMessage - extends GeneratedMessageV3 implements ExtendableMessageOrBuilder { + public abstract static class ExtendableMessage + extends GeneratedMessageV3 implements ExtendableMessageOrBuilder { private static final long serialVersionUID = 1L; @@ -1008,12 +1008,12 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri this.extensions = FieldSet.newFieldSet(); } - protected ExtendableMessage(ExtendableBuilder builder) { + protected ExtendableMessage(ExtendableBuilder builder) { super(builder); this.extensions = builder.buildExtensions(); } - private void verifyExtensionContainingType(final Extension extension) { + private void verifyExtensionContainingType(final Extension extension) { if (extension.getDescriptor().getContainingType() != getDescriptorForType()) { // This can only happen if someone uses unchecked operations. throw new IllegalArgumentException( @@ -1028,8 +1028,8 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri /** Check if a singular extension is present. */ @Override @SuppressWarnings("unchecked") - public final boolean hasExtension(final ExtensionLite extensionLite) { - Extension extension = checkNotLite(extensionLite); + public final boolean hasExtension(final ExtensionLite extensionLite) { + Extension extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); return extensions.hasField(extension.getDescriptor()); @@ -1038,9 +1038,9 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri /** Get the number of elements in a repeated extension. */ @Override @SuppressWarnings("unchecked") - public final int getExtensionCount( - final ExtensionLite> extensionLite) { - Extension> extension = checkNotLite(extensionLite); + public final int getExtensionCount( + final ExtensionLite> extensionLite) { + Extension> extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); final FieldDescriptor descriptor = extension.getDescriptor(); @@ -1050,83 +1050,83 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri /** Get the value of an extension. */ @Override @SuppressWarnings("unchecked") - public final Type getExtension(final ExtensionLite extensionLite) { - Extension extension = checkNotLite(extensionLite); + public final T getExtension(final ExtensionLite extensionLite) { + Extension extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); FieldDescriptor descriptor = extension.getDescriptor(); final Object value = extensions.getField(descriptor); if (value == null) { if (descriptor.isRepeated()) { - return (Type) Collections.emptyList(); + return (T) Collections.emptyList(); } else if (descriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - return (Type) extension.getMessageDefaultInstance(); + return (T) extension.getMessageDefaultInstance(); } else { - return (Type) extension.fromReflectionType(descriptor.getDefaultValue()); + return (T) extension.fromReflectionType(descriptor.getDefaultValue()); } } else { - return (Type) extension.fromReflectionType(value); + return (T) extension.fromReflectionType(value); } } /** Get one element of a repeated extension. */ @Override @SuppressWarnings("unchecked") - public final Type getExtension( - final ExtensionLite> extensionLite, final int index) { - Extension> extension = checkNotLite(extensionLite); + public final T getExtension( + final ExtensionLite> extensionLite, final int index) { + Extension> extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); FieldDescriptor descriptor = extension.getDescriptor(); - return (Type) + return (T) extension.singularFromReflectionType(extensions.getRepeatedField(descriptor, index)); } /** Check if a singular extension is present. */ @Override - public final boolean hasExtension(final Extension extension) { - return hasExtension((ExtensionLite) extension); + public final boolean hasExtension(final Extension extension) { + return hasExtension((ExtensionLite) extension); } /** Check if a singular extension is present. */ @Override - public final boolean hasExtension( - final GeneratedExtension extension) { - return hasExtension((ExtensionLite) extension); + public final boolean hasExtension( + final GeneratedExtension extension) { + return hasExtension((ExtensionLite) extension); } /** Get the number of elements in a repeated extension. */ @Override - public final int getExtensionCount( - final Extension> extension) { - return getExtensionCount((ExtensionLite>) extension); + public final int getExtensionCount( + final Extension> extension) { + return getExtensionCount((ExtensionLite>) extension); } /** Get the number of elements in a repeated extension. */ @Override - public final int getExtensionCount( - final GeneratedExtension> extension) { - return getExtensionCount((ExtensionLite>) extension); + public final int getExtensionCount( + final GeneratedExtension> extension) { + return getExtensionCount((ExtensionLite>) extension); } /** Get the value of an extension. */ @Override - public final Type getExtension(final Extension extension) { - return getExtension((ExtensionLite) extension); + public final T getExtension(final Extension extension) { + return getExtension((ExtensionLite) extension); } /** Get the value of an extension. */ @Override - public final Type getExtension( - final GeneratedExtension extension) { - return getExtension((ExtensionLite) extension); + public final T getExtension( + final GeneratedExtension extension) { + return getExtension((ExtensionLite) extension); } /** Get one element of a repeated extension. */ @Override - public final Type getExtension( - final Extension> extension, final int index) { - return getExtension((ExtensionLite>) extension, index); + public final T getExtension( + final Extension> extension, final int index) { + return getExtension((ExtensionLite>) extension, index); } /** Get one element of a repeated extension. */ @Override - public final Type getExtension( - final GeneratedExtension> extension, final int index) { - return getExtension((ExtensionLite>) extension, index); + public final T getExtension( + final GeneratedExtension> extension, final int index) { + return getExtension((ExtensionLite>) extension, index); } /** Called by subclasses to check if all extensions are initialized. */ @@ -1363,9 +1363,9 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri */ @SuppressWarnings("unchecked") public abstract static class ExtendableBuilder< - MessageType extends ExtendableMessage, - BuilderType extends ExtendableBuilder> - extends Builder implements ExtendableMessageOrBuilder { + MessageT extends ExtendableMessage, + BuilderT extends ExtendableBuilder> + extends Builder implements ExtendableMessageOrBuilder { private FieldSet.Builder extensions; @@ -1381,7 +1381,7 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri } @Override - public BuilderType clear() { + public BuilderT clear() { extensions = null; return super.clear(); } @@ -1392,7 +1392,7 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri } } - private void verifyExtensionContainingType(final Extension extension) { + private void verifyExtensionContainingType(final Extension extension) { if (extension.getDescriptor().getContainingType() != getDescriptorForType()) { // This can only happen if someone uses unchecked operations. throw new IllegalArgumentException( @@ -1406,8 +1406,8 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri /** Check if a singular extension is present. */ @Override - public final boolean hasExtension(final ExtensionLite extensionLite) { - Extension extension = checkNotLite(extensionLite); + public final boolean hasExtension(final ExtensionLite extensionLite) { + Extension extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); return extensions == null ? false : extensions.hasField(extension.getDescriptor()); @@ -1415,9 +1415,9 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri /** Get the number of elements in a repeated extension. */ @Override - public final int getExtensionCount( - final ExtensionLite> extensionLite) { - Extension> extension = checkNotLite(extensionLite); + public final int getExtensionCount( + final ExtensionLite> extensionLite) { + Extension> extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); final FieldDescriptor descriptor = extension.getDescriptor(); @@ -1426,179 +1426,179 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri /** Get the value of an extension. */ @Override - public final Type getExtension(final ExtensionLite extensionLite) { - Extension extension = checkNotLite(extensionLite); + public final T getExtension(final ExtensionLite extensionLite) { + Extension extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); FieldDescriptor descriptor = extension.getDescriptor(); final Object value = extensions == null ? null : extensions.getField(descriptor); if (value == null) { if (descriptor.isRepeated()) { - return (Type) Collections.emptyList(); + return (T) Collections.emptyList(); } else if (descriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - return (Type) extension.getMessageDefaultInstance(); + return (T) extension.getMessageDefaultInstance(); } else { - return (Type) extension.fromReflectionType(descriptor.getDefaultValue()); + return (T) extension.fromReflectionType(descriptor.getDefaultValue()); } } else { - return (Type) extension.fromReflectionType(value); + return (T) extension.fromReflectionType(value); } } /** Get one element of a repeated extension. */ @Override - public final Type getExtension( - final ExtensionLite> extensionLite, final int index) { - Extension> extension = checkNotLite(extensionLite); + public final T getExtension( + final ExtensionLite> extensionLite, final int index) { + Extension> extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); FieldDescriptor descriptor = extension.getDescriptor(); if (extensions == null) { throw new IndexOutOfBoundsException(); } - return (Type) + return (T) extension.singularFromReflectionType(extensions.getRepeatedField(descriptor, index)); } /** Set the value of an extension. */ - public final BuilderType setExtension( - final ExtensionLite extensionLite, final Type value) { - Extension extension = checkNotLite(extensionLite); + public final BuilderT setExtension( + final ExtensionLite extensionLite, final T value) { + Extension extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); ensureExtensionsIsMutable(); final FieldDescriptor descriptor = extension.getDescriptor(); extensions.setField(descriptor, extension.toReflectionType(value)); onChanged(); - return (BuilderType) this; + return (BuilderT) this; } /** Set the value of one element of a repeated extension. */ - public final BuilderType setExtension( - final ExtensionLite> extensionLite, + public final BuilderT setExtension( + final ExtensionLite> extensionLite, final int index, - final Type value) { - Extension> extension = checkNotLite(extensionLite); + final T value) { + Extension> extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); ensureExtensionsIsMutable(); final FieldDescriptor descriptor = extension.getDescriptor(); extensions.setRepeatedField(descriptor, index, extension.singularToReflectionType(value)); onChanged(); - return (BuilderType) this; + return (BuilderT) this; } /** Append a value to a repeated extension. */ - public final BuilderType addExtension( - final ExtensionLite> extensionLite, final Type value) { - Extension> extension = checkNotLite(extensionLite); + public final BuilderT addExtension( + final ExtensionLite> extensionLite, final T value) { + Extension> extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); ensureExtensionsIsMutable(); final FieldDescriptor descriptor = extension.getDescriptor(); extensions.addRepeatedField(descriptor, extension.singularToReflectionType(value)); onChanged(); - return (BuilderType) this; + return (BuilderT) this; } /** Clear an extension. */ - public final BuilderType clearExtension(final ExtensionLite extensionLite) { - Extension extension = checkNotLite(extensionLite); + public final BuilderT clearExtension(final ExtensionLite extensionLite) { + Extension extension = checkNotLite(extensionLite); verifyExtensionContainingType(extension); ensureExtensionsIsMutable(); extensions.clearField(extension.getDescriptor()); onChanged(); - return (BuilderType) this; + return (BuilderT) this; } /** Check if a singular extension is present. */ @Override - public final boolean hasExtension(final Extension extension) { - return hasExtension((ExtensionLite) extension); + public final boolean hasExtension(final Extension extension) { + return hasExtension((ExtensionLite) extension); } /** Check if a singular extension is present. */ @Override - public final boolean hasExtension( - final GeneratedExtension extension) { - return hasExtension((ExtensionLite) extension); + public final boolean hasExtension( + final GeneratedExtension extension) { + return hasExtension((ExtensionLite) extension); } /** Get the number of elements in a repeated extension. */ @Override - public final int getExtensionCount( - final Extension> extension) { - return getExtensionCount((ExtensionLite>) extension); + public final int getExtensionCount( + final Extension> extension) { + return getExtensionCount((ExtensionLite>) extension); } /** Get the number of elements in a repeated extension. */ @Override - public final int getExtensionCount( - final GeneratedExtension> extension) { - return getExtensionCount((ExtensionLite>) extension); + public final int getExtensionCount( + final GeneratedExtension> extension) { + return getExtensionCount((ExtensionLite>) extension); } /** Get the value of an extension. */ @Override - public final Type getExtension(final Extension extension) { - return getExtension((ExtensionLite) extension); + public final T getExtension(final Extension extension) { + return getExtension((ExtensionLite) extension); } /** Get the value of an extension. */ @Override - public final Type getExtension( - final GeneratedExtension extension) { - return getExtension((ExtensionLite) extension); + public final T getExtension( + final GeneratedExtension extension) { + return getExtension((ExtensionLite) extension); } /** Get the value of an extension. */ @Override - public final Type getExtension( - final Extension> extension, final int index) { - return getExtension((ExtensionLite>) extension, index); + public final T getExtension( + final Extension> extension, final int index) { + return getExtension((ExtensionLite>) extension, index); } /** Get the value of an extension. */ @Override - public final Type getExtension( - final GeneratedExtension> extension, final int index) { - return getExtension((ExtensionLite>) extension, index); + public final T getExtension( + final GeneratedExtension> extension, final int index) { + return getExtension((ExtensionLite>) extension, index); } /** Set the value of an extension. */ - public final BuilderType setExtension( - final Extension extension, final Type value) { - return setExtension((ExtensionLite) extension, value); + public final BuilderT setExtension( + final Extension extension, final T value) { + return setExtension((ExtensionLite) extension, value); } /** Set the value of an extension. */ - public BuilderType setExtension( - final GeneratedExtension extension, final Type value) { - return setExtension((ExtensionLite) extension, value); + public BuilderT setExtension( + final GeneratedExtension extension, final T value) { + return setExtension((ExtensionLite) extension, value); } /** Set the value of one element of a repeated extension. */ - public final BuilderType setExtension( - final Extension> extension, - final int index, final Type value) { - return setExtension((ExtensionLite>) extension, index, value); + public final BuilderT setExtension( + final Extension> extension, + final int index, final T value) { + return setExtension((ExtensionLite>) extension, index, value); } /** Set the value of one element of a repeated extension. */ - public BuilderType setExtension( - final GeneratedExtension> extension, - final int index, final Type value) { - return setExtension((ExtensionLite>) extension, index, value); + public BuilderT setExtension( + final GeneratedExtension> extension, + final int index, final T value) { + return setExtension((ExtensionLite>) extension, index, value); } /** Append a value to a repeated extension. */ - public final BuilderType addExtension( - final Extension> extension, final Type value) { - return addExtension((ExtensionLite>) extension, value); + public final BuilderT addExtension( + final Extension> extension, final T value) { + return addExtension((ExtensionLite>) extension, value); } /** Append a value to a repeated extension. */ - public BuilderType addExtension( - final GeneratedExtension> extension, final Type value) { - return addExtension((ExtensionLite>) extension, value); + public BuilderT addExtension( + final GeneratedExtension> extension, final T value) { + return addExtension((ExtensionLite>) extension, value); } /** Clear an extension. */ - public final BuilderType clearExtension( - final Extension extension) { - return clearExtension((ExtensionLite) extension); + public final BuilderT clearExtension( + final Extension extension) { + return clearExtension((ExtensionLite) extension); } /** Clear an extension. */ - public BuilderType clearExtension( - final GeneratedExtension extension) { - return clearExtension((ExtensionLite) extension); + public BuilderT clearExtension( + final GeneratedExtension extension) { + return clearExtension((ExtensionLite) extension); } /** Called by subclasses to check if all extensions are initialized. */ @@ -1746,53 +1746,53 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri } @Override - public BuilderType setField(final FieldDescriptor field, final Object value) { + public BuilderT setField(final FieldDescriptor field, final Object value) { if (field.isExtension()) { verifyContainingType(field); ensureExtensionsIsMutable(); extensions.setField(field, value); onChanged(); - return (BuilderType) this; + return (BuilderT) this; } else { return super.setField(field, value); } } @Override - public BuilderType clearField(final FieldDescriptor field) { + public BuilderT clearField(final FieldDescriptor field) { if (field.isExtension()) { verifyContainingType(field); ensureExtensionsIsMutable(); extensions.clearField(field); onChanged(); - return (BuilderType) this; + return (BuilderT) this; } else { return super.clearField(field); } } @Override - public BuilderType setRepeatedField( + public BuilderT setRepeatedField( final FieldDescriptor field, final int index, final Object value) { if (field.isExtension()) { verifyContainingType(field); ensureExtensionsIsMutable(); extensions.setRepeatedField(field, index, value); onChanged(); - return (BuilderType) this; + return (BuilderT) this; } else { return super.setRepeatedField(field, index, value); } } @Override - public BuilderType addRepeatedField(final FieldDescriptor field, final Object value) { + public BuilderT addRepeatedField(final FieldDescriptor field, final Object value) { if (field.isExtension()) { verifyContainingType(field); ensureExtensionsIsMutable(); extensions.addRepeatedField(field, value); onChanged(); - return (BuilderType) this; + return (BuilderT) this; } else { return super.addRepeatedField(field, value); } @@ -3141,13 +3141,13 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri /** * Checks that the {@link Extension} is non-Lite and returns it as a {@link GeneratedExtension}. */ - private static , T> - Extension checkNotLite(ExtensionLite extension) { + private static , T> + Extension checkNotLite(ExtensionLite extension) { if (extension.isLite()) { throw new IllegalArgumentException("Expected non-lite extension."); } - return (Extension) extension; + return (Extension) extension; } protected static boolean isStringEmpty(final Object value) {