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
This commit is contained in:
Javen O'Neal 2015-11-24 01:20:45 +00:00
parent a736ac1777
commit cd254f2f1e

View File

@ -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();