Merge pull request #10259 from Okapist/remove_final_modifier_on_private_methods

Remove final modifier on private methods. It's useless.
pull/10264/head
deannagarcia 2 years ago committed by GitHub
commit 2f21b2987a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      java/core/src/main/java/com/google/protobuf/BinaryWriter.java
  2. 2
      java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java

@ -209,7 +209,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeInt32List_Internal(int fieldNumber, List<Integer> list, boolean packed)
private void writeInt32List_Internal(int fieldNumber, List<Integer> list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * MAX_VARINT64_SIZE));
@ -227,7 +227,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeInt32List_Internal(int fieldNumber, IntArrayList list, boolean packed)
private void writeInt32List_Internal(int fieldNumber, IntArrayList list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * MAX_VARINT64_SIZE));
@ -255,7 +255,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeFixed32List_Internal(int fieldNumber, List<Integer> list, boolean packed)
private void writeFixed32List_Internal(int fieldNumber, List<Integer> list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * FIXED32_SIZE));
@ -273,7 +273,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeFixed32List_Internal(int fieldNumber, IntArrayList list, boolean packed)
private void writeFixed32List_Internal(int fieldNumber, IntArrayList list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * FIXED32_SIZE));
@ -307,7 +307,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeUInt64List_Internal(int fieldNumber, List<Long> list, boolean packed)
private void writeUInt64List_Internal(int fieldNumber, List<Long> list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * MAX_VARINT64_SIZE));
@ -325,7 +325,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeUInt64List_Internal(int fieldNumber, LongArrayList list, boolean packed)
private void writeUInt64List_Internal(int fieldNumber, LongArrayList list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * MAX_VARINT64_SIZE));
@ -353,7 +353,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeFixed64List_Internal(int fieldNumber, List<Long> list, boolean packed)
private void writeFixed64List_Internal(int fieldNumber, List<Long> list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * FIXED64_SIZE));
@ -371,7 +371,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeFixed64List_Internal(int fieldNumber, LongArrayList list, boolean packed)
private void writeFixed64List_Internal(int fieldNumber, LongArrayList list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * FIXED64_SIZE));
@ -399,7 +399,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeFloatList_Internal(int fieldNumber, List<Float> list, boolean packed)
private void writeFloatList_Internal(int fieldNumber, List<Float> list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * FIXED32_SIZE));
@ -417,7 +417,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeFloatList_Internal(int fieldNumber, FloatArrayList list, boolean packed)
private void writeFloatList_Internal(int fieldNumber, FloatArrayList list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * FIXED32_SIZE));
@ -445,7 +445,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeDoubleList_Internal(int fieldNumber, List<Double> list, boolean packed)
private void writeDoubleList_Internal(int fieldNumber, List<Double> list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * FIXED64_SIZE));
@ -463,7 +463,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeDoubleList_Internal(int fieldNumber, DoubleArrayList list, boolean packed)
private void writeDoubleList_Internal(int fieldNumber, DoubleArrayList list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * FIXED64_SIZE));
@ -497,7 +497,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeBoolList_Internal(int fieldNumber, List<Boolean> list, boolean packed)
private void writeBoolList_Internal(int fieldNumber, List<Boolean> list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + list.size());
@ -515,7 +515,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeBoolList_Internal(int fieldNumber, BooleanArrayList list, boolean packed)
private void writeBoolList_Internal(int fieldNumber, BooleanArrayList list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + list.size());
@ -572,7 +572,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeUInt32List_Internal(int fieldNumber, List<Integer> list, boolean packed)
private void writeUInt32List_Internal(int fieldNumber, List<Integer> list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * MAX_VARINT32_SIZE));
@ -590,7 +590,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeUInt32List_Internal(int fieldNumber, IntArrayList list, boolean packed)
private void writeUInt32List_Internal(int fieldNumber, IntArrayList list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * MAX_VARINT32_SIZE));
@ -630,7 +630,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeSInt32List_Internal(int fieldNumber, List<Integer> list, boolean packed)
private void writeSInt32List_Internal(int fieldNumber, List<Integer> list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * MAX_VARINT32_SIZE));
@ -648,7 +648,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeSInt32List_Internal(int fieldNumber, IntArrayList list, boolean packed)
private void writeSInt32List_Internal(int fieldNumber, IntArrayList list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * MAX_VARINT32_SIZE));
@ -759,7 +759,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeSInt64List_Internal(int fieldNumber, List<Long> list, boolean packed)
private void writeSInt64List_Internal(int fieldNumber, List<Long> list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * MAX_VARINT64_SIZE));
@ -777,7 +777,7 @@ abstract class BinaryWriter extends ByteOutput implements Writer {
}
}
private final void writeSInt64List_Internal(int fieldNumber, LongArrayList list, boolean packed)
private void writeSInt64List_Internal(int fieldNumber, LongArrayList list, boolean packed)
throws IOException {
if (packed) {
requireSpace((MAX_VARINT32_SIZE * 2) + (list.size() * MAX_VARINT64_SIZE));

@ -137,7 +137,7 @@ public abstract class GeneratedMessageLite<
// any unnecessary intermediary allocations while reducing the generated code size.
/** Lazily initializes unknown fields. */
private final void ensureUnknownFieldsInitialized() {
private void ensureUnknownFieldsInitialized() {
if (unknownFields == UnknownFieldSetLite.getDefaultInstance()) {
unknownFields = UnknownFieldSetLite.newInstance();
}

Loading…
Cancel
Save