From db8bc76cbeac7ea6bc3c4b59f455e767073190e4 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 9 Jun 2005 13:15:06 +0000 Subject: [PATCH] Safer creation of the new target File instance. outputDir can be null with relative paths. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198731 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/render/bitmap/PNGRenderer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/render/bitmap/PNGRenderer.java b/src/java/org/apache/fop/render/bitmap/PNGRenderer.java index 28824e9ea..3c824e0cb 100644 --- a/src/java/org/apache/fop/render/bitmap/PNGRenderer.java +++ b/src/java/org/apache/fop/render/bitmap/PNGRenderer.java @@ -125,8 +125,8 @@ public class PNGRenderer extends Java2DRenderer { if (filePrefix == null) { return null; } else { - File f = new File(outputDir + File.separator + filePrefix - + (pageNumber + 1) + ".png"); + File f = new File(outputDir, + filePrefix + (pageNumber + 1) + ".png"); try { OutputStream os = new BufferedOutputStream(new FileOutputStream(f)); return os; -- 2.39.5