Skip to content

Commit 22b30ec

Browse files
authored
Minor updates to identity-spi (#3989)
* Made interfaces @SdkPublicApi * Added test for equals and hashCode
1 parent 86fb7df commit 22b30ec

File tree

4 files changed

+61
-5
lines changed

4 files changed

+61
-5
lines changed

core/identity-spi/pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,32 @@
4444
<artifactId>utils</artifactId>
4545
<version>${awsjavasdk.version}</version>
4646
</dependency>
47+
<dependency>
48+
<groupId>org.junit.jupiter</groupId>
49+
<artifactId>junit-jupiter</artifactId>
50+
<scope>test</scope>
51+
</dependency>
52+
<dependency>
53+
<groupId>nl.jqno.equalsverifier</groupId>
54+
<artifactId>equalsverifier</artifactId>
55+
<scope>test</scope>
56+
</dependency>
4757
</dependencies>
58+
59+
<build>
60+
<plugins>
61+
<plugin>
62+
<groupId>org.apache.maven.plugins</groupId>
63+
<artifactId>maven-jar-plugin</artifactId>
64+
<configuration>
65+
<archive>
66+
<manifestEntries>
67+
<Automatic-Module-Name>software.amazon.awssdk.identity.spi</Automatic-Module-Name>
68+
</manifestEntries>
69+
</archive>
70+
</configuration>
71+
</plugin>
72+
</plugins>
73+
</build>
74+
4875
</project>

core/identity-spi/src/main/java/software/amazon/awssdk/identity/spi/IdentityProperty.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import java.util.Objects;
1919
import software.amazon.awssdk.annotations.Immutable;
20-
import software.amazon.awssdk.annotations.SdkProtectedApi;
20+
import software.amazon.awssdk.annotations.SdkPublicApi;
2121
import software.amazon.awssdk.annotations.ThreadSafe;
2222
import software.amazon.awssdk.utils.ToString;
2323
import software.amazon.awssdk.utils.Validate;
@@ -26,7 +26,7 @@
2626
* A strongly-typed property for input to an {@link IdentityProvider}.
2727
* @param <T> The type of the attribute.
2828
*/
29-
@SdkProtectedApi
29+
@SdkPublicApi
3030
@Immutable
3131
@ThreadSafe
3232
public final class IdentityProperty<T> {

core/identity-spi/src/main/java/software/amazon/awssdk/identity/spi/ResolveIdentityRequest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.util.Map;
2020
import java.util.Objects;
2121
import software.amazon.awssdk.annotations.Immutable;
22-
import software.amazon.awssdk.annotations.SdkProtectedApi;
22+
import software.amazon.awssdk.annotations.SdkPublicApi;
2323
import software.amazon.awssdk.annotations.ThreadSafe;
2424
import software.amazon.awssdk.utils.ToString;
2525
import software.amazon.awssdk.utils.builder.SdkBuilder;
@@ -32,12 +32,12 @@
3232
*
3333
* @see IdentityProvider
3434
*/
35-
@SdkProtectedApi
35+
@SdkPublicApi
3636
@Immutable
3737
@ThreadSafe
3838
public final class ResolveIdentityRequest {
3939

40-
private final Map<IdentityProperty<?>, ?> properties;
40+
private final Map<IdentityProperty<?>, Object> properties;
4141

4242
private ResolveIdentityRequest(Map<IdentityProperty<?>, Object> properties) {
4343
this.properties = new HashMap<>(properties);
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
package software.amazon.awssdk.identity.spi;
17+
18+
import nl.jqno.equalsverifier.EqualsVerifier;
19+
import org.junit.jupiter.api.Test;
20+
21+
public class IdentityPropertyTest {
22+
23+
@Test
24+
public void equalsHashcode() {
25+
EqualsVerifier.forClass(IdentityProperty.class)
26+
.withNonnullFields("clazz", "name")
27+
.verify();
28+
}
29+
}

0 commit comments

Comments
 (0)