From a3eeed66045a668608f06f83d1cacf42f2279bb5 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 4 Oct 2023 07:09:22 +1000 Subject: [PATCH] fix NPE and setup mvn build with correct version using mvnw Signed-off-by: Olivier Lamy --- .github/workflows/maven.yml | 5 ++++- .../main/java/servlet/tck/common/request/SecformClient.java | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8dcf16525..fc541a58f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -13,5 +13,8 @@ jobs: uses: actions/setup-java@v1 with: java-version: 11 + - name: Set up Maven + run: + mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper "-Dmaven=3.9.4" - name: Build with Maven - run: mvn -B package --file pom.xml -Dvalidate-format + run: ./mvnw -B verify -Dvalidate-format diff --git a/tck/tck-runtime/src/main/java/servlet/tck/common/request/SecformClient.java b/tck/tck-runtime/src/main/java/servlet/tck/common/request/SecformClient.java index 61a8d51bf..9c5cc21d1 100644 --- a/tck/tck-runtime/src/main/java/servlet/tck/common/request/SecformClient.java +++ b/tck/tck-runtime/src/main/java/servlet/tck/common/request/SecformClient.java @@ -163,7 +163,7 @@ public class SecformClient extends BaseTckTest { private Response errorPageRequestResponse = null; - private Map cookies = null; + private Map cookies = new HashMap<>(); /* * @class.setup_props: webServerHost; webServerPort; user; password; authuser; @@ -2196,7 +2196,6 @@ public Response followRedirect(Response response, int testNum) */ public void addNewCookies(final Map oldCookies, Map newCookies) { newCookies.forEach((key, value) -> oldCookies.put(key.trim(), value.trim())); - } /**