Skip to content

Commit

Permalink
backpatch changes to 42.3.x for 42.5.1 (#2674)
Browse files Browse the repository at this point in the history
  • Loading branch information
davecramer committed Nov 23, 2022
1 parent 3ea7e61 commit e73c6b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;

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

if (memoryLength == -1) {
final int diskLength;
final File tempFile = File.createTempFile(TEMP_FILE_PREFIX, null);
final File tempFile = Files.createTempFile(TEMP_FILE_PREFIX, null).toFile();
FileOutputStream diskOutputStream = new FileOutputStream(tempFile);
diskOutputStream.write(rawData);
try {
Expand Down

0 comments on commit e73c6b6

Please sign in to comment.