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

   ## Summary
   
   Fixes 12 medium-severity findings from the July 2026 deep code review of 
camel-aws2 components (S3, SQS, SNS, DDB), covering the "quick wins" and 
"medium effort" groups from the CAMEL-24157 umbrella.
   
   _Claude Code on behalf of davsclaus_
   
   ### camel-aws2-sns (3 fixes)
   - **Fix dead-code queueArn validation** — `isNotEmpty(isNotEmpty(queueArn))` 
always returned true, making the validation unreachable. Fixed to single 
`isNotEmpty()` and updated stale error message.
   - **Require kmsMasterKeyId when SSE enabled** — 
`serverSideEncryptionEnabled=true` without `kmsMasterKeyId` silently created 
unencrypted topics. Now throws `IllegalArgumentException`.
   - **Fix health check** — guarded `Region.of(null)` NPE when region relies on 
SDK defaults; replaced `listSubscriptions()` (requires broad IAM) with 
`getTopicAttributes()` (matches producer permissions).
   
   ### camel-aws2-ddb (3 fixes)
   - **Fix empty JSON array mapping** — empty arrays mapped to empty StringSet 
(DynamoDB rejects). Now maps to empty List (L type). Also fixed list element 
type check to use `Number` (matching prior CAMEL-24156 fix).
   - **Add consistentRead to ScanCommand** — Scan was the only read command 
missing `.consistentRead(determineConsistentRead())`.
   - **Fix table-creation retry guard** — 
`ase.getMessage().contains("ResourceNotFoundException")` never matched SDK v2 
messages. Changed to `catch (ResourceNotFoundException)` by type.
   
   ### camel-aws2-sqs (1 fix)
   - **Defer FIFO messageGroupIdStrategy check** — Constructor threw for FIFO 
queues without `messageGroupIdStrategy`, blocking 
`purgeQueue`/`deleteQueue`/`listQueues` operations that don't need it. Moved 
check to `processSingleMessage`/`sendBatchMessage`.
   
   ### camel-aws2-s3 (5 fixes)
   - **Fix ListObjectsV2 pagination fallback** — Fallback used object key as 
`continuationToken` (V1 leftover); now uses `startAfter` which is the correct 
V2 equivalent. Fixes S3-compatible stores (MinIO, Ceph).
   - **Apply SSE-C on read operations** — `getObject`, `getObjectRange`, and 
consumer `fileName` path were missing SSE-C headers (write operations had 
them). SSE-C encrypted objects returned HTTP 400 on read.
   - **Fix removePrefixOnMove regex** — `String.replaceFirst()` treated prefix 
as regex causing `PatternSyntaxException` on prefixes with `.` `+` `*`. Failure 
also skipped `deleteAfterRead` → endless reprocessing. Changed to `substring()`.
   - **Fix presigner credentials** — `getOrCreatePresigner()` only supported 
basic + default credentials; now handles session credentials, profile 
credentials, and null region.
   - **Deprecate dead maxConnections option** — `@UriParam` existed with 
getter/setter but was never wired to the S3 HTTP client.
   
   ## Test plan
   
   - [x] camel-aws2-sns module compiles
   - [x] camel-aws2-ddb module compiles and all 62 unit tests pass
   - [x] camel-aws2-sqs module compiles
   - [x] camel-aws2-s3 module compiles
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   Co-Authored-By: Claude Opus 4.6 <[email protected]>


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