Skip to content

Commit cc710f1

Browse files
add validated anotation in order to reduce warnings
Co-authored-by: Frank Bregulla <[email protected]>
1 parent d017b3f commit cc710f1

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ subprojects {
3737
// DO NOT FORGET TO DOCUMENT CHANGES IN CHANGELOG.md
3838
//
3939
// Add a GitHub release for every new release: https://github.com/otto-de/edison-aws/releases
40-
version = '0.4.1'
40+
version = '0.4.2-SNAPSHOT'
4141
group = 'de.otto.edison'
4242

4343
repositories {

edison-aws-config/src/test/java/de/otto/edison/aws/config/s3/S3BucketPropertyReaderTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import software.amazon.awssdk.core.sync.ResponseTransformer;
88
import software.amazon.awssdk.services.s3.S3Client;
99
import software.amazon.awssdk.services.s3.model.GetObjectRequest;
10+
import software.amazon.awssdk.services.s3.model.GetObjectResponse;
1011

1112
import java.util.Properties;
1213

@@ -32,6 +33,7 @@ public void setUp() {
3233
initMocks(this);
3334
}
3435

36+
@SuppressWarnings("unchecked")
3537
@Test
3638
public void shouldReadPropertiesFromS3() {
3739
// given
@@ -42,8 +44,7 @@ public void shouldReadPropertiesFromS3() {
4244
properties.put("foo", "bar");
4345
properties.put("key", "value");
4446

45-
//noinspection unchecked
46-
when(s3Client.getObject(any(GetObjectRequest.class), any(ResponseTransformer.class))).thenReturn(properties);
47+
when(s3Client.getObject(any(GetObjectRequest.class), (ResponseTransformer<GetObjectResponse, Properties>) any(ResponseTransformer.class))).thenReturn(properties);
4748

4849
// when
4950
final Properties propertiesFromS3 = testee.getPropertiesFromS3();

edison-aws-s3/src/main/java/de/otto/edison/aws/s3/configuration/S3TogglzProperties.java

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package de.otto.edison.aws.s3.configuration;
22

33
import org.springframework.boot.context.properties.ConfigurationProperties;
4+
import org.springframework.validation.annotation.Validated;
45

56
import javax.validation.constraints.Min;
67

8+
@Validated
79
@ConfigurationProperties(prefix = "edison.aws.s3.togglz")
810
public class S3TogglzProperties {
911
private boolean enabled = true;

0 commit comments

Comments
 (0)