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

   ## Summary
   
   _Claude Code on behalf of Guillaume Nodet_
   
   Complete Phase 1B of the SonarCloud remediation plan by fixing the remaining 
blocker/critical bugs.
   
   ### S5783: assertThrows with multiple throwing invocations (3 files)
   Extract setup code out of assertThrows lambdas so only the single 
expected-to-throw call remains inside.
   
   - `PlatformHttpOAuthProfileTest.java`: Move context setup (bind, properties, 
addComponent, addRoutes) outside the lambda; only `context.start()` remains 
inside assertThrows.
   - `PlatformHttpRestOpenApiConsumerRestDslTest.java`: Move 
`context.addRoutes()` before assertThrows; only `startCamelContext()` remains 
inside.
   - `PlatformHttpRestOpenApiConsumerTest.java`: Same pattern as above.
   
   ### S2119: Random object created per-invocation (2 files)
   Promote `SecureRandom` instances to reusable fields instead of creating new 
ones per invocation. `SecureRandom` is thread-safe in the JDK, so sharing is 
safe.
   
   - `PQCDataFormat.java`: Instance field (the class is stateful with other 
fields).
   - `SelfSignedCertificateGenerator.java`: Static field (utility class with 
only static methods).
   
   ## Test plan
   - [ ] CI passes
   - [ ] SonarCloud blocker/critical bug count decreases
   
   🤖 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