SIGN IN SIGN UP

Protocol Buffers - Google's data interchange format

0 0 35 C++

Add `java` to reserved names to escape extensions to `java_`. This may break existing references to gencode for extensions named `java`.

This prevents shadowing of `java.lang` package commonly used in protobuf gencode. Existing extensions named `java` may or may not previously fail to compile depending on if the contents of their .proto result in gencode using `java.lang`. This is needed to fix `java_features.proto` lite gencode since enum gencode uses `java.lang`. Fields named `java` should already be escaped.

*Warning: This may break user code for existing protos with extensions named `java`. References to the extension should be renamed to use `java_` e.g. registry.add(GeneratedClassName.java_)*

PiperOrigin-RevId: 632508249
S
Sandy Zhang committed
c99cf4bbfaf71f735cd0dea7d6fc0b2c1a589ed2
Parent: 91b7cf3
Committed by Copybara-Service <copybara-worker@google.com> on 5/10/2024, 3:49:22 PM