diff --git a/build.gradle b/build.gradle index e4c935a..095e92e 100644 --- a/build.gradle +++ b/build.gradle @@ -96,7 +96,7 @@ jacoco { checkstyle { configFile = file("${rootDir}/src/checkstyle/checkstyle.xml") - toolVersion = "8.0" + toolVersion = "8.1" } dependencies { diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml index 810daf0..d53a329 100644 --- a/src/checkstyle/checkstyle.xml +++ b/src/checkstyle/checkstyle.xml @@ -67,6 +67,7 @@ + diff --git a/src/main/java/org/springframework/integration/aws/metadata/DynamoDbMetaDataStore.java b/src/main/java/org/springframework/integration/aws/metadata/DynamoDbMetaDataStore.java index 7df6005..edddaa6 100644 --- a/src/main/java/org/springframework/integration/aws/metadata/DynamoDbMetaDataStore.java +++ b/src/main/java/org/springframework/integration/aws/metadata/DynamoDbMetaDataStore.java @@ -110,7 +110,7 @@ public class DynamoDbMetaDataStore implements ConcurrentMetadataStore, Initializ public void afterPropertiesSet() throws Exception { try { this.table.describe(); - createTableLatch.countDown(); + this.createTableLatch.countDown(); return; } catch (ResourceNotFoundException e) { @@ -197,7 +197,6 @@ public class DynamoDbMetaDataStore implements ConcurrentMetadataStore, Initializ public String get(String key) { Assert.hasText(key, "'key' must not be empty."); - awaitForActive(); Item item = this.table.getItem(KEY, key); diff --git a/src/test/java/org/springframework/integration/aws/KinesisLocalRunning.java b/src/test/java/org/springframework/integration/aws/KinesisLocalRunning.java index 2c5839c..c8ffa66 100644 --- a/src/test/java/org/springframework/integration/aws/KinesisLocalRunning.java +++ b/src/test/java/org/springframework/integration/aws/KinesisLocalRunning.java @@ -95,10 +95,13 @@ public final class KinesisLocalRunning extends TestWatcher { return new Statement() { + + @Override public void evaluate() throws Throwable { try { base.evaluate(); - } finally { + } + finally { System.clearProperty(SDKGlobalConfiguration.AWS_CBOR_DISABLE_SYSTEM_PROPERTY); } diff --git a/src/test/java/org/springframework/integration/aws/inbound/SnsInboundChannelAdapterTests.java b/src/test/java/org/springframework/integration/aws/inbound/SnsInboundChannelAdapterTests.java index 1f90229..bc47510 100644 --- a/src/test/java/org/springframework/integration/aws/inbound/SnsInboundChannelAdapterTests.java +++ b/src/test/java/org/springframework/integration/aws/inbound/SnsInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -96,7 +96,7 @@ public class SnsInboundChannelAdapterTests { .content(StreamUtils.copyToByteArray(this.subscriptionConfirmation.getInputStream()))) .andExpect(status().isNoContent()); - Message receive = inputChannel.receive(10000); + Message receive = this.inputChannel.receive(10000); assertThat(receive).isNotNull(); assertThat(receive.getHeaders().containsKey(AwsHeaders.SNS_MESSAGE_TYPE)).isTrue(); assertThat(receive.getHeaders().get(AwsHeaders.SNS_MESSAGE_TYPE)).isEqualTo("SubscriptionConfirmation"); @@ -121,7 +121,7 @@ public class SnsInboundChannelAdapterTests { .content(StreamUtils.copyToByteArray(this.notificationMessage.getInputStream()))) .andExpect(status().isNoContent()); - Message receive = inputChannel.receive(10000); + Message receive = this.inputChannel.receive(10000); assertThat(receive).isNotNull(); Map payload = (Map) receive.getPayload(); @@ -138,7 +138,7 @@ public class SnsInboundChannelAdapterTests { .content(StreamUtils.copyToByteArray(this.unsubscribeConfirmation.getInputStream()))) .andExpect(status().isNoContent()); - Message receive = inputChannel.receive(10000); + Message receive = this.inputChannel.receive(10000); assertThat(receive).isNotNull(); assertThat(receive.getHeaders().containsKey(AwsHeaders.SNS_MESSAGE_TYPE)).isTrue(); assertThat(receive.getHeaders().get(AwsHeaders.SNS_MESSAGE_TYPE)).isEqualTo("UnsubscribeConfirmation"); diff --git a/src/test/java/org/springframework/integration/aws/metadata/DynamoDbMetadataStoreTests.java b/src/test/java/org/springframework/integration/aws/metadata/DynamoDbMetadataStoreTests.java index 1c819a1..86fd8d3 100644 --- a/src/test/java/org/springframework/integration/aws/metadata/DynamoDbMetadataStoreTests.java +++ b/src/test/java/org/springframework/integration/aws/metadata/DynamoDbMetadataStoreTests.java @@ -107,13 +107,13 @@ public class DynamoDbMetadataStoreTests { @Test public void testPutIfAbsent() throws Exception { - String fileID = store.get(file1); + String fileID = store.get(this.file1); assertThat(fileID).describedAs("Get First time, Value must not exist").isNull(); - fileID = store.putIfAbsent(file1, file1Id); + fileID = store.putIfAbsent(this.file1, this.file1Id); assertThat(fileID).describedAs("Insert First time, Value must return null").isNull(); - fileID = store.putIfAbsent(file1, "56789"); + fileID = store.putIfAbsent(this.file1, "56789"); assertThat(fileID).describedAs("Key Already Exists - Insertion Failed, ol value must be returned").isNotNull(); assertThat(fileID).describedAs("The Old Value must be equal to returned").isEqualTo(this.file1Id); @@ -138,16 +138,16 @@ public class DynamoDbMetadataStoreTests { @Test public void testReplace() throws Exception { - boolean removedValue = store.replace(file1, file1Id, "4567"); + boolean removedValue = store.replace(this.file1, this.file1Id, "4567"); assertThat(removedValue).isFalse(); String fileID = store.get(this.file1); assertThat(fileID).isNull(); - fileID = store.putIfAbsent(this.file1, file1Id); + fileID = store.putIfAbsent(this.file1, this.file1Id); assertThat(fileID).isNull(); - removedValue = store.replace(this.file1, file1Id, "4567"); + removedValue = store.replace(this.file1, this.file1Id, "4567"); assertThat(removedValue).isTrue(); fileID = store.get(this.file1);