chaokunyang opened a new pull request, #2948:
URL: https://github.com/apache/fory/pull/2948
## What does this PR do?
Kotlin allows field names that are Java reserved words (like "new"), which
are
valid at the bytecode level. When Fory tries to reserve these field names for
code generation, it fails because Java reserved words can't be used as
variable
names in generated code.
This fix filters out Java reserved words when reserving field names in
CodecBuilder, since they won't conflict with any generated variable names.
## Related issues
Fixes #2768
## Does this PR introduce any user-facing change?
<!--
If any user-facing interface changes, please [open an
issue](https://github.com/apache/fory/issues/new/choose) describing the need to
do so and update the document if necessary.
Delete section if not applicable.
-->
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark
<!--
When the PR has an impact on performance (if you don't know whether the PR
will have an impact on performance, you can submit the PR first, and if it will
have impact on performance, the code reviewer will explain it), be sure to
attach a benchmark data here.
Delete section if not applicable.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]