From b5fe208770bb58cf47fc1b02d883da1711d3c193 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Tue, 22 Jan 2019 10:00:01 +0000 Subject: [PATCH] Fix some IDE warnings and JVM deprecations git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1851795 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/util/POILogFactory.java | 2 +- src/testcases/org/apache/poi/ss/util/TestCellReference.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/poi/util/POILogFactory.java b/src/java/org/apache/poi/util/POILogFactory.java index 528c918939..576ea55586 100644 --- a/src/java/org/apache/poi/util/POILogFactory.java +++ b/src/java/org/apache/poi/util/POILogFactory.java @@ -106,7 +106,7 @@ public final class POILogFactory { @SuppressWarnings("unchecked") Class loggerClass = (Class) Class.forName(_loggerClassName); - logger = loggerClass.newInstance(); + logger = loggerClass.getConstructor().newInstance(); logger.initialize(cat); } catch(Exception e) { // Give up and use the null logger diff --git a/src/testcases/org/apache/poi/ss/util/TestCellReference.java b/src/testcases/org/apache/poi/ss/util/TestCellReference.java index 686f2b40ce..71e2218fef 100644 --- a/src/testcases/org/apache/poi/ss/util/TestCellReference.java +++ b/src/testcases/org/apache/poi/ss/util/TestCellReference.java @@ -380,10 +380,9 @@ public final class TestCellReference { //noinspection ObjectEqualsNull assertNotEquals("null", null, ref1); assertNotEquals("3D vs 2D", ref1, new CellReference("A5")); - //noinspection EqualsBetweenInconvertibleTypes - assertNotEquals("type", ref1, new Integer(0)); + assertNotEquals("type", ref1, 0L); } - + @Test public void isRowWithinRange() { SpreadsheetVersion ss = SpreadsheetVersion.EXCEL2007; -- 2.39.5