From 30aac4bfbef336ce954dd6afe3c64b291b629e85 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Sun, 17 Nov 2024 11:08:12 -0800 Subject: [PATCH] Internal change. PiperOrigin-RevId: 697399144 --- .../Reflection/FeatureSetDescriptor.g.cs | 17 ----------------- .../google/protobuf/AbstractProtobufList.java | 3 ++- .../com/google/protobuf/BooleanArrayList.java | 3 ++- .../java/com/google/protobuf/ByteString.java | 9 ++++++--- .../com/google/protobuf/DoubleArrayList.java | 3 ++- .../main/java/com/google/protobuf/FieldSet.java | 3 ++- .../com/google/protobuf/FloatArrayList.java | 3 ++- .../java/com/google/protobuf/IntArrayList.java | 3 ++- .../main/java/com/google/protobuf/Internal.java | 3 ++- .../java/com/google/protobuf/LazyField.java | 3 ++- .../java/com/google/protobuf/LazyFieldLite.java | 3 ++- .../java/com/google/protobuf/LongArrayList.java | 3 ++- .../main/java/com/google/protobuf/MapField.java | 15 ++++++++++----- .../com/google/protobuf/MapFieldBuilder.java | 3 ++- .../java/com/google/protobuf/MapFieldLite.java | 7 +++++-- .../main/java/com/google/protobuf/Message.java | 3 ++- .../com/google/protobuf/RopeByteString.java | 3 ++- .../com/google/protobuf/SmallSortedMap.java | 10 +++++++--- .../protobuf/TextFormatParseLocation.java | 3 ++- .../com/google/protobuf/UnknownFieldSet.java | 6 ++++-- .../google/protobuf/UnknownFieldSetLite.java | 3 ++- 21 files changed, 62 insertions(+), 47 deletions(-) delete mode 100644 csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs diff --git a/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs b/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs deleted file mode 100644 index 208ce1fcb631..000000000000 --- a/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs +++ /dev/null @@ -1,17 +0,0 @@ -#region Copyright notice and license -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. 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 -// https://developers.google.com/open-source/licenses/bsd -#endregion - -namespace Google.Protobuf.Reflection; - -internal sealed partial class FeatureSetDescriptor -{ - // Canonical serialized form of the edition defaults, generated by embed_edition_defaults. - private const string DefaultsBase64 = - "ChMYhAciACoMCAEQAhgCIAMoATACChMY5wciACoMCAIQARgBIAIoATABChMY6AciDAgBEAEYASACKAEwASoAIOYHKOgH"; -} diff --git a/java/core/src/main/java/com/google/protobuf/AbstractProtobufList.java b/java/core/src/main/java/com/google/protobuf/AbstractProtobufList.java index 2b965af9fda2..ea864721ce61 100644 --- a/java/core/src/main/java/com/google/protobuf/AbstractProtobufList.java +++ b/java/core/src/main/java/com/google/protobuf/AbstractProtobufList.java @@ -38,7 +38,8 @@ abstract class AbstractProtobufList extends AbstractList implements Protob } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (o == this) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/BooleanArrayList.java b/java/core/src/main/java/com/google/protobuf/BooleanArrayList.java index 3b8c72704b16..f5435afdcd25 100644 --- a/java/core/src/main/java/com/google/protobuf/BooleanArrayList.java +++ b/java/core/src/main/java/com/google/protobuf/BooleanArrayList.java @@ -68,7 +68,8 @@ protected void removeRange(int fromIndex, int toIndex) { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/ByteString.java b/java/core/src/main/java/com/google/protobuf/ByteString.java index 1903a4deba96..558d5a6ab7ff 100644 --- a/java/core/src/main/java/com/google/protobuf/ByteString.java +++ b/java/core/src/main/java/com/google/protobuf/ByteString.java @@ -929,7 +929,8 @@ public final String toStringUtf8() { // equals() and hashCode() @Override - public abstract boolean equals(Object o); + public abstract boolean equals( + Object o); /** Base class for leaf {@link ByteString}s (i.e. non-ropes). */ abstract static class LeafByteString extends ByteString { @@ -1478,7 +1479,8 @@ protected final int partialIsValidUtf8(int state, int offset, int length) { // equals() and hashCode() @Override - public final boolean equals(Object other) { + public final boolean equals( + Object other) { if (other == this) { return true; } @@ -1816,7 +1818,8 @@ protected int partialIsValidUtf8(int state, int offset, int length) { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (other == this) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/DoubleArrayList.java b/java/core/src/main/java/com/google/protobuf/DoubleArrayList.java index 57d30d873764..4198cd85f4d5 100644 --- a/java/core/src/main/java/com/google/protobuf/DoubleArrayList.java +++ b/java/core/src/main/java/com/google/protobuf/DoubleArrayList.java @@ -67,7 +67,8 @@ protected void removeRange(int fromIndex, int toIndex) { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/FieldSet.java b/java/core/src/main/java/com/google/protobuf/FieldSet.java index c81a1d1fcfd5..adf92d3f881a 100644 --- a/java/core/src/main/java/com/google/protobuf/FieldSet.java +++ b/java/core/src/main/java/com/google/protobuf/FieldSet.java @@ -127,7 +127,8 @@ public boolean isImmutable() { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/FloatArrayList.java b/java/core/src/main/java/com/google/protobuf/FloatArrayList.java index 7cb35db1eeb5..c70575437dc1 100644 --- a/java/core/src/main/java/com/google/protobuf/FloatArrayList.java +++ b/java/core/src/main/java/com/google/protobuf/FloatArrayList.java @@ -67,7 +67,8 @@ protected void removeRange(int fromIndex, int toIndex) { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/IntArrayList.java b/java/core/src/main/java/com/google/protobuf/IntArrayList.java index fe654e0ba14c..73e03a018763 100644 --- a/java/core/src/main/java/com/google/protobuf/IntArrayList.java +++ b/java/core/src/main/java/com/google/protobuf/IntArrayList.java @@ -67,7 +67,8 @@ protected void removeRange(int fromIndex, int toIndex) { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/Internal.java b/java/core/src/main/java/com/google/protobuf/Internal.java index 07bec5ef29d7..d548ccaf2032 100644 --- a/java/core/src/main/java/com/google/protobuf/Internal.java +++ b/java/core/src/main/java/com/google/protobuf/Internal.java @@ -555,7 +555,8 @@ public V setValue(V value) { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (o == this) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/LazyField.java b/java/core/src/main/java/com/google/protobuf/LazyField.java index d7dddd955aec..5548a7f96384 100644 --- a/java/core/src/main/java/com/google/protobuf/LazyField.java +++ b/java/core/src/main/java/com/google/protobuf/LazyField.java @@ -50,7 +50,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { return getValue().equals(obj); } diff --git a/java/core/src/main/java/com/google/protobuf/LazyFieldLite.java b/java/core/src/main/java/com/google/protobuf/LazyFieldLite.java index d52fc0a70448..1572fa26100e 100644 --- a/java/core/src/main/java/com/google/protobuf/LazyFieldLite.java +++ b/java/core/src/main/java/com/google/protobuf/LazyFieldLite.java @@ -110,7 +110,8 @@ public static LazyFieldLite fromValue(MessageLite value) { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/LongArrayList.java b/java/core/src/main/java/com/google/protobuf/LongArrayList.java index f3c14a5a5482..e4725c509696 100644 --- a/java/core/src/main/java/com/google/protobuf/LongArrayList.java +++ b/java/core/src/main/java/com/google/protobuf/LongArrayList.java @@ -67,7 +67,8 @@ protected void removeRange(int fromIndex, int toIndex) { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/MapField.java b/java/core/src/main/java/com/google/protobuf/MapField.java index 81566a2e1b4a..f65f4cf89981 100644 --- a/java/core/src/main/java/com/google/protobuf/MapField.java +++ b/java/core/src/main/java/com/google/protobuf/MapField.java @@ -183,7 +183,8 @@ public void clear() { @SuppressWarnings("unchecked") @Override - public boolean equals(Object object) { + public boolean equals( + Object object) { if (!(object instanceof MapField)) { return false; } @@ -338,7 +339,8 @@ public Set> entrySet() { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { return delegate.equals(o); } @@ -434,7 +436,8 @@ public void clear() { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { return delegate.equals(o); } @@ -531,7 +534,8 @@ public void clear() { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { return delegate.equals(o); } @@ -573,7 +577,8 @@ public void remove() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { return delegate.equals(obj); } diff --git a/java/core/src/main/java/com/google/protobuf/MapFieldBuilder.java b/java/core/src/main/java/com/google/protobuf/MapFieldBuilder.java index 05a6d093cf4a..8569e993c23b 100644 --- a/java/core/src/main/java/com/google/protobuf/MapFieldBuilder.java +++ b/java/core/src/main/java/com/google/protobuf/MapFieldBuilder.java @@ -166,7 +166,8 @@ private boolean typedEquals(MapFieldBuilder m) { } } - private static boolean equals(Object a, Object b) { + private static boolean equals( + Object a, + Object b) { if (a instanceof byte[] && b instanceof byte[]) { return Arrays.equals((byte[]) a, (byte[]) b); } @@ -129,7 +131,8 @@ static boolean equals(Map a, Map b) { /** Checks whether two map fields are equal. */ @SuppressWarnings("unchecked") @Override - public boolean equals(Object object) { + public boolean equals( + Object object) { return (object instanceof Map) && equals(this, (Map) object); } diff --git a/java/core/src/main/java/com/google/protobuf/Message.java b/java/core/src/main/java/com/google/protobuf/Message.java index 7fc8cd4a58d8..6b8649bfd281 100644 --- a/java/core/src/main/java/com/google/protobuf/Message.java +++ b/java/core/src/main/java/com/google/protobuf/Message.java @@ -41,7 +41,8 @@ public interface Message extends MessageLite, MessageOrBuilder { * @return {@code true} if the specified object is equal to this message */ @Override - boolean equals(Object other); + boolean equals( + Object other); /** * Returns the hash code value for this message. The hash code of a message should mix the diff --git a/java/core/src/main/java/com/google/protobuf/RopeByteString.java b/java/core/src/main/java/com/google/protobuf/RopeByteString.java index aa8c6e147371..cfb26db83e59 100644 --- a/java/core/src/main/java/com/google/protobuf/RopeByteString.java +++ b/java/core/src/main/java/com/google/protobuf/RopeByteString.java @@ -477,7 +477,8 @@ protected int partialIsValidUtf8(int state, int offset, int length) { // equals() and hashCode() @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (other == this) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/SmallSortedMap.java b/java/core/src/main/java/com/google/protobuf/SmallSortedMap.java index 1d5cddd868e5..b7a1b8e7c27e 100644 --- a/java/core/src/main/java/com/google/protobuf/SmallSortedMap.java +++ b/java/core/src/main/java/com/google/protobuf/SmallSortedMap.java @@ -417,7 +417,8 @@ public V setValue(V newValue) { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (o == this) { return true; } @@ -439,7 +440,9 @@ public String toString() { } /** equals() that handles null values. */ - private boolean equals(Object o1, Object o2) { + private boolean equals( + Object o1, + Object o2) { return o1 == null ? o2 == null : o1.equals(o2); } } @@ -609,7 +612,8 @@ private Iterator> getOverflowIterator() { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/TextFormatParseLocation.java b/java/core/src/main/java/com/google/protobuf/TextFormatParseLocation.java index 154efaa55196..a6469bfff3bd 100644 --- a/java/core/src/main/java/com/google/protobuf/TextFormatParseLocation.java +++ b/java/core/src/main/java/com/google/protobuf/TextFormatParseLocation.java @@ -59,7 +59,8 @@ public String toString() { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (o == this) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java b/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java index 40fc62596b38..b3acfda5d7bf 100644 --- a/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java +++ b/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java @@ -66,7 +66,8 @@ public UnknownFieldSet getDefaultInstanceForType() { new UnknownFieldSet(new TreeMap()); @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (this == other) { return true; } @@ -739,7 +740,8 @@ public List getGroupList() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (this == other) { return true; } diff --git a/java/core/src/main/java/com/google/protobuf/UnknownFieldSetLite.java b/java/core/src/main/java/com/google/protobuf/UnknownFieldSetLite.java index 36c9481d7e4e..27f8bde44ee2 100644 --- a/java/core/src/main/java/com/google/protobuf/UnknownFieldSetLite.java +++ b/java/core/src/main/java/com/google/protobuf/UnknownFieldSetLite.java @@ -299,7 +299,8 @@ private static boolean objectsEquals(Object[] objects1, Object[] objects2, int c } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) { return true; }