From 82d704710e593318b33bcee5e90f7495a50e31f1 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Tue, 24 Nov 2015 01:20:45 +0000 Subject: [PATCH] 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 --- .../org/apache/poi/hssf/usermodel/DummyGraphics2d.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(); -- 2.39.5