You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "iemejia (via GitHub)" <gi...@apache.org> on 2026/07/31 19:48:19 UTC

[PR] AVRO-4313: [java] Clarify javaAnnotation validation comments [avro]

iemejia opened a new pull request, #3907:
URL: https://github.com/apache/avro/pull/3907

   ## What is the purpose of the change
   
   Follow-up to AVRO-4313 / #3892. That fix tightened the regex that validates a
   schema's `javaAnnotation` before it is copied verbatim into generated Java
   source. The surrounding comments (and the regression test comments) were hard
   to follow, so this rewrites them in plainer language.
   
   The comments now explain:
   
   - *why* the check exists — the `javaAnnotation` property is emitted verbatim
     into generated source, so it must be validated first;
   - *what* an unescaped quote in a string literal would allow — a single literal
     running past its closing quote and swallowing injected code;
   - *how* the regression test distinguishes the safely-escaped copy of the
     payload inside the `SCHEMA$` constant from a real verbatim emission.
   
   This is a comment-only change; no behavior change.
   
   ## Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.
   The existing `annotationCannotBreakOutViaStringLiteral` and the rest of the
   `compiler` module suite continue to pass.
   
   ## Documentation
   
   - Does this pull request introduce a new feature? (no)
   - If yes, how is the feature documented? (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: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4313: [java] Clarify javaAnnotation validation comments [avro]

Posted by "RyanSkraba (via GitHub)" <gi...@apache.org>.
RyanSkraba commented on PR #3907:
URL: https://github.com/apache/avro/pull/3907#issuecomment-5157353119

   Thanks -- it's important for these complicated PRs!


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4313: [java] Clarify javaAnnotation validation comments [avro]

Posted by "RyanSkraba (via GitHub)" <gi...@apache.org>.
RyanSkraba commented on PR #3907:
URL: https://github.com/apache/avro/pull/3907#issuecomment-5157389525

   Cherry-picked to [branch-1.12](https://github.com/apache/avro/commit/5590928aa61b21dd59ef158dd49a5b609f078aee).


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4313: [java] Clarify javaAnnotation validation comments [avro]

Posted by "RyanSkraba (via GitHub)" <gi...@apache.org>.
RyanSkraba merged PR #3907:
URL: https://github.com/apache/avro/pull/3907


-- 
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: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org