From 405f6b9ac3b49c6d1923d07f536bafc3467300fb Mon Sep 17 00:00:00 2001 From: Looly Date: Tue, 13 Aug 2024 06:42:11 +0800 Subject: [PATCH] fix code --- .../poi/{exceptions => }/POIException.java | 4 ++-- .../hutool/poi/excel/WorkbookUtil.java | 2 +- .../poi/excel/sax/Excel03SaxReader.java | 2 +- .../poi/excel/sax/Excel07SaxReader.java | 2 +- .../hutool/poi/excel/sax/ExcelSaxReader.java | 2 +- .../hutool/poi/excel/sax/ExcelSaxUtil.java | 2 +- .../hutool/poi/excel/sax/SheetRidReader.java | 2 +- .../hutool/poi/exceptions/package-info.java | 19 ------------------- .../org/dromara/hutool/poi/word/DocUtil.java | 2 +- .../dromara/hutool/poi/word/Word07Writer.java | 2 +- .../poi/excel/reader/ExcelSaxReadTest.java | 2 +- 11 files changed, 11 insertions(+), 30 deletions(-) rename hutool-poi/src/main/java/org/dromara/hutool/poi/{exceptions => }/POIException.java (95%) delete mode 100644 hutool-poi/src/main/java/org/dromara/hutool/poi/exceptions/package-info.java diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/exceptions/POIException.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/POIException.java similarity index 95% rename from hutool-poi/src/main/java/org/dromara/hutool/poi/exceptions/POIException.java rename to hutool-poi/src/main/java/org/dromara/hutool/poi/POIException.java index 47dc1fce9..b570a51e7 100644 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/exceptions/POIException.java +++ b/hutool-poi/src/main/java/org/dromara/hutool/poi/POIException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 looly(loolly@aliyun.com) + * Copyright (c) 2024. looly(loolly@aliyun.com) * Hutool is licensed under Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2. * You may obtain a copy of Mulan PSL v2 at: @@ -10,7 +10,7 @@ * See the Mulan PSL v2 for more details. */ -package org.dromara.hutool.poi.exceptions; +package org.dromara.hutool.poi; import org.dromara.hutool.core.exception.HutoolException; diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/WorkbookUtil.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/WorkbookUtil.java index 612902639..3e1380c85 100644 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/WorkbookUtil.java +++ b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/WorkbookUtil.java @@ -21,7 +21,7 @@ import org.dromara.hutool.core.io.IORuntimeException; import org.dromara.hutool.core.io.IoUtil; import org.dromara.hutool.core.io.file.FileUtil; import org.dromara.hutool.core.text.StrUtil; -import org.dromara.hutool.poi.exceptions.POIException; +import org.dromara.hutool.poi.POIException; import java.io.File; import java.io.IOException; diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel03SaxReader.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel03SaxReader.java index ef465ddf1..f15c6e18d 100644 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel03SaxReader.java +++ b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel03SaxReader.java @@ -17,7 +17,7 @@ import org.dromara.hutool.core.lang.Assert; import org.dromara.hutool.core.util.ObjUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.poi.excel.sax.handler.RowHandler; -import org.dromara.hutool.poi.exceptions.POIException; +import org.dromara.hutool.poi.POIException; import org.apache.poi.hssf.eventusermodel.EventWorkbookBuilder.SheetRecordCollectingListener; import org.apache.poi.hssf.eventusermodel.FormatTrackingHSSFListener; import org.apache.poi.hssf.eventusermodel.HSSFEventFactory; diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel07SaxReader.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel07SaxReader.java index e261c2766..06123e958 100644 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel07SaxReader.java +++ b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel07SaxReader.java @@ -18,7 +18,7 @@ import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.util.ObjUtil; import org.dromara.hutool.poi.excel.sax.handler.RowHandler; -import org.dromara.hutool.poi.exceptions.POIException; +import org.dromara.hutool.poi.POIException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.opc.OPCPackage; diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/ExcelSaxReader.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/ExcelSaxReader.java index 3b0e9be12..fa4a8bf33 100644 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/ExcelSaxReader.java +++ b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/ExcelSaxReader.java @@ -13,7 +13,7 @@ package org.dromara.hutool.poi.excel.sax; import org.dromara.hutool.core.io.file.FileUtil; -import org.dromara.hutool.poi.exceptions.POIException; +import org.dromara.hutool.poi.POIException; import java.io.File; import java.io.InputStream; diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/ExcelSaxUtil.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/ExcelSaxUtil.java index 2c5b294de..cad06fa38 100644 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/ExcelSaxUtil.java +++ b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/ExcelSaxUtil.java @@ -21,7 +21,7 @@ import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.util.ObjUtil; import org.dromara.hutool.poi.excel.ExcelDateUtil; import org.dromara.hutool.poi.excel.sax.handler.RowHandler; -import org.dromara.hutool.poi.exceptions.POIException; +import org.dromara.hutool.poi.POIException; import org.apache.poi.hssf.eventusermodel.FormatTrackingHSSFListener; import org.apache.poi.hssf.record.CellValueRecordInterface; import org.apache.poi.ss.usermodel.DataFormatter; diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/SheetRidReader.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/SheetRidReader.java index bc6997763..66ca2a397 100644 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/SheetRidReader.java +++ b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/SheetRidReader.java @@ -17,7 +17,7 @@ import org.dromara.hutool.core.collection.ListUtil; import org.dromara.hutool.core.io.IORuntimeException; import org.dromara.hutool.core.io.IoUtil; import org.dromara.hutool.core.text.StrUtil; -import org.dromara.hutool.poi.exceptions.POIException; +import org.dromara.hutool.poi.POIException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.xssf.eventusermodel.XSSFReader; import org.xml.sax.Attributes; diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/exceptions/package-info.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/exceptions/package-info.java deleted file mode 100644 index 09d26282e..000000000 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/exceptions/package-info.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2024 looly(loolly@aliyun.com) - * Hutool is licensed under Mulan PSL v2. - * You can use this software according to the terms and conditions of the Mulan PSL v2. - * You may obtain a copy of Mulan PSL v2 at: - * https://license.coscl.org.cn/MulanPSL2 - * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, - * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, - * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. - * See the Mulan PSL v2 for more details. - */ - -/** - * POI相关异常 - * - * @author looly - * - */ -package org.dromara.hutool.poi.exceptions; diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/word/DocUtil.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/word/DocUtil.java index a14e55577..21f048131 100644 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/word/DocUtil.java +++ b/hutool-poi/src/main/java/org/dromara/hutool/poi/word/DocUtil.java @@ -14,7 +14,7 @@ package org.dromara.hutool.poi.word; import org.dromara.hutool.core.io.file.FileUtil; import org.dromara.hutool.core.io.IORuntimeException; -import org.dromara.hutool.poi.exceptions.POIException; +import org.dromara.hutool.poi.POIException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.xwpf.usermodel.XWPFDocument; diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/word/Word07Writer.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/word/Word07Writer.java index 4a405dccd..855d14c0e 100644 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/word/Word07Writer.java +++ b/hutool-poi/src/main/java/org/dromara/hutool/poi/word/Word07Writer.java @@ -18,7 +18,7 @@ import org.dromara.hutool.core.io.IORuntimeException; import org.dromara.hutool.core.io.IoUtil; import org.dromara.hutool.core.lang.Assert; import org.dromara.hutool.core.array.ArrayUtil; -import org.dromara.hutool.poi.exceptions.POIException; +import org.dromara.hutool.poi.POIException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.util.Units; import org.apache.poi.xwpf.usermodel.ParagraphAlignment; diff --git a/hutool-poi/src/test/java/org/dromara/hutool/poi/excel/reader/ExcelSaxReadTest.java b/hutool-poi/src/test/java/org/dromara/hutool/poi/excel/reader/ExcelSaxReadTest.java index 6fe664351..181efc1ce 100644 --- a/hutool-poi/src/test/java/org/dromara/hutool/poi/excel/reader/ExcelSaxReadTest.java +++ b/hutool-poi/src/test/java/org/dromara/hutool/poi/excel/reader/ExcelSaxReadTest.java @@ -23,7 +23,7 @@ import org.dromara.hutool.poi.excel.ExcelUtil; import org.dromara.hutool.poi.excel.cell.values.FormulaCellValue; import org.dromara.hutool.poi.excel.sax.Excel03SaxReader; import org.dromara.hutool.poi.excel.sax.handler.RowHandler; -import org.dromara.hutool.poi.exceptions.POIException; +import org.dromara.hutool.poi.POIException; import org.apache.poi.ss.usermodel.CellStyle; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled;