We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ea7e61 commit e73c6b6Copy full SHA for e73c6b6
pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java
@@ -17,6 +17,7 @@
17
import java.io.IOException;
18
import java.io.InputStream;
19
import java.io.OutputStream;
20
+import java.nio.file.Files;
21
22
/**
23
* Wrapper around a length-limited InputStream.
@@ -51,7 +52,7 @@ public StreamWrapper(InputStream stream) throws PSQLException {
51
52
53
if (memoryLength == -1) {
54
final int diskLength;
- final File tempFile = File.createTempFile(TEMP_FILE_PREFIX, null);
55
+ final File tempFile = Files.createTempFile(TEMP_FILE_PREFIX, null).toFile();
56
FileOutputStream diskOutputStream = new FileOutputStream(tempFile);
57
diskOutputStream.write(rawData);
58
try {
0 commit comments