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 |