From aa676895d2ca226622ff5216d9e4f6cf673a36a5 Mon Sep 17 00:00:00 2001 From: Gesa HENTSCHKE Date: Tue, 30 Jul 2024 12:22:35 +0200 Subject: [PATCH] [#1045] replace removed FileUtil.transferStreams with transferTo method. fixes #1045 --- org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java index 17a96dd65..9a97054d9 100644 --- a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java +++ b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java @@ -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; @@ -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) {