Skip to content

Commit badaf41

Browse files
Readd new*List() methods on GeneratedMessageV3.
This will further restore compatibility on 4.x runtime with gencode to <= 3.21 This is a partial rollback from 7874474#diff-94b93e396de2304f28fafc97968031b4e2a3a598c7efdab8b252a156ac7c57dbL451-L452 with the methods readded onto GeneratedMessageV3. PiperOrigin-RevId: 807319417
1 parent d21c958 commit badaf41

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,41 @@ protected GeneratedMessageV3(Builder<?> builder) {
4141
super(builder);
4242
}
4343

44+
/* @deprecated This method is deprecated, and slated for removal in the next Java breaking change
45+
* (5.x). Users should update gencode to >= 4.26.x which no longer uses this.
46+
*/
47+
protected static IntList newIntList() {
48+
return new IntArrayList();
49+
}
50+
51+
/* @deprecated This method is deprecated, and slated for removal in the next Java breaking change
52+
* (5.x). Users should update gencode to >= 4.26.x which no longer uses this.
53+
*/
54+
protected static LongList newLongList() {
55+
return new LongArrayList();
56+
}
57+
58+
/* @deprecated This method is deprecated, and slated for removal in the next Java breaking change
59+
* (5.x). Users should update gencode to >= 4.26.x which no longer uses this.
60+
*/
61+
protected static FloatList newFloatList() {
62+
return new FloatArrayList();
63+
}
64+
65+
/* @deprecated This method is deprecated, and slated for removal in the next Java breaking change
66+
* (5.x). Users should update gencode to >= 4.26.x which no longer uses this.
67+
*/
68+
protected static DoubleList newDoubleList() {
69+
return new DoubleArrayList();
70+
}
71+
72+
/* @deprecated This method is deprecated, and slated for removal in the next Java breaking change
73+
* (5.x). Users should update gencode to >= 4.26.x which no longer uses this.
74+
*/
75+
protected static BooleanList newBooleanList() {
76+
return new BooleanArrayList();
77+
}
78+
4479
/* @deprecated This method is deprecated, and slated for removal in the next Java breaking change
4580
* (5.x). Users should update gencode to >= 4.26.x which uses makeMutableCopy() instead.
4681
*/

0 commit comments

Comments
 (0)