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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to