Browse Source

Buzilla #40676: Fix newly introduced findbugs warnings. Submitted by Luis Bernardo.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1350790 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-1_1rc1^2
Glenn Adams 12 years ago
parent
commit
3b991e5413
3 changed files with 42 additions and 2 deletions
  1. 37
    0
      findbugs-exclude.xml
  2. 2
    2
      src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java
  3. 3
    0
      status.xml

+ 37
- 0
findbugs-exclude.xml View File

@@ -5162,4 +5162,41 @@
<Method name="getNonEmptyLevels"/>
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/>
</Match>
<Match>
<Class name="org.apache.fop.render.pdf.AbstractImageAdapter"/>
<Method name="populateXObjectDictionaryForIndexColorModel"/>
<Bug pattern="OS_OPEN_STREAM"/>
</Match>
<Match>
<Class name="org.apache.fop.render.pdf.ImageRawPNGAdapter"/>
<Or>
<Method name="outputContents"/>
<Method name="setup"/>
</Or>
<Or>
<Bug pattern="OS_OPEN_STREAM"/>
<Bug pattern="OS_OPEN_STREAM_EXCEPTION_PATH"/>
</Or>
</Match>
<Match>
<Class name="org.apache.fop.render.ps.ImageEncoderPNG"/>
<Method name="writeTo"/>
<Bug pattern="OS_OPEN_STREAM"/>
</Match>
<Match>
<Or>
<Class name="org.apache.fop.render.pdf.PDFImageHandlerRawPNG"/>
<Class name="org.apache.fop.render.ps.PSImageHandlerRawPNG"/>
</Or>
<Method name="getSupportedImageFlavors"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
<Match>
<Class name="org.apache.fop.render.ps.PSImageHandlerRawPNG"/>
<Or>
<Method name="handleImage"/>
<Method name="generateForm"/>
</Or>
<Bug pattern="BC_UNCONFIRMED_CAST"/>
</Match>
</FindBugsFilter>

+ 2
- 2
src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java View File

@@ -226,7 +226,7 @@ public abstract class AbstractImageAdapter implements PDFImage {
if (hival > MAX_HIVAL) {
throw new UnsupportedOperationException("hival must not go beyond " + MAX_HIVAL);
}
indexed.add(new Integer(hival));
indexed.add(Integer.valueOf(hival));
int[] palette = new int[c];
icm.getRGBs(palette);
ByteArrayOutputStream baout = new ByteArrayOutputStream();
@@ -263,7 +263,7 @@ public abstract class AbstractImageAdapter implements PDFImage {
icm.getBlues(blues);
for (int i = 0; i < icm.getMapSize(); i++) {
if ((alphas[i] & 0xFF) == 0) {
return new Integer(i);
return Integer.valueOf(i);
}
}
return null;

+ 3
- 0
status.xml View File

@@ -63,6 +63,9 @@
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
<action context="Images" dev="GA" type="update" fixes-bug="40676" due-to="Luis Bernardo">
Fix newly introduced findbugs warnings.
</action>
<action context="Images" dev="GA" type="fix" fixes-bug="40676" due-to="Luis Bernardo, Matthias Reischenbacher">
Support use of ImageLoaderRawPNG decoder in order to prevent re-encoding of PNG images (and unnecssary output file bloat).
</action>

Loading…
Cancel
Save