Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AmazonS3EncryptionClientV2 can not be subclassed #2494

Closed
ionapatterson opened this issue Jan 21, 2021 · 3 comments
Closed

AmazonS3EncryptionClientV2 can not be subclassed #2494

ionapatterson opened this issue Jan 21, 2021 · 3 comments
Labels
closed-for-staleness guidance Question that needs advice or information.

Comments

@ionapatterson
Copy link

AmazonS3EncryptionClientV2 can not be subclassed despite lacking final keyword.

AmazonS3EncryptionClientV2 can not be subclassed as it's only constructor method is package-private. Additionally the argument for this constructor is AmazonS3EncryptionClientV2Params which is a package-private class whose only subclass is AmazonS3EncryptionClientV2ParamsWrapper which is final public (preventing extension) and which also has only a package-private constructor.

@ionapatterson ionapatterson added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Jan 21, 2021
@debora-ito
Copy link
Member

@ionapatterson why do you need a subclass of AmazonS3EncryptionClientV2?

@debora-ito debora-ito added response-requested Waiting on additional info or feedback. Will move to "closing-soon" in 5 days. and removed needs-triage This issue or PR still needs to be triaged. labels Jan 22, 2021
@ionapatterson
Copy link
Author

@debora-ito We currently provide a subclass of AmazonS3EncryptionClient that provides enhanced interactions with our Key Store and are looking to migrate to subclassing AmazonS3EncryptionClientV2.

@github-actions github-actions bot removed the response-requested Waiting on additional info or feedback. Will move to "closing-soon" in 5 days. label Jan 25, 2021
@cenedhryn
Copy link

@ionapatterson To summarize what you described in the issue, AmazonS3EncryptionClientV2 was written with the intention that it not be subclassed. It's a pattern we're moving away from.
Can you change the structure of your client to use a wrapper pattern instead of subclassing? I'm sorry that this will increase the amount of refactoring needed.

We have started work on the next generation client encryption, for AWS Java SDK v2 (aws/aws-sdk-java-v2#34). It'd be great if you wanted to provide feedback on features you'd like to see supported, such as key management, materials description etc.

@debora-ito debora-ito added the closing-soon This issue will close in 2 days unless further comments are made. label Jan 29, 2021
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will close in 2 days unless further comments are made. labels Feb 2, 2021
@github-actions github-actions bot closed this as completed Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants