The previous change claimed to do this in addition to `true` and `false`, but it was not actually in the code. To reiterate the text from the earlier change, now actually reflected entirely in the code: > The identifiers `true`, `false`, and `null` are effectively reserved words in Java, although for some reason they are listed separately from the "keywords" in the Java Language Specification. > > This doesn't matter for regular fields, because a proto field called `true` will be accessed with `getTrue` and `setTrue`. But for extensions, the generated Java code will have a public static field whose name is the same as the name of the extension field, with `_` appended if the name is a reserved word. Previously there was no `_` for `true` etc, so the generated code would not compile. This change should not affect any existing client code in Java. If someone had tried to use an extension called `true` (etc), they would have found that the generated proto code did not compile. Now it is possible to reference such an extension as `true_`. PiperOrigin-RevId: 632174190pull/16784/head
parent
dbc2baf5bd
commit
510c1434ed
1 changed files with 11 additions and 11 deletions
Loading…
Reference in new issue