Birt temporary files now marked as deleteOnExit()
authorAlex Kirhenshtein <alk@netxms.org>
Wed, 20 Jul 2016 08:53:08 +0000 (11:53 +0300)
committerAlex Kirhenshtein <alk@netxms.org>
Wed, 20 Jul 2016 08:53:08 +0000 (11:53 +0300)
webui/webapp/Charts/src/org/netxms/ui/eclipse/charts/widgets/GenericBirtChart.java

index a628c91..6e41362 100644 (file)
@@ -181,6 +181,7 @@ public abstract class GenericBirtChart extends GenericChart implements PaintList
                        try
                        {
                                File tmpFile = File.createTempFile("birt_" + hashCode(), "_" + clientArea.width + "_" + clientArea.height);
                        try
                        {
                                File tmpFile = File.createTempFile("birt_" + hashCode(), "_" + clientArea.width + "_" + clientArea.height);
+                               tmpFile.deleteOnExit();
 
                                deviceRenderer.setProperty(IDeviceRenderer.FILE_IDENTIFIER, tmpFile);
                                final Bounds bounds = BoundsImpl.create(0, 0, clientArea.width, clientArea.height);
 
                                deviceRenderer.setProperty(IDeviceRenderer.FILE_IDENTIFIER, tmpFile);
                                final Bounds bounds = BoundsImpl.create(0, 0, clientArea.width, clientArea.height);