From f9403e14e7ff1d14aff129c0175c7b2afcaf78ea Mon Sep 17 00:00:00 2001 From: Marten Deinum Date: Thu, 15 Dec 2022 15:57:55 +0100 Subject: [PATCH 1/3] Polish build file --- spring-batch-excel/pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-batch-excel/pom.xml b/spring-batch-excel/pom.xml index 9784e7a1..32b5e41e 100644 --- a/spring-batch-excel/pom.xml +++ b/spring-batch-excel/pom.xml @@ -122,6 +122,7 @@ ${java.version} ${java.version} + true -Xlint:all,deprecation @@ -185,10 +186,12 @@ + org.apache.maven.plugins maven-surefire-plugin 3.0.0-M7 + org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M7 From 855a4f8852874e08d62b120a669e48ba6e079f2d Mon Sep 17 00:00:00 2001 From: Marten Deinum Date: Tue, 19 Sep 2023 21:25:17 +0200 Subject: [PATCH 2/3] Use an ArrayList instead of LinkedList Both the ArrayList and LinkedList keep the order of insertion, there is no need to use the LinkedList. --- .../batch/extensions/excel/poi/PoiSheet.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-batch-excel/src/main/java/org/springframework/batch/extensions/excel/poi/PoiSheet.java b/spring-batch-excel/src/main/java/org/springframework/batch/extensions/excel/poi/PoiSheet.java index a28a725e..f47938d0 100644 --- a/spring-batch-excel/src/main/java/org/springframework/batch/extensions/excel/poi/PoiSheet.java +++ b/spring-batch-excel/src/main/java/org/springframework/batch/extensions/excel/poi/PoiSheet.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2023 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. @@ -16,8 +16,8 @@ package org.springframework.batch.extensions.excel.poi; +import java.util.ArrayList; import java.util.Iterator; -import java.util.LinkedList; import java.util.List; import org.apache.poi.ss.usermodel.Cell; @@ -88,7 +88,7 @@ private String[] map(Row row) { if (row == null) { return null; } - final List cells = new LinkedList<>(); + final List cells = new ArrayList<>(); final int numberOfColumns = row.getLastCellNum(); for (int i = 0; i < numberOfColumns; i++) { From 9521ccb75ae36596eed58b3221bbbdb354f13329 Mon Sep 17 00:00:00 2001 From: Marten Deinum Date: Mon, 2 Oct 2023 19:57:18 +0200 Subject: [PATCH 3/3] Upgrade to Spring Batch 4.3.8. --- spring-batch-excel/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-batch-excel/pom.xml b/spring-batch-excel/pom.xml index dec41b28..aa789970 100644 --- a/spring-batch-excel/pom.xml +++ b/spring-batch-excel/pom.xml @@ -44,7 +44,7 @@ 1.8 - 4.3.7 + 4.3.9 4.1.2