From: Javen O'Neal Date: Tue, 24 Nov 2015 01:20:45 +0000 (+0000) Subject: FindBugs MALICIOUS_CODE, finalize method should have protected access X-Git-Tag: REL_3_14_BETA1~94 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=82d704710e593318b33bcee5e90f7495a50e31f1;p=poi.git FindBugs MALICIOUS_CODE, finalize method should have protected access git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716006 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java b/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java index cfe5bf6c9e..31cd919ed6 100644 --- a/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java +++ b/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java @@ -46,6 +46,8 @@ import java.text.AttributedCharacterIterator; import java.util.Arrays; import java.util.Map; +import org.apache.poi.util.Internal; + public class DummyGraphics2d extends Graphics2D { private BufferedImage bufimg; private final Graphics2D g2D; @@ -706,7 +708,12 @@ public class DummyGraphics2d extends Graphics2D { g2D.fillRoundRect( x, y, width, height, arcWidth, arcHeight ); } - public void finalize() { + // FIXME: should be protected + // FindBugs, category MALICIOUS_CODE, FI_PUBLIC_SHOULD_BE_PROTECTED + // A class's finalize() method should have protected access, not public + @Internal + @Override + public final void finalize() { log.println( "finalize():" ); g2D.finalize(); // NOSOLAR super.finalize();