Skip to content

ApiName does not implement equals #5292

@brettkail-wk

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions