Commit 3ce5838
Change back to using String instead of Class as the argument on the Poison Pill.
The reason to change this back is that one purpose of this method to provide a good message when e.g. someone tries to use 4.33.0 gencode against 4.30 runtime. The 4.30 runtime only has the `String` argument method, so by having new gencode try to call the `Class` one it will result in ABI behavior of a NoSuchMethodError instead of getting the clean message when that 'bad direction skew' happens.
This partial-rollback tries to retain the benefit of avoiding the small cost of the .class.getName() call by having new gencode simply emit the name as a string literal like `"MyMessageProto"` instead of `MyMessageProto.class.getName()` when calling the poison pill.
Because we didn't do any open source releases with this change quite yet, we can remove the `Class` overload here instead of it having to linger forever.
PiperOrigin-RevId: 8134339851 parent 3d94d83 commit 3ce5838
File tree
2 files changed
+8
-30
lines changed- java/core/src/main/java/com/google/protobuf
- src/google/protobuf/compiler/java
2 files changed
+8
-30
lines changedLines changed: 1 addition & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | 68 | | |
70 | 69 | | |
71 | | - | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 75 | | |
98 | 76 | | |
99 | | - | |
| 77 | + | |
100 | 78 | | |
101 | 79 | | |
102 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
0 commit comments