File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
fop-core/src/main/java/org/apache/fop Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 2626import java .io .OutputStream ;
2727import java .net .MalformedURLException ;
2828import java .net .URI ;
29+ import java .nio .file .Files ;
2930import java .util .Collections ;
3031import java .util .HashMap ;
3132import java .util .Map ;
@@ -176,7 +177,7 @@ private File getTempFile(String uri) throws IllegalStateException {
176177 }
177178
178179 private File createTempFile (String path ) throws IOException {
179- File tempFile = File .createTempFile (path , ".fop.tmp" );
180+ File tempFile = Files .createTempFile (path , ".fop.tmp" ). toFile ( );
180181 File oldFile = tempFiles .put (path , tempFile );
181182 if (oldFile != null ) {
182183 String errorMsg = oldFile .getAbsolutePath () + " has been already created for " + path ;
Original file line number Diff line number Diff line change 2323import java .io .IOException ;
2424import java .io .InputStream ;
2525import java .io .OutputStream ;
26+ import java .nio .file .Files ;
2627
2728import org .apache .commons .io .IOUtils ;
2829
@@ -47,8 +48,8 @@ public class TempFileStreamCache implements StreamCache {
4748 * @throws IOException if there is an IO error
4849 */
4950 public TempFileStreamCache () throws IOException {
50- tempFile = File .createTempFile ("org.apache.fop.pdf.StreamCache-" ,
51- ".temp" );
51+ tempFile = Files .createTempFile ("org.apache.fop.pdf.StreamCache-" ,
52+ ".temp" ). toFile () ;
5253 tempFile .deleteOnExit ();
5354 }
5455
You can’t perform that action at this time.
0 commit comments