Skip to content

Java modernization with Claude#128

Open
dunedodo wants to merge 16 commits intomasterfrom
feature-java-modernization-claude
Open

Java modernization with Claude#128
dunedodo wants to merge 16 commits intomasterfrom
feature-java-modernization-claude

Conversation

@dunedodo
Copy link
Copy Markdown
Contributor

@dunedodo dunedodo commented May 6, 2026

No description provided.

dunedodo and others added 14 commits February 25, 2026 19:12
Added deleteObjectTolerateRetention retry logic in AbstractS3ClientTest to handle ECS "under retention" errors during test cleanup. Moved D@RE license probe to top of testCopyRangeAPI to prevent cleanup failures when test is skipped due to missing D@RE license.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
s3Config = (S3Config) super.getObjectConfig();
if (s3Config.isUseV2Signer())
this.signer = new S3SignerV2(s3Config);
public S3JerseyClient(S3Config s3Config) {
Copy link
Copy Markdown
Contributor

@xiaoxin-ren xiaoxin-ren May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like an incorrect refactor to change the constructor behavior. It's only acceptable if the original use case to use URLConnectionClientHandler has been addressed in Jersey 2.
The PR that generated rc2 still keeps the capability to use non-default handler. See :
https://github.com/EMCECS/ecs-object-client-java/pull/98/changes#diff-3689e744602047f24249f18642390ab575a948fc2a14397255940e202e5ab98fR144

As a result, some apps like ECS-Sync will need to refactor the corresponding code. ECS-Sync will deprecate the option config.isApacheClientEnabled():
https://github.com/EMCECS/ecs-sync/blob/4fbfe8422c0082d8e92c775a03ba4060aa201563/storage-plugins/s3-storage/src/main/java/com/emc/ecs/sync/storage/s3/EcsS3Storage.java#L144

dunedodo added 2 commits May 8, 2026 10:35
…ents

Changes:
- S3JerseyClient: new constructor accepting ConnectorProvider; sets
  sun.net.http.allowRestrictedHeaders=true when HttpUrlConnectorProvider
  is used (required for V4 Host header pass-through); added response.close()
  in executeRequest() finally block to prevent connection reuse corruption.
- S3EncryptionClient: new constructor accepting ConnectorProvider, delegating
  to S3JerseyClient for connector-aware client creation.
- S3SignerV4: whitelist signed headers (host, content-type, content-md5,
  x-amz-*, x-emc-*) instead of signing all headers except authorization.
  HTTP connectors may modify standard headers after signing.
- CodecFilter: removed premature x-amz-meta-* header addition that caused
  V2/V4 signature mismatch with HttpUrlConnector's lazy commit; added
  FilterOutputStream wrapper to strip Content-Length before commit to
  prevent invalid chunked+content-length header combination.
- Test classes updated to use HttpUrlConnectorProvider via new constructor.
- log4j2.xml: enable debug logging for S3Signer and ErrorFilter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants