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

   ## Issue
   [CAMEL-24764](https://issues.apache.org/jira/browse/CAMEL-24764)
   
   ## Problem & Fix
   Gap audit of camel-huaweicloud-obs found several functional issues, all 
verified against main:
   
   - **Connection leak (HIGH)** — `OBSUtils.mapObsObject` read the object 
content via `IOHelper.copy`, which does not close its input, so the Huawei SDK 
content stream (which holds a pooled HTTP connection) leaked on every producer 
`getObject` and every consumer-polled object → connection-pool exhaustion on a 
long-running consumer. Now read inside try-with-resources.
   - **putObject can't auto-create a bucket without `bucketLocation`** — the 
create-if-missing path skipped the `DEFAULT_LOCATION` default that 
`createBucket` applies, so it failed with a confusing empty-regionId error. Now 
mirrors `createBucket`.
   - **String upload charset** — a `String` body was uploaded with the 
platform-default charset; now UTF-8.
   - **Debug log** — the getObject download log printed the bucket location 
instead of the bucket name.
   - **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`.
   
   ## Testing
   - New `GetObjectTest.testGetObjectClosesContentStream` asserts the object 
content stream is closed after a download (guards the leak fix).
   - Full `camel-huaweicloud-obs` unit suite 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