Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: third_party/protobuf/java/core/src/main/java/com/google/protobuf/FieldSet.java

Issue 2600753002: Reverts third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/java/core/src/main/java/com/google/protobuf/FieldSet.java
diff --git a/third_party/protobuf/java/core/src/main/java/com/google/protobuf/FieldSet.java b/third_party/protobuf/java/core/src/main/java/com/google/protobuf/FieldSet.java
index 5b251743be508ed1555e79a9505976f5c7497a83..4e89709f32cf67837c150fc43654877b995e57d7 100644
--- a/third_party/protobuf/java/core/src/main/java/com/google/protobuf/FieldSet.java
+++ b/third_party/protobuf/java/core/src/main/java/com/google/protobuf/FieldSet.java
@@ -120,21 +120,21 @@ final class FieldSet<FieldDescriptorType extends
public boolean isImmutable() {
return isImmutable;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
-
+
if (!(o instanceof FieldSet)) {
return false;
}
-
+
FieldSet<?> other = (FieldSet<?>) o;
- return fields.equals(other.fields);
+ return other.fields.equals(other.fields);
}
-
+
@Override
public int hashCode() {
return fields.hashCode();
@@ -493,7 +493,7 @@ final class FieldSet<FieldDescriptorType extends
}
/**
- * Like {@link Message.Builder#mergeFrom(Message)}, but merges from another
+ * Like {@link Message.Builder#mergeFrom(Message)}, but merges from another
* {@link FieldSet}.
*/
public void mergeFrom(final FieldSet<FieldDescriptorType> other) {
@@ -638,11 +638,10 @@ final class FieldSet<FieldDescriptorType extends
* {@link Message#getField(Descriptors.FieldDescriptor)} for
* this field.
*/
- static void writeElement(
- final CodedOutputStream output,
- final WireFormat.FieldType type,
- final int number,
- final Object value) throws IOException {
+ private static void writeElement(final CodedOutputStream output,
+ final WireFormat.FieldType type,
+ final int number,
+ final Object value) throws IOException {
// Special case for groups, which need a start and end tag; other fields
// can just use writeTag() and writeFieldNoTag().
if (type == WireFormat.FieldType.GROUP) {
@@ -805,8 +804,9 @@ final class FieldSet<FieldDescriptorType extends
* {@link Message#getField(Descriptors.FieldDescriptor)} for
* this field.
*/
- static int computeElementSize(
- final WireFormat.FieldType type, final int number, final Object value) {
+ private static int computeElementSize(
+ final WireFormat.FieldType type,
+ final int number, final Object value) {
int tagSize = CodedOutputStream.computeTagSize(number);
if (type == WireFormat.FieldType.GROUP) {
// Only count the end group tag for proto2 messages as for proto1 the end

Powered by Google App Engine
This is Rietveld 408576698