gnodet opened a new pull request, #25165:
URL: https://github.com/apache/camel/pull/25165

   _Claude Code on behalf of gnodet_
   
   ## Summary
   
   Fixes [CAMEL-24216](https://issues.apache.org/jira/browse/CAMEL-24216): 
`XsltComponent` sets the JVM system property `jdk.xml.xpathTotalOpLimit` 
without saving the previous value, and clears it on shutdown instead of 
restoring the original.
   
   ### Changes
   
   **XsltComponent.java:**
   - Save the previous value of `jdk.xml.xpathTotalOpLimit` before overriding 
it in `doInit()`
   - Move cleanup from `doShutdown()` to `doStop()` (called earlier in the 
lifecycle)
   - Keep `doShutdown()` as an idempotent safety net for cases where `doStop()` 
is not reached (e.g., context startup failure)
   - Restore the previous value instead of clearing the property
   - Add logging when overriding an existing value
   - Use a volatile flag to ensure restore is idempotent across concurrent 
stop/shutdown calls
   
   **Test (renamed ZXsltTotalOpsTest → XsltTotalOpsTest):**
   - Removed the "Z" prefix hack used for alphabetical test ordering
   - Removed the `@AfterEach` workaround that manually cleared the property
   - Added 4 tests covering:
     - Failed start: property cleaned up after explicit component stop
     - Failed start with pre-existing value: previous value restored
     - Normal start/stop: property cleared after context stop
     - Normal start/stop with pre-existing value: previous value restored
   - Dropped `public` from test class/methods per project conventions
   - Migrated assertions from JUnit to AssertJ
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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