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

   ## Issue
   [CAMEL-24768](https://issues.apache.org/jira/browse/CAMEL-24768)
   
   ## Problem & Fix
   Gap-audit LOW findings across two Huawei components (verified against main), 
all rooted in guarding primitive `int` options with 
`ObjectHelper.isEmpty`/`isNotEmpty` — which autoboxes to a **non-null** 
`Integer` and is therefore never "empty":
   
   - **dms** — the *Storage space is mandatory* and *Partition number is 
mandatory* `createInstance` guards never fired when the value came from the 
primitive-`int` endpoint default (0), so `storage_space:0` / `partition_num:0` 
was sent instead of the documented client-side error. Now check `== null || <= 
0`.
   - **dms & iam** — the proxy guard `isNotEmpty(getProxyPort())` on a 
primitive `int` is always true, so `proxyHost` with no `proxyPort` configured a 
proxy on port 0. Now requires `getProxyPort() > 0` (same fix already made in 
`-obs` and `-functiongraph`).
   - **dms** — the `STORAGE_SPACE` / `PARTITION_NUM` exchange properties were 
read with a raw `(Integer)` cast that throws `ClassCastException` on a String 
value; now uses the type-converting `getProperty(name, Integer.class)`, as 
`AVAILABLE_ZONES` already does.
   
   All pure-code (no `@UriParam` type change), so no metadata regeneration.
   
   ## Testing
   - New `CreateInstanceMissingStorageSpaceTest`: a create with `storageSpace` 
left at its endpoint default now fails with the clear *Storage space is 
mandatory* error.
   - Full `camel-huaweicloud-dms` and `-iam` unit suites green.
   - `mvn -Psourcecheck validate` green.
   
   🤖 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