From ec569824c39948800881ecb372368769d40366bf Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 17 Sep 2019 22:50:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=B5=E8=AF=9D=E7=AD=89?= =?UTF-8?q?=E9=95=BF=E6=95=B0=E5=AD=97=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E7=A7=91=E5=AD=A6=E8=AE=A1=E6=95=B0=E6=B3=95=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20#583?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../converters/booleanconverter/BooleanNumberConverter.java | 2 +- .../test/core/converter/ReadAllConverterDataListener.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/alibaba/excel/converters/booleanconverter/BooleanNumberConverter.java b/src/main/java/com/alibaba/excel/converters/booleanconverter/BooleanNumberConverter.java index 06ac0c73..a0042eaa 100644 --- a/src/main/java/com/alibaba/excel/converters/booleanconverter/BooleanNumberConverter.java +++ b/src/main/java/com/alibaba/excel/converters/booleanconverter/BooleanNumberConverter.java @@ -27,7 +27,7 @@ public class BooleanNumberConverter implements Converter { @Override public Boolean convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { - if (BigDecimal.ONE.equals(cellData.getNumberValue())) { + if (BigDecimal.ONE.compareTo(cellData.getNumberValue()) == 0) { return Boolean.TRUE; } return Boolean.FALSE; diff --git a/src/test/java/com/alibaba/easyexcel/test/core/converter/ReadAllConverterDataListener.java b/src/test/java/com/alibaba/easyexcel/test/core/converter/ReadAllConverterDataListener.java index f4f0a1e7..c8b5d8bf 100644 --- a/src/test/java/com/alibaba/easyexcel/test/core/converter/ReadAllConverterDataListener.java +++ b/src/test/java/com/alibaba/easyexcel/test/core/converter/ReadAllConverterDataListener.java @@ -65,7 +65,8 @@ public class ReadAllConverterDataListener extends AnalysisEventListener