poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1851795 - in /poi/trunk/src: java/org/apache/poi/util/POILogFactory.java testcases/org/apache/poi/ss/util/TestCellReference.java
Date Tue, 22 Jan 2019 10:00:02 GMT
Author: centic
Date: Tue Jan 22 10:00:01 2019
New Revision: 1851795

URL: http://svn.apache.org/viewvc?rev=1851795&view=rev
Log:
Fix some IDE warnings and JVM deprecations

Modified:
    poi/trunk/src/java/org/apache/poi/util/POILogFactory.java
    poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java

Modified: poi/trunk/src/java/org/apache/poi/util/POILogFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/POILogFactory.java?rev=1851795&r1=1851794&r2=1851795&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/POILogFactory.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/POILogFactory.java Tue Jan 22 10:00:01 2019
@@ -106,7 +106,7 @@ public final class POILogFactory {
                 @SuppressWarnings("unchecked")
                 Class<? extends POILogger> loggerClass =
                     (Class<? extends POILogger>) Class.forName(_loggerClassName);
-                logger = loggerClass.newInstance();
+                logger = loggerClass.getConstructor().newInstance();
                 logger.initialize(cat);
             } catch(Exception e) {
                 // Give up and use the null logger

Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java?rev=1851795&r1=1851794&r2=1851795&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java Tue Jan 22 10:00:01
2019
@@ -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;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message