Commit e691be5
Fix (behind a flag) a silly bug in RedundantSetterCall.
I clearly wanted "if this isn't a proto, return empty" here, and what I wrote was "if this is a lite proto, return empty". The bug would have been more obvious if GeneratedMessage extended GeneratedMessageLite (this is true if you drop the "Generated"!), as the code would have been hopelessly broken, but this isn't the case.
To add further to the pain, this is a no-op given lite proto oneof enums don't implement the marker interface. I'm seeing if I can fix that in unknown commit, but I'll need _a_ flag in place so that all the ensuing detected errors don't break.
Also this is borderline impossible to test given you can't compile lite protos into the same target as full-fat protos.
PiperOrigin-RevId: 8062851181 parent ce1a422 commit e691be5
File tree
1 file changed
+6
-6
lines changed- core/src/main/java/com/google/errorprone/bugpatterns
1 file changed
+6
-6
lines changedLines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
130 | | - | |
| 132 | + | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| |||
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 189 | + | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
0 commit comments