From 461cfe1514f091b8907d799b950b8129812d2ef3 Mon Sep 17 00:00:00 2001 From: ATX Bot Date: Thu, 12 Mar 2026 13:56:44 +1100 Subject: [PATCH 1/4] Step 1: Establish Baseline and Update Build Tools Build status: Success --- pom.xml | 5 ++--- src/main/java/com/nurkiewicz/download/MainApplication.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 95eaeb5..402ec94 100644 --- a/pom.xml +++ b/pom.xml @@ -19,10 +19,9 @@ org.apache.maven.plugins maven-compiler-plugin - 3.0 + 3.13.0 - 1.8 - 1.8 + 21 diff --git a/src/main/java/com/nurkiewicz/download/MainApplication.java b/src/main/java/com/nurkiewicz/download/MainApplication.java index 3bccd44..fe10ce1 100644 --- a/src/main/java/com/nurkiewicz/download/MainApplication.java +++ b/src/main/java/com/nurkiewicz/download/MainApplication.java @@ -7,7 +7,7 @@ class MainApplication { public static void main(String[] args) { - Integer temp = new Integer("1234"); + Integer temp = Integer.valueOf("1234"); SpringApplication.run(MainApplication.class, args); } } From 8113e5ca781c2c3608521c70a86b93f12a6f4f2c Mon Sep 17 00:00:00 2001 From: ATX Bot Date: Thu, 12 Mar 2026 13:58:52 +1100 Subject: [PATCH 2/4] Step 2: Update Core Utility Libraries (Guava, Commons-IO, Commons-Codec, CGLib) Build status: Success --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 402ec94..b8e3e84 100644 --- a/pom.xml +++ b/pom.xml @@ -55,12 +55,12 @@ commons-io commons-io - 2.4 + 2.18.0 commons-codec commons-codec - 1.10 + 1.17.1 org.springframework.boot @@ -93,12 +93,12 @@ com.google.guava guava - 18.0 + 33.4.0-jre cglib cglib-nodep - 3.1 + 3.3.0 org.springframework From 1b3eec51b9370e213c0970f76e2e54e19a1faf52 Mon Sep 17 00:00:00 2001 From: ATX Bot Date: Thu, 12 Mar 2026 14:04:07 +1100 Subject: [PATCH 3/4] Step 3: Upgrade Spring Boot to 3.2.12 and Spring Framework Dependencies Build status: Success --- pom.xml | 66 ++------------------------------------------------------- 1 file changed, 2 insertions(+), 64 deletions(-) diff --git a/pom.xml b/pom.xml index b8e3e84..7dd991f 100644 --- a/pom.xml +++ b/pom.xml @@ -6,12 +6,11 @@ 0.0.1-SNAPSHOT UTF-8 - 4.1.1.RELEASE org.springframework.boot spring-boot-starter-parent - 1.2.3.RELEASE + 3.2.12 @@ -29,17 +28,11 @@ io.spring.repo.maven.milestone - http://repo.spring.io/milestone/ + https://repo.spring.io/milestone/ false - - org.springframework - spring-test - 4.1.6.RELEASE - test - org.spockframework spock-spring @@ -65,23 +58,14 @@ org.springframework.boot spring-boot-starter-web - 1.2.3.RELEASE org.springframework.boot spring-boot-starter-actuator - 1.2.3.RELEASE org.springframework.boot spring-boot-starter-test - 1.2.3.RELEASE - - - org.springframework - spring-test - - test @@ -100,52 +84,6 @@ cglib-nodep 3.3.0 - - org.springframework - spring-beans - 4.1.6.RELEASE - - - org.springframework - spring-context - 4.1.6.RELEASE - - - org.springframework - spring-context-support - 4.1.6.RELEASE - - - org.springframework - spring-webmvc - 4.1.6.RELEASE - - - org.springframework - spring-web - 4.1.6.RELEASE - - - org.springframework - spring-aop - 4.1.6.RELEASE - - - org.springframework - spring-core - 4.1.6.RELEASE - - - org.springframework - spring-expression - 4.1.6.RELEASE - - - org.springframework - spring-test - 4.1.6.RELEASE - test - org.codehaus.groovy groovy-all From f7005f388faaf5e0180bfbaca45f5e3945b36db5 Mon Sep 17 00:00:00 2001 From: ATX Bot Date: Thu, 12 Mar 2026 14:26:55 +1100 Subject: [PATCH 4/4] Step 4: Upgrade Groovy and Spock Test Framework for Spring Boot 3 and Java 21 Compatibility Build status: Success --- pom.xml | 47 +++++++++++++------ src/main/resources/logback.xml | 12 +++-- .../download/DownloadControllerTest.groovy | 8 ++-- .../filter/Sha512ShallowEtagHeaderFilter.java | 6 ++- 4 files changed, 47 insertions(+), 26 deletions(-) diff --git a/pom.xml b/pom.xml index 7dd991f..65002b9 100644 --- a/pom.xml +++ b/pom.xml @@ -6,6 +6,7 @@ 0.0.1-SNAPSHOT UTF-8 + 5.0.4 org.springframework.boot @@ -21,6 +22,32 @@ 3.13.0 21 + true + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*Test.* + **/*Spec.* + + + + + org.codehaus.gmavenplus + gmavenplus-plugin + 3.0.2 + + + + compileTests + + + + + 21 @@ -36,13 +63,7 @@ org.spockframework spock-spring - 1.0-groovy-2.4 - - - org.codehaus.groovy - groovy-all - - + 2.4-groovy-5.0 test @@ -71,7 +92,7 @@ org.spockframework spock-core - 1.0-groovy-2.4 + 2.4-groovy-5.0 test @@ -80,14 +101,10 @@ 33.4.0-jre - cglib - cglib-nodep - 3.3.0 - - - org.codehaus.groovy + org.apache.groovy groovy-all - 2.4.3 + 5.0.4 + pom diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 18b78e5..b46488e 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -5,11 +5,13 @@ + + + %d{HH:mm:ss.SSS} | %thread | %-5level | %logger{1} | %msg%n + + + - - - %d{HH:mm:ss.SSS} | %thread | %-5level | %logger{1} | %msg%n - - + \ No newline at end of file diff --git a/src/test/groovy/com/nurkiewicz/download/DownloadControllerTest.groovy b/src/test/groovy/com/nurkiewicz/download/DownloadControllerTest.groovy index dc1b692..b880d5b 100644 --- a/src/test/groovy/com/nurkiewicz/download/DownloadControllerTest.groovy +++ b/src/test/groovy/com/nurkiewicz/download/DownloadControllerTest.groovy @@ -1,9 +1,8 @@ package com.nurkiewicz.download import org.springframework.beans.factory.annotation.Autowired +import org.springframework.boot.test.context.SpringBootTest import org.springframework.test.context.ActiveProfiles -import org.springframework.test.context.ContextConfiguration -import org.springframework.test.context.web.WebAppConfiguration import org.springframework.test.web.servlet.MockMvc import org.springframework.test.web.servlet.setup.MockMvcBuilders import org.springframework.web.context.WebApplicationContext @@ -14,13 +13,12 @@ import java.time.ZoneOffset import java.time.ZonedDateTime import java.time.format.DateTimeFormatter -import static com.google.common.net.HttpHeaders.* +import static org.springframework.http.HttpHeaders.* import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.head import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.* -@WebAppConfiguration -@ContextConfiguration(classes = [MainApplication]) +@SpringBootTest(classes = [MainApplication]) @ActiveProfiles("test") class DownloadControllerSpec extends Specification { diff --git a/src/test/java/org/springframework/web/filter/Sha512ShallowEtagHeaderFilter.java b/src/test/java/org/springframework/web/filter/Sha512ShallowEtagHeaderFilter.java index 50b2c90..e0a60fc 100644 --- a/src/test/java/org/springframework/web/filter/Sha512ShallowEtagHeaderFilter.java +++ b/src/test/java/org/springframework/web/filter/Sha512ShallowEtagHeaderFilter.java @@ -3,10 +3,14 @@ import com.google.common.hash.HashCode; import com.google.common.hash.Hashing; +import java.io.IOException; +import java.io.InputStream; + public class Sha512ShallowEtagHeaderFilter extends ShallowEtagHeaderFilter { @Override - protected String generateETagHeaderValue(byte[] bytes) { + protected String generateETagHeaderValue(InputStream inputStream, boolean isContentCachingDisabled) throws IOException { + final byte[] bytes = inputStream.readAllBytes(); final HashCode hash = Hashing.sha512().hashBytes(bytes); return "\"" + hash + "\""; }