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

ApiName does not implement equals #5292

Closed
brettkail-wk opened this issue Jun 13, 2024 · 2 comments · Fixed by #5302 · May be fixed by #5310
Closed

ApiName does not implement equals #5292

brettkail-wk opened this issue Jun 13, 2024 · 2 comments · Fixed by #5302 · May be fixed by #5310
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@brettkail-wk
Copy link
Contributor

Describe the bug

The ApiName class doesn't implement equals. This complicates unittests using Mockito that want to verify requests are as expected.

Expected Behavior

Equal request objects after overriding configuration with a custom name (similar to AmazonSQSExtendedClient).

Current Behavior

Unequal request objects.

Reproduction Steps

Supplier<ReceiveMessageRequest> reqFactory = () ->
    ReceiveMessageRequest.builder()
        .overrideConfiguration(
            AwsRequestOverrideConfiguration.builder()
                .addApiName(ApiName.builder().name("n").version("v").build())
                .build())
        .build();
System.err.println(reqFactory.get().equals(reqFactory.get()));

Possible Solution

Implement equals.

Additional Information/Context

No response

AWS Java SDK version used

2.26.1

JDK version used

N/A

Operating System and version

N/A

@brettkail-wk brettkail-wk added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 13, 2024
@debora-ito debora-ito added needs-review This issue or PR needs review from the team. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 13, 2024
@debora-ito
Copy link
Member

@brettkail-wk acknowledged. Will try to work on this next week, but in the meantime if you can provide a PR we'd appreciate it.

@debora-ito debora-ito removed the needs-review This issue or PR needs review from the team. label Jun 15, 2024
@debora-ito debora-ito added the p2 This is a standard priority issue label Jun 18, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue
Projects
None yet
2 participants