gnodet opened a new pull request, #25246:
URL: https://github.com/apache/camel/pull/25246
## Summary
_Claude Code on behalf of gnodet_
Part of CAMEL-20199 (migrate from `synchronized` to explicit lock
constructs).
This PR replaces `synchronized` blocks and methods with `ReentrantLock` in
four OAuth and security component files:
- **`KeycloakPublicKeyResolver`** (`camel-keycloak`): `refreshKeys()`
converted from `synchronized` method to `ReentrantLock`
- **`DefaultOAuthTokenValidationFactory`** (`camel-oauth`): Discovery lock
map changed from `ConcurrentMap<String, Object>` with `synchronized(lock)` to
`ConcurrentMap<String, ReentrantLock>` with explicit lock/unlock
- **`JwksCache`** (`camel-oauth`): Both `refreshJwkSet()` and
`fetchAndCache()` converted from `synchronized` blocks to `ReentrantLock`
- **`KeyRotationScheduler`** (`camel-pqc`): `checkAndRotate()` converted
from `synchronized` method to `ReentrantLock`
All conversions follow the standard `lock.lock(); try { ... } finally {
lock.unlock(); }` pattern.
## Test plan
- [x] `camel-oauth` tests pass (119 tests, 0 failures)
- [x] `camel-keycloak` tests pass (122 tests, 0 failures)
- [x] `camel-pqc` tests pass (210 tests, 0 failures)
🤖 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]