Validate duplicate TLD functions during parsing - #1055
Draft
sainadh777 wants to merge 1 commit into
Draft
Conversation
Contributor
Author
|
@markt-asf, could you please review this Jasper/TLD parsing change when you have a chance? I selected you because you recently maintained these exact paths and reviewed a comparable Jasper change. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TagLibraryInfoImplRationale and impact
The TLD data model now rejects a duplicate as soon as the second function is added during parsing. This keeps descriptor validation with the parser, avoids constructing a partially invalid
TaglibXml, and preserves the existing user-visible validation behavior with a message owned by the TLD descriptor package.The change is limited to duplicate function-name validation. Valid tag libraries are unaffected.
Validation
All commands ran with Eclipse Temurin JDK 25 and Ant 1.10.15 in Linux. The complete suite used a native case-sensitive Linux filesystem rather than the macOS-backed bind mount.
/opt/ant/bin/ant -Dbase.path=/tomcat-build-libs -Dtest.entry=org.apache.tomcat.util.descriptor.tld.TestTldParser test/opt/ant/bin/ant -Dbase.path=/tomcat-build-libs -Dexecute.validate=true validate/opt/ant/bin/ant -Dbase.path=/tomcat-build-libs clean deploy/opt/ant/bin/ant -quiet -Dbase.path=/tomcat-build-libs teststartup.shstarted Tomcat;GET /returned HTTP 200;shutdown.shstopped Tomcat and the recorded PID exited cleanly