Skip to content

Commit bcfcc1b

Browse files
refs #161: upgrade dependencies (#162)
* refs #161: upgrade dependencies * refs #161: Update README.md for dependency versions
1 parent cc95497 commit bcfcc1b

File tree

6 files changed

+23
-30
lines changed

6 files changed

+23
-30
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ The framework relies on the following dependencies and therefore it is recommend
7676
for compatibility.
7777
- [Core Framework](java-dynamic-sqs-listener-core)
7878
- JDK 1.8 or higher
79-
- [AWS SQS SDK](https://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/welcome.html): 2.12.0
79+
- [AWS SQS SDK](https://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/welcome.html): 2.13.7
8080
- [Guava](https://github.com/google/guava): 29.0-jre
81-
- [Jackson Databind](https://github.com/FasterXML/jackson-databind): 2.9.10.3
81+
- [Jackson Databind](https://github.com/FasterXML/jackson-databind): 2.11.0
8282
- [Spring Framework](java-dynamic-sqs-listener-spring)
8383
- All of the core dependencies
84-
- [Spring Boot](https://github.com/spring-projects/spring-boot): 2.2.5.RELEASE
84+
- [Spring Boot](https://github.com/spring-projects/spring-boot): 2.3.1.RELEASE
8585

8686
### How to Mark the message as successfully processed
8787
When the method executing the message finishes without throwing an exception, the

java-dynamic-sqs-listener-core/src/test/java/com/jashmore/sqs/argument/attribute/MessageAttributeArgumentResolverTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.jashmore.sqs.argument.attribute;
22

3-
import static org.assertj.core.api.Java6Assertions.assertThat;
3+
import static org.assertj.core.api.Assertions.assertThat;
44

55
import com.fasterxml.jackson.databind.ObjectMapper;
66
import com.google.common.collect.ImmutableMap;
@@ -21,7 +21,7 @@
2121

2222
@Slf4j
2323
class MessageAttributeArgumentResolverTest {
24-
private MessageAttributeArgumentResolver messageAttributeArgumentResolver = new MessageAttributeArgumentResolver(new ObjectMapper());
24+
private final MessageAttributeArgumentResolver messageAttributeArgumentResolver = new MessageAttributeArgumentResolver(new ObjectMapper());
2525

2626
@Test
2727
void stringMessageAttributesCanBeObtainedFromMessage() throws Exception {
@@ -552,6 +552,6 @@ public void consume(@MessageAttribute("bytes") final byte[] b) {
552552
@Builder
553553
@SuppressWarnings("WeakerAccess")
554554
public static class MyPojo {
555-
private final String name;
555+
String name;
556556
}
557557
}

java-dynamic-sqs-listener-core/src/test/java/com/jashmore/sqs/argument/payload/mapper/JacksonPayloadMapperTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import static org.mockito.ArgumentMatchers.eq;
77
import static org.mockito.Mockito.when;
88

9+
import com.fasterxml.jackson.core.JsonProcessingException;
910
import com.fasterxml.jackson.databind.ObjectMapper;
1011
import org.junit.jupiter.api.BeforeEach;
1112
import org.junit.jupiter.api.Test;
@@ -58,7 +59,7 @@ void payloadContainerPojoCanBeMappedToObject() throws IOException {
5859
void errorBuildingPayloadThrowsArgumentResolutionException() throws IOException {
5960
// arrange
6061
final Message message = Message.builder().body("test").build();
61-
when(objectMapper.readValue(anyString(), eq(Pojo.class))).thenThrow(new IOException());
62+
when(objectMapper.readValue(anyString(), eq(Pojo.class))).thenThrow(JsonProcessingException.class);
6263

6364
// act
6465
final PayloadMappingException exception = assertThrows(PayloadMappingException.class, () -> payloadMapper.map(message, Pojo.class));
@@ -80,5 +81,4 @@ String getField() {
8081
return field;
8182
}
8283
}
83-
8484
}

java-dynamic-sqs-listener-spring/java-dynamic-sqs-listener-spring-core/src/test/java/it/com/jashmore/sqs/proxy/ProxyBeanQueueListenerResolutionIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package it.com.jashmore.sqs.proxy;
22

3-
import static org.assertj.core.api.Java6Assertions.assertThat;
3+
import static org.assertj.core.api.Assertions.assertThat;
44

55
import com.jashmore.sqs.argument.payload.Payload;
66
import com.jashmore.sqs.elasticmq.ElasticMqSqsAsyncClient;

pom.xml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,32 +66,37 @@
6666
<checkstyle.config.location>configuration/checkstyle/google_6_18_checkstyle.xml</checkstyle.config.location>
6767
<spotbugs.config.location>configuration/spotbugs/bugsExcludeFilter.xml</spotbugs.config.location>
6868

69-
<assertj.version>3.12.2</assertj.version>
69+
<assertj.version>3.16.1</assertj.version>
7070
<avro.version>1.9.2</avro.version>
71-
<aws.sdk.version>2.13.3</aws.sdk.version>
71+
<aws.sdk.version>2.13.7</aws.sdk.version>
7272
<builder-helper-maven-plugin.version>3.1.0</builder-helper-maven-plugin.version>
7373
<checkstyle-plugin.version>3.1.1</checkstyle-plugin.version>
74-
<cglib.version>3.2.10</cglib.version>
74+
<cglib.version>3.3.0</cglib.version>
7575
<elasticmq.version>0.15.6</elasticmq.version>
7676
<guava.version>29.0-jre</guava.version>
77-
<hamcrest.verion>2.2</hamcrest.verion>
78-
<jackson.version>2.9.10.4</jackson.version>
77+
<jackson.version>2.11.0</jackson.version>
7978
<jacoco.version>0.8.5</jacoco.version>
8079
<javax.validation.version>2.0.1.Final</javax.validation.version>
81-
<junit4.version>4.12</junit4.version>
8280
<junit-jupiter.version>5.6.2</junit-jupiter.version>
8381
<logback.version>1.2.3</logback.version>
8482
<lombok.version>1.18.12</lombok.version>
83+
84+
<!-- Be wary of upgrading this to 3.0.0-M5. It made tests begin to fail for no reason, specifically
85+
ConcurrentMessageBrokerTest#threadInterruptedDuringBackoffShouldStopBroker and I was able to get it to
86+
pass by adding a log message before the shutdown. It is like the main thread wasn't being ran after the
87+
countdown latch was passed. No idea why... -->
8588
<maven.failsafe.version>3.0.0-M4</maven.failsafe.version>
8689
<maven.surefire.version>3.0.0-M4</maven.surefire.version>
90+
91+
8792
<mockito.version>3.3.3</mockito.version>
8893
<mockito.jupiter.version>3.3.3</mockito.jupiter.version>
89-
<pitest.version>1.5.1</pitest.version>
94+
<pitest.version>1.5.2</pitest.version>
9095
<slf4j.version>1.7.30</slf4j.version>
9196
<spotbugs.plugin.version>4.0.0</spotbugs.plugin.version>
9297
<spotbugs.version>4.0.2</spotbugs.version>
9398
<spring-cloud-schema-registry-client.version>1.0.3.RELEASE</spring-cloud-schema-registry-client.version>
94-
<spring.boot.version>2.2.5.RELEASE</spring.boot.version>
99+
<spring.boot.version>2.3.1.RELEASE</spring.boot.version>
95100
<skipTests>false</skipTests>
96101
<maven.javadoc.skip>true</maven.javadoc.skip>
97102
</properties>
@@ -202,12 +207,6 @@
202207
<version>${elasticmq.version}</version>
203208
</dependency>
204209

205-
<dependency>
206-
<groupId>junit</groupId>
207-
<artifactId>junit</artifactId>
208-
<version>${junit4.version}</version>
209-
</dependency>
210-
211210
<dependency>
212211
<groupId>org.junit.jupiter</groupId>
213212
<artifactId>junit-jupiter</artifactId>
@@ -227,12 +226,6 @@
227226
<version>${mockito.version}</version>
228227
</dependency>
229228

230-
<dependency>
231-
<groupId>org.hamcrest</groupId>
232-
<artifactId>hamcrest</artifactId>
233-
<version>${hamcrest.verion}</version>
234-
</dependency>
235-
236229
<dependency>
237230
<groupId>org.assertj</groupId>
238231
<artifactId>assertj-core</artifactId>

util/common-utils/src/main/java/com/jashmore/sqs/util/properties/PropertyUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private <T> T safelyGetValue(final String propertyName,
103103
return true;
104104
})
105105
.orElse(defaultValue);
106-
} catch (final Throwable throwable) {
106+
} catch (final RuntimeException throwable) {
107107
log.error("Error obtaining Property value {} returning default value {}", propertyName, defaultValue, throwable);
108108
return defaultValue;
109109
}

0 commit comments

Comments
 (0)