You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/06/13 03:48:30 UTC

svn commit: r1748080 - in /poi/trunk/src: java/org/apache/poi/ddf/EscherComplexProperty.java java/org/apache/poi/dev/RecordGenerator.java java/org/apache/poi/hpsf/Decimal.java resources/devtools/findbugs-filters.xml

Author: onealj
Date: Mon Jun 13 03:48:30 2016
New Revision: 1748080

URL: http://svn.apache.org/viewvc?rev=1748080&view=rev
Log:
fix findbugs issues

Modified:
    poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java
    poi/trunk/src/java/org/apache/poi/dev/RecordGenerator.java
    poi/trunk/src/java/org/apache/poi/hpsf/Decimal.java
    poi/trunk/src/resources/devtools/findbugs-filters.xml

Modified: poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java?rev=1748080&r1=1748079&r2=1748080&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java Mon Jun 13 03:48:30 2016
@@ -106,7 +106,7 @@ public class EscherComplexProperty exten
         if (this == o) {
             return true;
         }
-        if (!(o instanceof EscherComplexProperty)) {
+        if (o == null || !(o instanceof EscherComplexProperty)) {
             return false;
         }
 

Modified: poi/trunk/src/java/org/apache/poi/dev/RecordGenerator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/dev/RecordGenerator.java?rev=1748080&r1=1748079&r2=1748080&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/dev/RecordGenerator.java (original)
+++ poi/trunk/src/java/org/apache/poi/dev/RecordGenerator.java Mon Jun 13 03:48:30 2016
@@ -92,7 +92,9 @@ public class RecordGenerator {
                 // Generate record
                 String destinationPath = destSrcPathDir + "/" + packageName;
                 File destinationPathFile = new File(destinationPath);
-                destinationPathFile.mkdirs();
+                if (destinationPathFile.mkdirs()) {
+                    System.out.println("Created destination directory: " + destinationPath);
+                }
                 String destinationFilepath = destinationPath + "/" + recordName + suffix + ".java";
                 transform(file, new File(destinationFilepath), 
                           new File(recordStyleDir + "/" + extendstg.toLowerCase(Locale.ROOT) + ".xsl"));
@@ -101,7 +103,9 @@ public class RecordGenerator {
                 // Generate test (if not already generated)
                 destinationPath = testSrcPathDir + "/" + packageName;
                 destinationPathFile = new File(destinationPath);
-                destinationPathFile.mkdirs();
+                if (destinationPathFile.mkdirs()) {
+                    System.out.println("Created destination directory: " + destinationPath);
+                }
                 destinationFilepath = destinationPath + "/Test" + recordName + suffix + ".java";
                 if (new File(destinationFilepath).exists() == false) {
                     String temp = (recordStyleDir + "/" + extendstg.toLowerCase(Locale.ROOT) + "_test.xsl");

Modified: poi/trunk/src/java/org/apache/poi/hpsf/Decimal.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/Decimal.java?rev=1748080&r1=1748079&r2=1748080&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/Decimal.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/Decimal.java Mon Jun 13 03:48:30 2016
@@ -24,6 +24,9 @@ class Decimal
 {
     static final int SIZE = 16;
 
+    /**
+     * Findbugs: UNR_UNREAD_FIELD
+     */
     private short field_1_wReserved;
     private byte field_2_scale;
     private byte field_3_sign;

Modified: poi/trunk/src/resources/devtools/findbugs-filters.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/resources/devtools/findbugs-filters.xml?rev=1748080&r1=1748079&r2=1748080&view=diff
==============================================================================
--- poi/trunk/src/resources/devtools/findbugs-filters.xml (original)
+++ poi/trunk/src/resources/devtools/findbugs-filters.xml Mon Jun 13 03:48:30 2016
@@ -80,6 +80,10 @@
 		<Class name="org.apache.poi.xssf.model.IndexedUDFFinder"/>
 		<Bug code="Nm" />
 	</Match>
+		<Match>
+		<Class name="org.apache.poi.hpsf.Decimal"/>
+		<Bug pattern="URF_UNREAD_FIELD" />
+	</Match>
 
 	<!-- named this way on purpose -->
 	<Match>



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