]> source.dussan.org Git - poi.git/commitdiff
FindBugs MALICIOUS_CODE, finalize method should have protected access
authorJaven O'Neal <onealj@apache.org>
Tue, 24 Nov 2015 01:20:45 +0000 (01:20 +0000)
committerJaven O'Neal <onealj@apache.org>
Tue, 24 Nov 2015 01:20:45 +0000 (01:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716006 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java

index cfe5bf6c9e16c0a08fea116feef31c0618c8b0c1..31cd919ed62f1a20dd2cf44fd1f0898b6aad108e 100644 (file)
@@ -46,6 +46,8 @@ import java.text.AttributedCharacterIterator;
 import java.util.Arrays;\r
 import java.util.Map;\r
 \r
+import org.apache.poi.util.Internal;\r
+\r
 public class DummyGraphics2d extends Graphics2D {\r
     private BufferedImage bufimg;\r
     private final Graphics2D g2D;\r
@@ -706,7 +708,12 @@ public class DummyGraphics2d extends Graphics2D {
         g2D.fillRoundRect( x, y, width, height, arcWidth, arcHeight );\r
     }\r
 \r
-    public void finalize() {\r
+    // FIXME: should be protected\r
+    // FindBugs, category MALICIOUS_CODE, FI_PUBLIC_SHOULD_BE_PROTECTED\r
+    // A class's finalize() method should have protected access, not public\r
+    @Internal\r
+    @Override\r
+    public final void finalize() {\r
         log.println( "finalize():" );\r
         g2D.finalize(); // NOSOLAR\r
         super.finalize();\r