From a891c715008faa043d6044aa5686295e04be88dc Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 14:58:00 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E7=A7=BB=E9=99=A4common-io?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- easyexcel-core/pom.xml | 4 ---- easyexcel-support/pom.xml | 12 +++++++++--- pom.xml | 9 ++------- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4270c20..95a3cd0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: java-version: ${{ matrix.java }} distribution: ${{ matrix.distribution }} - name: Cache local Maven repository - uses: actions/cache@v3 + uses: actions/cache@main with: path: ~/.m2/repository key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} diff --git a/easyexcel-core/pom.xml b/easyexcel-core/pom.xml index f8179003..93d013cc 100644 --- a/easyexcel-core/pom.xml +++ b/easyexcel-core/pom.xml @@ -36,9 +36,5 @@ org.ehcache ehcache - - commons-io - commons-io - diff --git a/easyexcel-support/pom.xml b/easyexcel-support/pom.xml index 85e5a533..f07d0446 100644 --- a/easyexcel-support/pom.xml +++ b/easyexcel-support/pom.xml @@ -24,8 +24,8 @@ 5.3.37 - org.springframework - spring-jcl + * + * @@ -49,7 +49,7 @@ true true - + org.springframework:spring-core @@ -63,6 +63,12 @@ + + + org.springframework + com.alibaba.excel.support + + diff --git a/pom.xml b/pom.xml index 0a3da974..6ff3d13d 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ - 4.0.0 + 4.0.1 UTF-8 1.8 true @@ -113,11 +113,6 @@ ehcache 3.9.11 - - commons-io - commons-io - 2.11.0 - org.slf4j slf4j-api @@ -195,7 +190,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.0 org.codehaus.mojo From 1e144e16fe28a6ed5f1cc6a32e2e4a6de057bd51 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 15:19:56 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- update.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6ff3d13d..bf0dd4b0 100644 --- a/pom.xml +++ b/pom.xml @@ -185,7 +185,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.3.0 org.apache.maven.plugins diff --git a/update.md b/update.md index b0fc5642..d1bbb240 100644 --- a/update.md +++ b/update.md @@ -1,3 +1,7 @@ +# 4.0.1 + +* `commons-io` 修改为依赖 `poi`的版本 + # 4.0.0 * `poi`由`4.1.2`升级到`5.2.5` From 58b84830cd78162cc5bcb9e0646852ff8d6e6e6d Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 16:37:40 +0800 Subject: [PATCH 03/12] =?UTF-8?q?*=20=E4=BF=AE=E5=A4=8D=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E8=A2=AB=E6=B8=85=E7=90=86=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E6=8F=90=E7=A4=BA`NoSuchFileException`=E7=9A=84=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EasyExcelTempFileCreationStrategy.java | 136 ++++++++++++++++++ .../com/alibaba/excel/util/FileUtils.java | 13 +- .../easyexcel/test/temp/WriteV33Test.java | 10 ++ .../test/temp/large/TempLargeDataTest.java | 3 +- update.md | 1 + 5 files changed, 152 insertions(+), 11 deletions(-) create mode 100644 easyexcel-core/src/main/java/com/alibaba/excel/util/EasyExcelTempFileCreationStrategy.java diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/util/EasyExcelTempFileCreationStrategy.java b/easyexcel-core/src/main/java/com/alibaba/excel/util/EasyExcelTempFileCreationStrategy.java new file mode 100644 index 00000000..ce4db733 --- /dev/null +++ b/easyexcel-core/src/main/java/com/alibaba/excel/util/EasyExcelTempFileCreationStrategy.java @@ -0,0 +1,136 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package com.alibaba.excel.util; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileAttribute; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +import org.apache.poi.util.DefaultTempFileCreationStrategy; +import org.apache.poi.util.TempFileCreationStrategy; + +import static org.apache.poi.util.TempFile.JAVA_IO_TMPDIR; + +/** + * In the scenario where `poifiles` are cleaned up, the {@link DefaultTempFileCreationStrategy} will throw a + * java.nio.file.NoSuchFileException. Therefore, it is necessary to verify the existence of the temporary file every + * time it is created. + * + * @author Jiaju Zhuang + */ +public class EasyExcelTempFileCreationStrategy implements TempFileCreationStrategy { + /** + * Name of POI files directory in temporary directory. + */ + public static final String POIFILES = "poifiles"; + + /** + * To use files.deleteOnExit after clean JVM exit, set the -Dpoi.delete.tmp.files.on.exit JVM property + */ + public static final String DELETE_FILES_ON_EXIT = "poi.delete.tmp.files.on.exit"; + + /** + * The directory where the temporary files will be created (null to use the default directory). + */ + private volatile File dir; + + /** + * The lock to make dir initialized only once. + */ + private final Lock dirLock = new ReentrantLock(); + + /** + * Creates the strategy so that it creates the temporary files in the default directory. + * + * @see File#createTempFile(String, String) + */ + public EasyExcelTempFileCreationStrategy() { + this(null); + } + + /** + * Creates the strategy allowing to set the + * + * @param dir The directory where the temporary files will be created (null to use the default + * directory). + * @see Files#createTempFile(Path, String, String, FileAttribute[]) + */ + public EasyExcelTempFileCreationStrategy(File dir) { + this.dir = dir; + } + + private void createPOIFilesDirectory() throws IOException { + // Create our temp dir only once by double-checked locking + // The directory is not deleted, even if it was created by this TempFileCreationStrategy + if (dir == null || !dir.exists()) { + dirLock.lock(); + try { + if (dir == null || !dir.exists()) { + String tmpDir = System.getProperty(JAVA_IO_TMPDIR); + if (tmpDir == null) { + throw new IOException("System's temporary directory not defined - set the -D" + JAVA_IO_TMPDIR + + " jvm property!"); + } + Path dirPath = Paths.get(tmpDir, POIFILES); + dir = Files.createDirectories(dirPath).toFile(); + } + } finally { + dirLock.unlock(); + } + return; + } + } + + @Override + public File createTempFile(String prefix, String suffix) throws IOException { + // Identify and create our temp dir, if needed + createPOIFilesDirectory(); + + // Generate a unique new filename + File newFile = Files.createTempFile(dir.toPath(), prefix, suffix).toFile(); + + // Set the delete on exit flag, but only when explicitly disabled + if (System.getProperty(DELETE_FILES_ON_EXIT) != null) { + newFile.deleteOnExit(); + } + + // All done + return newFile; + } + + /* (non-JavaDoc) Created directory path is /poifiles/prefix0123456789 */ + @Override + public File createTempDirectory(String prefix) throws IOException { + // Identify and create our temp dir, if needed + createPOIFilesDirectory(); + + // Generate a unique new filename + File newDirectory = Files.createTempDirectory(dir.toPath(), prefix).toFile(); + + //this method appears to be only used in tests, so it is probably ok to use deleteOnExit + newDirectory.deleteOnExit(); + + // All done + return newDirectory; + } +} diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java b/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java index d800be51..f514f6f7 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java @@ -12,7 +12,6 @@ import java.util.UUID; import com.alibaba.excel.exception.ExcelAnalysisException; import com.alibaba.excel.exception.ExcelCommonException; -import org.apache.poi.util.DefaultTempFileCreationStrategy; import org.apache.poi.util.TempFile; /** @@ -111,7 +110,7 @@ public class FileUtils { /** * Write inputStream to file * - * @param file file + * @param file file * @param inputStream inputStream */ public static void writeToFile(File file, InputStream inputStream) { @@ -121,8 +120,8 @@ public class FileUtils { /** * Write inputStream to file * - * @param file file - * @param inputStream inputStream + * @param file file + * @param inputStream inputStream * @param closeInputStream closeInputStream */ public static void writeToFile(File file, InputStream inputStream, boolean closeInputStream) { @@ -154,11 +153,8 @@ public class FileUtils { } } - public static void createPoiFilesDirectory() { - File poiFilesPathFile = new File(poiFilesPath); - createDirectory(poiFilesPathFile); - TempFile.setTempFileCreationStrategy(new DefaultTempFileCreationStrategy(poiFilesPathFile)); + TempFile.setTempFileCreationStrategy(new EasyExcelTempFileCreationStrategy()); } public static File createCacheTmpFile() { @@ -171,7 +167,6 @@ public class FileUtils { } /** - * * @param directory */ public static File createDirectory(File directory) { diff --git a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/WriteV33Test.java b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/WriteV33Test.java index ed5b2385..5e83405d 100644 --- a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/WriteV33Test.java +++ b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/WriteV33Test.java @@ -1,5 +1,8 @@ package com.alibaba.easyexcel.test.temp; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -135,4 +138,11 @@ public class WriteV33Test { return list; } + + @Test + public void test4() throws Exception{ + Path path= Files.createTempFile(new File("/Users/zhuangjiaju/test/test0422/test/xx").toPath(),System.currentTimeMillis()+"",".jpg"); + System.out.println(path); + } + } diff --git a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/large/TempLargeDataTest.java b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/large/TempLargeDataTest.java index b88bf06e..246656c1 100644 --- a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/large/TempLargeDataTest.java +++ b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/large/TempLargeDataTest.java @@ -8,7 +8,6 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.IntStream; -import com.alibaba.easyexcel.test.core.large.LargeDataTest; import com.alibaba.easyexcel.test.util.TestFileUtil; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.ExcelWriter; @@ -31,7 +30,7 @@ import org.slf4j.LoggerFactory; public class TempLargeDataTest { - private static final Logger LOGGER = LoggerFactory.getLogger(LargeDataTest.class); + private static final Logger LOGGER = LoggerFactory.getLogger(TempLargeDataTest.class); private int i = 0; private static File fileFill07; diff --git a/update.md b/update.md index d1bbb240..6b141fff 100644 --- a/update.md +++ b/update.md @@ -1,6 +1,7 @@ # 4.0.1 * `commons-io` 修改为依赖 `poi`的版本 +* 修复临时目录被清理可能提示`NoSuchFileException`的异常 # 4.0.0 From 1cfad855611dbcbcc1bf8a4ed5ed6c4e34159eef Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 16:42:52 +0800 Subject: [PATCH 04/12] =?UTF-8?q?*=20=E4=BF=AE=E5=A4=8D=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E8=A2=AB=E6=B8=85=E7=90=86=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E6=8F=90=E7=A4=BA`NoSuchFileException`=E7=9A=84=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index bf0dd4b0..44dd0796 100644 --- a/pom.xml +++ b/pom.xml @@ -230,11 +230,13 @@ com/alibaba/excel/metadata/DataFormatter.java com/alibaba/excel/util/DateUtils.java com/alibaba/excel/util/MapUtils.java + com/alibaba/excel/util/EasyExcelTempFileCreationStrategy.java com/alibaba/excel/metadata/format/DataFormatter.java com/alibaba/excel/metadata/format/ExcelGeneralNumberFormat.java com/alibaba/excel/metadata/csv/CsvDataFormat.java com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java com/alibaba/excel/analysis/v07/handlers/sax/SharedStringsTableHandler.java + com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java From 99e527e9b4e3560fa06669a1e541233243bd5eef Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 17:05:00 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/alibaba/excel/util/FileUtils.java | 2 +- easyexcel-test/pom.xml | 2 +- .../test/core/dataformat/DateFormatData.java | 1 + .../test/core/dataformat/DateFormatTest.java | 8 +++++++- .../test/resources/dataformat/dataformat.xls | Bin 28672 -> 28672 bytes .../test/resources/dataformat/dataformat.xlsx | Bin 12460 -> 12615 bytes 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java b/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java index f514f6f7..7a09de9a 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java @@ -154,7 +154,7 @@ public class FileUtils { } public static void createPoiFilesDirectory() { - TempFile.setTempFileCreationStrategy(new EasyExcelTempFileCreationStrategy()); + //TempFile.setTempFileCreationStrategy(new EasyExcelTempFileCreationStrategy()); } public static File createCacheTmpFile() { diff --git a/easyexcel-test/pom.xml b/easyexcel-test/pom.xml index cd1bdb91..8c540b22 100644 --- a/easyexcel-test/pom.xml +++ b/easyexcel-test/pom.xml @@ -74,7 +74,7 @@ /com/alibaba/easyexcel/test/core/**/*.java - true + false diff --git a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatData.java b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatData.java index 5958161c..31cdd85d 100644 --- a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatData.java +++ b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatData.java @@ -13,6 +13,7 @@ import lombok.Setter; public class DateFormatData { private String date; private String dateStringCn; + private String dateStringCn2; private String dateStringUs; private String number; private String numberStringCn; diff --git a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java index 43a00fae..655239f8 100644 --- a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java +++ b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java @@ -3,6 +3,7 @@ package com.alibaba.easyexcel.test.core.dataformat; import java.io.File; import java.util.List; import java.util.Locale; +import java.util.Objects; import com.alibaba.easyexcel.test.util.TestFileUtil; import com.alibaba.excel.EasyExcel; @@ -54,7 +55,12 @@ public class DateFormatTest { } } for (DateFormatData data : list) { - Assertions.assertEquals(data.getDateStringCn(), data.getDate()); + // The way dates are read in Chinese is different on Linux and Mac, so it is acceptable if it matches either one. + // For example, on Linux: 1-Jan -> 1-1月 + // On Mac: 1-Jan -> 1-一月 + Assertions.assertTrue( + Objects.equals(data.getDateStringCn(), data.getDate()) || Objects.equals(data.getDateStringCn2(), + data.getDate())); Assertions.assertEquals(data.getNumberStringCn(), data.getNumber()); } } diff --git a/easyexcel-test/src/test/resources/dataformat/dataformat.xls b/easyexcel-test/src/test/resources/dataformat/dataformat.xls index c8afd6461f3398c3405321a0358d024cf55f2719..ec0c39ba4bf089807e3ec96247e79d7c6aec10fb 100644 GIT binary patch delta 1846 zcmZvdPiPZC6vp4oZZ`k_T5D~qAXufX;f(EN-t!=5Xpsm$5CPqaBwTK9sD7F_* zcEF>E2M^*w$W=r^5EQ&BJxE1738FpeLGXREo0@HR7bZL3yx+{5mv45f^P)O0o?kTm z6GOwX@z-Qz+vPT)W=7)`gR0Frl1$yC2$_73gyOuu-S?4?o;HkI7)kw)_Y(;U#yOfV8Ph*& zbju?YkjRF}Pc1?}h`83!akL6gV2em$X`tbunI4+YL&Fx9&WEJjS|ve&WnzMY9$Lsl z3wvl04=w7Up<4b59dnfirF3VQAQaJDQo^K%mh#Y6cxX)xTBTn8l?`HDYxdAqd1x&j z+G-E2b-C6`ZOcV!ho-v5GdiwS53js+87rr{nf=wF_Yu|cX=nZ@$8RWP zdbT@#I3`Cp79in;b4;c*iGMjq*~Lgp-72Jop`H~sCWW;4tsrSkXPqEJ%{gjvQBATM zIAh1A7S$B1JI-L9qHbq(`%1SzblYCU=waPn*X@&HdJXdIt$q|pQW6=us>LR^)h9(0_AZM;2WqKdxu(})#9BBA11P64+mhZiQJoE#XAcc>U@dGp%V z{ANxM$U!g6l&iz(|0-Ak>QF!~Ocgc)DntX+v4C8hDs+xu4}HE>;;!sm8SaPXt$cH3 zNzBO=sIYS;9iZM7kgKK&<$wyi1Jtzvxjj@NJDP6V*~8ud^*&NxAI&zRZ~m|dX>3?o z^f4MS&5F^0`Jxy+alDTXOqY+rry$2#6r%%^zv%UbjzGo$ zrrXCD#GpH{H+XL3GsWOjf{Y2wX&++}gT6t=1m?G5D!p02ob@plG3YB~EMNvM`Fjfi zbKb{jBw(ZT_$Vv`XVPaB>2?Jw~d-own!g?a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aba/excel/util/FileUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java b/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java index 7a09de9a..f514f6f7 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/util/FileUtils.java @@ -154,7 +154,7 @@ public class FileUtils { } public static void createPoiFilesDirectory() { - //TempFile.setTempFileCreationStrategy(new EasyExcelTempFileCreationStrategy()); + TempFile.setTempFileCreationStrategy(new EasyExcelTempFileCreationStrategy()); } public static File createCacheTmpFile() { From e8a86c6dbe98a1ab5c46e72a640aee791ad9bce7 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 17:10:58 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index baa22739..789337c2 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ easyexcel重写了poi对07版Excel的解析,一个3M的excel用POI sax解析 com.alibaba easyexcel - 4.0.0 + 4.0.1 ``` From 5844e5f84e156afaed72d123a1cb19b85ec36b11 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 17:37:34 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=A1=88=E4=BE=8B=E6=97=B6`unnamed=20module`?= =?UTF-8?q?=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- easyexcel-test/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/easyexcel-test/pom.xml b/easyexcel-test/pom.xml index 8c540b22..0b8eb98e 100644 --- a/easyexcel-test/pom.xml +++ b/easyexcel-test/pom.xml @@ -71,6 +71,7 @@ org.apache.maven.plugins maven-surefire-plugin + --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED /com/alibaba/easyexcel/test/core/**/*.java From c52385f05b2ffa7acaf6846fa550c9b4935e9f09 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 17:51:57 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=A1=88=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/core/dataformat/DateFormatTest.java | 8 +++++--- .../test/resources/dataformat/dataformat.xls | Bin 28672 -> 29184 bytes .../test/resources/dataformat/dataformat.xlsx | Bin 12615 -> 12655 bytes 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java index 655239f8..1229b238 100644 --- a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java +++ b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatTest.java @@ -47,15 +47,17 @@ public class DateFormatTest { List list = EasyExcel.read(file, DateFormatData.class, null).locale(Locale.CHINA).sheet().doReadSync(); for (DateFormatData data : list) { - if (data.getDateStringCn() != null && !data.getDateStringCn().equals(data.getDate())) { - log.info("date:cn:{},{}", data.getDateStringCn(), data.getDate()); + if (!Objects.equals(data.getDateStringCn(), data.getDate()) && !Objects.equals(data.getDateStringCn2(), + data.getDate())) { + log.info("date:cn:{},{},{}", data.getDateStringCn(), data.getDateStringCn2(), data.getDate()); } if (data.getNumberStringCn() != null && !data.getNumberStringCn().equals(data.getNumber())) { log.info("number:cn{},{}", data.getNumberStringCn(), data.getNumber()); } } for (DateFormatData data : list) { - // The way dates are read in Chinese is different on Linux and Mac, so it is acceptable if it matches either one. + // The way dates are read in Chinese is different on Linux and Mac, so it is acceptable if it matches + // either one. // For example, on Linux: 1-Jan -> 1-1月 // On Mac: 1-Jan -> 1-一月 Assertions.assertTrue( diff --git a/easyexcel-test/src/test/resources/dataformat/dataformat.xls b/easyexcel-test/src/test/resources/dataformat/dataformat.xls index ec0c39ba4bf089807e3ec96247e79d7c6aec10fb..95c306ce007778b92874296492c635f3afded0b0 100644 GIT binary patch delta 505 zcmY*VODsb{6g@M2?R%|OltvK2LTp5|eii=+LgFuxppno#)kb`RUB$By7BL_u%HdH`Ca0#)$SKyKI(G=)~EU@U2td9u=KP=1LN8ld5zIsF5*1z07`Ea5HT zHDLn-@>_u|!hJ$J2e#XQXTq?SOWS%x7WVD99bE%7{5LXv;56u6B9KDm&f5VrgpmkKc5y$dX6x3m)ZntiCw)t!@Lfb_1WTHALWk| o@-uS8MAl3xOURFijmyRP5ZjA&YVU7Mzr15MaTu+ZM$E8(0hg0+q5uE@ delta 354 zcmZp8!r1VDaRUnzuPFlq!@vLk|FZyTlgWZiyLmx8GpOjlje+WnlUQZ3hX_Lr2T&axWHMZszvM_OoYTU}a)pu-`nzcODPh9zO<#q{z*;(xe$T2S+<{OkR|%!O6(P z#vs7J#1K9Cda^#4CkW;Vr$Bf@Al_#Gl--PsdXu@+l-czdEI@FwX_^xsFHn+!fe{FS vET+l68NrM$n{TEaXJq8ryfA~AX;O|W$AQPZu?KH4GEa8QGTz*f)4&Py_ zO$&4n45HRQa;MMV-F@ero~?`Ad*s>(B@;xB0_1VYR4U{$LD#=7{66xGr81?tk~~2h zZqV7_>zC7&(hqZ`9y|b$CPA6CWsI?5884_gQYDvQStwml3tPR!rqrCKCga?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uZq0Zx;~FeU`?FLDf%@Guqui<1X2 RJ^>4pMlmA> Date: Tue, 18 Jun 2024 18:33:53 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 4 ++++ easyexcel-test/pom.xml | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95a3cd0b..c95b8612 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,11 @@ jobs: - name: Chmod run: chmod +x mvnw - name: Test with Maven + if: ${{ matrix.java == '8' }} run: ./mvnw test -B -Dmaven.test.skip=false + - name: Test with Maven + if: ${{ matrix.java != '8' }} + run: ./mvnw test -B -Dmaven.test.skip=false --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED - name: Maven Build run: ./mvnw install -B -V - name: Java Doc diff --git a/easyexcel-test/pom.xml b/easyexcel-test/pom.xml index 0b8eb98e..8c540b22 100644 --- a/easyexcel-test/pom.xml +++ b/easyexcel-test/pom.xml @@ -71,7 +71,6 @@ org.apache.maven.plugins maven-surefire-plugin - --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED /com/alibaba/easyexcel/test/core/**/*.java From a6e968233ca5aa203b902ad67c06038887dccab1 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 18:51:19 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c95b8612..1f518b8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: run: ./mvnw test -B -Dmaven.test.skip=false - name: Test with Maven if: ${{ matrix.java != '8' }} - run: ./mvnw test -B -Dmaven.test.skip=false --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED + run: ./mvnw test -B -Dmaven.test.skip=false -DargLine="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED" - name: Maven Build run: ./mvnw install -B -V - name: Java Doc From 4e2496a12d11e38a47edfb6a0f7dbebe1ec401eb Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 18 Jun 2024 19:12:42 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f518b8b..f4e30b60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: run: ./mvnw test -B -Dmaven.test.skip=false - name: Test with Maven if: ${{ matrix.java != '8' }} - run: ./mvnw test -B -Dmaven.test.skip=false -DargLine="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED" + run: ./mvnw test -B -Dmaven.test.skip=false -DargLine="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED" - name: Maven Build run: ./mvnw install -B -V - name: Java Doc