Cleanup imports and comments in V3 stubs.

PiperOrigin-RevId: 644154501
pull/17165/head
Sandy Zhang 5 months ago committed by Copybara-Service
parent 44c80977b0
commit 32b94fef51
  1. 23
      java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java
  2. 2
      java/core/src/main/java/com/google/protobuf/RepeatedFieldBuilderV3.java
  3. 4
      java/core/src/main/java/com/google/protobuf/SingleFieldBuilderV3.java

@ -1,5 +1,5 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
@ -9,13 +9,6 @@ package com.google.protobuf;
import java.util.List;
import com.google.protobuf.Descriptors.Descriptor;
import com.google.protobuf.Descriptors.FieldDescriptor;
import com.google.protobuf.Extension.ExtensionType;
import com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder;
import com.google.protobuf.GeneratedMessage.ExtensionDescriptorRetriever;
import com.google.protobuf.GeneratedMessage.FieldAccessorTable;
/**
* Stub for GeneratedMessageV3 wrapping GeneratedMessage for compatibility with older gencode.
*
@ -48,7 +41,7 @@ public abstract class GeneratedMessageV3 extends GeneratedMessage {
MessageT extends ExtendableMessage<MessageT>,
BuilderT extends ExtendableBuilder<MessageT, BuilderT>>
extends GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>
implements ExtendableMessageOrBuilder<MessageT> {
implements GeneratedMessage.ExtendableMessageOrBuilder<MessageT> {
protected ExtendableBuilder() {
super();
}
@ -57,13 +50,15 @@ public abstract class GeneratedMessageV3 extends GeneratedMessage {
super(parent);
}
// Support old gencode override method removed in cl/597677225
// Support old gencode override method removed in
// https://github.com/protocolbuffers/protobuf/commit/7bff169d32710b143951ec6ce2c4ea9a56e2ad24
public <T> BuilderT setExtension(
final GeneratedMessage.GeneratedExtension<MessageT, T> extension, final T value) {
return setExtension((ExtensionLite<MessageT, T>) extension, value);
}
// Support old gencode override method removed in cl/597677225
// Support old gencode override method removed in
// https://github.com/protocolbuffers/protobuf/commit/7bff169d32710b143951ec6ce2c4ea9a56e2ad24
public <T> BuilderT setExtension(
final GeneratedMessage.GeneratedExtension<MessageT, List<T>> extension,
final int index,
@ -71,13 +66,15 @@ public abstract class GeneratedMessageV3 extends GeneratedMessage {
return setExtension((ExtensionLite<MessageT, List<T>>) extension, index, value);
}
// Support old gencode override method removed in cl/597677225
// Support old gencode override method removed in
// https://github.com/protocolbuffers/protobuf/commit/7bff169d32710b143951ec6ce2c4ea9a56e2ad24
public <T> BuilderT addExtension(
final GeneratedMessage.GeneratedExtension<MessageT, List<T>> extension, final T value) {
return addExtension((ExtensionLite<MessageT, List<T>>) extension, value);
}
// Support old gencode override method removed in cl/597677225
// Support old gencode override method removed in
// https://github.com/protocolbuffers/protobuf/commit/7bff169d32710b143951ec6ce2c4ea9a56e2ad24
public <T> BuilderT clearExtension(
final GeneratedMessage.GeneratedExtension<MessageT, T> extension) {
return clearExtension((ExtensionLite<MessageT, T>) extension);

@ -1,5 +1,5 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at

@ -1,5 +1,5 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
@ -7,8 +7,6 @@
package com.google.protobuf;
import static com.google.protobuf.Internal.checkNotNull;
/**
* Stub for SingleFieldBuilderV3 wrapping SingleFieldBuilder for compatibility with older gencode.
*

Loading…
Cancel
Save