[
https://issues.apache.org/jira/browse/AVRO-3305?focusedWorklogId=708395&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-708395
]
ASF GitHub Bot logged work on AVRO-3305:
----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Jan/22 15:07
Start Date: 13/Jan/22 15:07
Worklog Time Spent: 10m
Work Description: kylec32 opened a new pull request #1457:
URL: https://github.com/apache/avro/pull/1457
Make sure you have checked _all_ steps below.
### Jira
- [X] My PR addresses the following [Avro
Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them
in the PR title. For example, "AVRO-1234: My Avro PR"
- https://issues.apache.org/jira/browse/AVRO-XXX
- In case you are adding a dependency, check if the license complies with
the [ASF 3rd Party License
Policy](https://www.apache.org/legal/resolved.html#category-x).
### Tests
- [X] My PR adds the following unit tests __OR__ does not need testing for
this extremely good reason:
Existing SpecificCompiler.testMangle* tests were updated to cover more cases.
### Commits
- [X] My commits all reference Jira issues in their subject lines. In
addition, my commits follow the guidelines from "[How to write a good git
commit message](https://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
- [X] In case of new functionality, my PR adds documentation that describes
how to use it.
- All the public functions and the classes in the PR contain Javadoc that
explain what it does
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 708395)
Remaining Estimate: 0h
Time Spent: 10m
> Avro Compiler(s) should only mangle contextual reserved keyword when used in
> reserved context
> ---------------------------------------------------------------------------------------------
>
> Key: AVRO-3305
> URL: https://issues.apache.org/jira/browse/AVRO-3305
> Project: Apache Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.11.0
> Reporter: Kyle Carter
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> In AVRO-3116 it was correctly called out that new reserved keywords had been
> added to the Java language in recent versions that could lead to uncompilable
> Avro schemas in Java. While the fix developed for that issue does resolve the
> issue it treats all keywords identically. Some of the keywords (record,
> yield, var) targeted by that change are only keywords when used in particular
> contexts, specifically as a type identifier. Nevertheless, the Avro compiler
> code treats all keywords the same and will mangle them wherever they show up
> (for example in a package name) even if it would have been valid without
> mangling (ex: com.example.record). This can be surprising and result in
> unnecessary code updates.
> I suggest that these contextual keywords only be mangled when used in the
> context they are reserved.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)