]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Add approved exclusion for two warnings
authorAndreas L. Delmelle <adelmelle@apache.org>
Mon, 30 Nov 2015 09:22:05 +0000 (09:22 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Mon, 30 Nov 2015 09:22:05 +0000 (09:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1717211 13f79535-47bb-0310-9956-ffa450edef68

findbugs-exclude.xml

index 2eaa8580b370e1bd67c4562c92880bb79eb2f153..2b2839c1a7e9a79ac97d82659fdf975a10c9ac37 100644 (file)
   -->
 
   <!-- START - APPROVED EXCLUSIONS -->
+  <Match>
+    <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ"/>
+    <!-- OK; check mainly serves to cover case where both strings are null -->
+    <And>
+      <Class name="org.apache.fop.afp.AFPResourceInfo"/>
+      <Method name="equals"/>
+    </And>
+  </Match>    
   <Match>
     <Bug pattern="BC_BAD_CAST_TO_CONCRETE_COLLECTION"/>
     <!-- TODO - Not sure what to do with those two... Seems messy/hacky -->
       </And>
     </Or>
   </Match>
+  <Match>
+    <Bug pattern="DM_DEFAULT_ENCODING"/>
+    <Or>
+      <!-- default encoding used as a fallback/last resort -->
+      <Or>
+        <And>
+          <Method name="getNameBytes"/>
+          <Or>
+            <Class name="org.apache.fop.afp.fonts.CharacterSet"/>
+            <Class name="org.apache.fop.afp.modca.AbstractNamedAFPObject"/>
+          </Or>
+        </And>
+        <And>
+          <Class name="org.apache.fop.pdf.PDFDocument"/>
+          <Method name="encode"/>
+        </And>
+      </Or>
+      <!-- reads from or writes to terminal/console -->
+      <Or>
+        <And>
+          <Class name="org.apache.fop.fonts.autodetect.WindowsFontDirFinder"/>
+          <Method name="getWinDir"/>
+        </And>
+        <And>
+          <Class name="org.apache.fop.hyphenation.HyphenationTree"/>
+          <Method name="main"/>
+        </And>
+        <And>
+          <Class name="org.apache.fop.render.rtf.rtflib.RtfFile"/>
+          <Method name="main"/>
+        </And>
+      </Or>
+      <!-- private method: byte-to-string and string-to-byte always on the same platform -->
+      <And>
+        <Class name="org.apache.fop.render.afp.AFPPainter$AFPBorderPainterAdapter"/>
+        <Method name="hash"/>
+      </And>
+      <!-- source encoding out of FOP's control (FontBox) -->
+      <Or>
+        <And>
+          <Class name="org.apache.fop.fonts.cff.CFFDataReader"/>
+          <Method name="getString"/>
+        </And>
+        <And>
+          <Class name="org.apache.fop.fonts.truetype.OTFSubSetFile"/>
+          <Or>
+            <Method name="createCFF"/>
+            <Method name="writeROSEntry"/>
+            <Method name="writeStringIndex"/>
+          </Or>
+        </And>
+        <And>
+          <Class name="org.apache.fop.render.ps.PSFontUtils"/>
+          <Method name="embedType2CFF"/>
+        </And>
+      </Or>
+    </Or>
+  </Match>
+  <Match>
+    <!-- class only used when building? -->
+    <Bug pattern="OS_OPEN_STREAM_EXCEPTION_PATH"/>
+    <And>
+      <Class name="org.apache.fop.hyphenation.SerializeHyphPattern"/>
+      <Method name="serializeFile"/>
+    </And>
+  </Match>
   <Match>
     <Bug pattern="DM_EXIT"/>
     <Or>