diff options
Diffstat (limited to 'src/java/org/apache/fop/apps/io/ResourceResolverFactory.java')
-rw-r--r-- | src/java/org/apache/fop/apps/io/ResourceResolverFactory.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/apps/io/ResourceResolverFactory.java b/src/java/org/apache/fop/apps/io/ResourceResolverFactory.java index 881db20f7..2c8300fb9 100644 --- a/src/java/org/apache/fop/apps/io/ResourceResolverFactory.java +++ b/src/java/org/apache/fop/apps/io/ResourceResolverFactory.java @@ -156,8 +156,11 @@ public final class ResourceResolverFactory { public OutputStream getOutputStream(String id) throws IOException { File file = getTempFile(id); - file.createNewFile(); - return new FileOutputStream(file); + if (file.createNewFile()) { + return new FileOutputStream(file); + } else { + throw new IOException("Filed to create temporary file: " + id); + } } } |