]> source.dussan.org Git - poi.git/commitdiff
findbugs: fix URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD warnings
authorJaven O'Neal <onealj@apache.org>
Mon, 13 Jun 2016 05:06:47 +0000 (05:06 +0000)
committerJaven O'Neal <onealj@apache.org>
Mon, 13 Jun 2016 05:06:47 +0000 (05:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748085 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java
src/resources/devtools/findbugs-filters.xml
src/scratchpad/src/org/apache/poi/hslf/blip/Metafile.java

index bf9cafaec52f23b0f20a7e9ef6d9f92fc80eeb3e..da8b9836c590336ac267bec59785910bde2ef5fc 100644 (file)
@@ -19,7 +19,8 @@ package org.apache.poi.xwpf.usermodel;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTLatentStyles;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTLsdException;\r
 \r
-public class XWPFLatentStyles {\r
+public class XWPFLatentStyles {
+    // As of 2016-06-10, POI does not contain a LatentStyle class, nor was one included in the patch for bug 48574.\r
     protected XWPFStyles styles; //LatentStyle shall know styles\r
     private CTLatentStyles latentStyles;\r
 \r
index b2152bcf48b4605affb3463e0d8381ebd0045646..318db2b114d9a6fdfc848849889695404ee3af2a 100644 (file)
                <Bug pattern="URF_UNREAD_FIELD" />
                <Field name="count2" />
        </Match>
+       <Match>
+               <Class name="org.apache.poi.xwpf.usermodel.XWPFLatentStyles"/>
+               <Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" />
+               <Field name="styles" />
+       </Match>
+       <Match>
+               <Class name="org.apache.poi.hslf.blip.Metafile"/>
+               <Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" />
+               <Field name="compression" />
+       </Match>
        
 
     <!-- invalid performance issues - e.g. see #57840 -->
index 55a62ebffafc585230dfe5d012182d023e13d19c..a04ddc198631ca0638b59d8ae06998367ed5d270 100644 (file)
@@ -37,7 +37,7 @@ import org.apache.poi.util.Units;
 public abstract class Metafile extends HSLFPictureData {
 
     /**
-     *  A structure which represents a 34-byte header preceeding the compressed metafile data
+     *  A structure which represents a 34-byte header preceding the compressed metafile data
      *
      * @author Yegor Kozlov
      */
@@ -66,7 +66,7 @@ public abstract class Metafile extends HSLFPictureData {
         /**
          * Reserved. Always 0.
          */
-        public int compression;
+        public int compression = 0;
 
         /**
          * Reserved. Always 254.