]> source.dussan.org Git - poi.git/commitdiff
Sonar: 'static modifier out of order with the JLS suggestions.remove No need to check...
authorJaven O'Neal <onealj@apache.org>
Mon, 13 Jun 2016 10:55:49 +0000 (10:55 +0000)
committerJaven O'Neal <onealj@apache.org>
Mon, 13 Jun 2016 10:55:49 +0000 (10:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748175 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/POIDocument.java

index 7235958ddfb5553803af1bdae02e18b58d55ca4d..68ed3c1769fac501b7e3d090b9b9b3556c360551 100644 (file)
@@ -54,7 +54,7 @@ public abstract class POIDocument {
     protected DirectoryNode directory;
 
     /** For our own logging use */
-    private final static POILogger logger = POILogFactory.getLogger(POIDocument.class);
+    private static final POILogger logger = POILogFactory.getLogger(POIDocument.class);
 
     /* Have the property streams been read yet? (Only done on-demand) */
     private boolean initialized = false;
@@ -145,18 +145,22 @@ public abstract class POIDocument {
 
         // DocumentSummaryInformation
         ps = getPropertySet(DocumentSummaryInformation.DEFAULT_STREAM_NAME);
-        if (ps != null && ps instanceof DocumentSummaryInformation) {
+        if (ps instanceof DocumentSummaryInformation) {
             dsInf = (DocumentSummaryInformation)ps;
-        } else if(ps != null) {
+        } else if (ps != null) {
             logger.log(POILogger.WARN, "DocumentSummaryInformation property set came back with wrong class - ", ps.getClass());
+        } else {
+            logger.log(POILogger.WARN, "DocumentSummaryInformation property set came back as null");
         }
 
         // SummaryInformation
         ps = getPropertySet(SummaryInformation.DEFAULT_STREAM_NAME);
         if (ps instanceof SummaryInformation) {
             sInf = (SummaryInformation)ps;
-        } else if(ps != null) {
+        } else if (ps != null) {
             logger.log(POILogger.WARN, "SummaryInformation property set came back with wrong class - ", ps.getClass());
+        } else {
+            logger.log(POILogger.WARN, "SummaryInformation property set came back as null");
         }
 
         // Mark the fact that we've now loaded up the properties