Skip to content

Commit

Permalink
[#1045] replace removed FileUtil.transferStreams
Browse files Browse the repository at this point in the history
with transferTo method.

fixes #1045
  • Loading branch information
ghentschke committed Jul 30, 2024
1 parent 091a7b1 commit aa67689
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
import org.eclipse.core.filesystem.IFileInfo;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.filesystem.IFileSystem;
import org.eclipse.core.internal.utils.FileUtil;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
Expand Down Expand Up @@ -1164,7 +1163,7 @@ private static CompositeChange toCompositeChange(WorkspaceEdit wsEdit, String na
if (oldFile != null && oldFile.exists()) {
try (var stream = new ByteArrayOutputStream((int) oldFile.getLocation().toFile().length());
InputStream inputStream = oldFile.getContents();) {
FileUtil.transferStreams(inputStream, stream, newURI.toString(), null);
inputStream.transferTo(stream);
content = new String(stream.toByteArray());
encoding = oldFile.getCharset();
} catch (IOException | CoreException e) {
Expand Down

0 comments on commit aa67689

Please sign in to comment.