Fix Sonar issues about finalize() usage
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1575501 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a128bcd5e2
commit
8c5115aeb1
@ -19,16 +19,16 @@
|
|||||||
package org.apache.poi.hssf.usermodel;
|
package org.apache.poi.hssf.usermodel;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.awt.font.FontRenderContext;
|
||||||
|
import java.awt.font.GlyphVector;
|
||||||
import java.awt.geom.AffineTransform;
|
import java.awt.geom.AffineTransform;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.awt.image.BufferedImageOp;
|
import java.awt.image.BufferedImageOp;
|
||||||
import java.awt.image.ImageObserver;
|
import java.awt.image.ImageObserver;
|
||||||
import java.awt.image.RenderedImage;
|
import java.awt.image.RenderedImage;
|
||||||
import java.awt.image.renderable.RenderableImage;
|
import java.awt.image.renderable.RenderableImage;
|
||||||
import java.awt.font.GlyphVector;
|
|
||||||
import java.awt.font.FontRenderContext;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.text.AttributedCharacterIterator;
|
import java.text.AttributedCharacterIterator;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class DummyGraphics2d
|
public class DummyGraphics2d
|
||||||
extends Graphics2D
|
extends Graphics2D
|
||||||
@ -675,6 +675,8 @@ public class DummyGraphics2d
|
|||||||
public void finalize() {
|
public void finalize() {
|
||||||
System.out.println( "finalize():" );
|
System.out.println( "finalize():" );
|
||||||
g2D.finalize();
|
g2D.finalize();
|
||||||
|
|
||||||
|
super.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Shape getClip()
|
public Shape getClip()
|
||||||
|
@ -127,6 +127,8 @@ public class SheetDataWriter {
|
|||||||
@Override
|
@Override
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
_fd.delete();
|
_fd.delete();
|
||||||
|
|
||||||
|
super.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user