From 2e517c5603851661baf805654084bc48be9eaeeb Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Tue, 22 Apr 2014 13:26:13 +0400 Subject: [PATCH] IDEA-112050 vcs: fix ByteBuffer to array conversion --- .../intellij/openapi/vcs/vfs/ContentRevisionVirtualFile.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/vfs/ContentRevisionVirtualFile.java b/platform/vcs-api/src/com/intellij/openapi/vcs/vfs/ContentRevisionVirtualFile.java index 6f5a84881cbd..71626fa32e61 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/vfs/ContentRevisionVirtualFile.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/vfs/ContentRevisionVirtualFile.java @@ -84,8 +84,7 @@ public class ContentRevisionVirtualFile extends AbstractVcsVirtualFile { myModificationStamp++; setRevision(myContentRevision.getRevisionNumber().asString()); - final ByteBuffer byteBuffer = getCharset().encode(content); - myContent = byteBuffer.compact().array(); + myContent = content.getBytes(getCharset()); ApplicationManager.getApplication().runWriteAction(new Runnable() { public void run() { vcsFileSystem.fireContentsChanged(this, ContentRevisionVirtualFile.this, 0);