Skip to content

Commit e73c6b6

Browse files
authored
backpatch changes to 42.3.x for 42.5.1 (#2674)
1 parent 3ea7e61 commit e73c6b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import java.io.IOException;
1818
import java.io.InputStream;
1919
import java.io.OutputStream;
20+
import java.nio.file.Files;
2021

2122
/**
2223
* Wrapper around a length-limited InputStream.
@@ -51,7 +52,7 @@ public StreamWrapper(InputStream stream) throws PSQLException {
5152

5253
if (memoryLength == -1) {
5354
final int diskLength;
54-
final File tempFile = File.createTempFile(TEMP_FILE_PREFIX, null);
55+
final File tempFile = Files.createTempFile(TEMP_FILE_PREFIX, null).toFile();
5556
FileOutputStream diskOutputStream = new FileOutputStream(tempFile);
5657
diskOutputStream.write(rawData);
5758
try {

0 commit comments

Comments
 (0)