Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,19 @@ final void markImmutable() {
memoizedSerializedSize &= ~MUTABLE_FLAG_MASK;
}

int getMemoizedHashCode() {
final int getMemoizedHashCode() {
return memoizedHashCode;
}

void setMemoizedHashCode(int value) {
final void setMemoizedHashCode(int value) {
memoizedHashCode = value;
}

void clearMemoizedHashCode() {
final void clearMemoizedHashCode() {
memoizedHashCode = UNINITIALIZED_HASH_CODE;
}

boolean hashCodeIsNotMemoized() {
final boolean hashCodeIsNotMemoized() {
return UNINITIALIZED_HASH_CODE == getMemoizedHashCode();
}

Expand All @@ -109,7 +109,7 @@ public final BuilderType newBuilderForType() {
}

@SuppressWarnings("unchecked") // Guaranteed by runtime.
MessageType newMutableInstance() {
final MessageType newMutableInstance() {
return (MessageType) dynamicMethod(MethodToInvoke.NEW_MUTABLE_INSTANCE, null, null);
}

Expand Down Expand Up @@ -143,7 +143,7 @@ public int hashCode() {
return getMemoizedHashCode();
}

int computeHashCode() {
final int computeHashCode() {
return Protobuf.getInstance().schemaFor(this).hashCode(this);
}

Expand Down Expand Up @@ -182,7 +182,7 @@ private void ensureUnknownFieldsInitialized() {
*
* @return {@code true} unless the tag is an end-group tag.
*/
protected boolean parseUnknownField(int tag, CodedInputStream input) throws IOException {
protected final boolean parseUnknownField(int tag, CodedInputStream input) throws IOException {
// This will avoid the allocation of unknown fields when a group tag is encountered.
if (WireFormat.getTagWireType(tag) == WireFormat.WIRETYPE_END_GROUP) {
return false;
Expand All @@ -193,7 +193,7 @@ protected boolean parseUnknownField(int tag, CodedInputStream input) throws IOEx
}

/** Called by subclasses to parse an unknown field. For use by generated code only. */
protected void mergeVarintField(int tag, int value) {
protected final void mergeVarintField(int tag, int value) {
ensureUnknownFieldsInitialized();
unknownFields.mergeVarintField(tag, value);
}
Expand Down
Loading