From 1b2e011470a5bb20ab12c0c8637ea53f786cb982 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Thu, 19 Apr 2012 13:11:35 +0400 Subject: [PATCH] notnull --- .../src/com/intellij/openapi/vfs/VirtualFile.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/core-api/src/com/intellij/openapi/vfs/VirtualFile.java b/platform/core-api/src/com/intellij/openapi/vfs/VirtualFile.java index 202d0476bf57..6ff4f2cd9a2d 100644 --- a/platform/core-api/src/com/intellij/openapi/vfs/VirtualFile.java +++ b/platform/core-api/src/com/intellij/openapi/vfs/VirtualFile.java @@ -316,7 +316,7 @@ public abstract class VirtualFile extends UserDataHolderBase implements Modifica */ @Nullable public VirtualFile findFileByRelativePath(@NotNull @NonNls String relPath) { - if (relPath.length() == 0) return this; + if (relPath.isEmpty()) return this; relPath = StringUtil.trimStart(relPath, "/"); int index = relPath.indexOf('/'); @@ -498,15 +498,15 @@ public abstract class VirtualFile extends UserDataHolderBase implements Modifica return getUserData(CHARSET_KEY) != null; } - public final void setBinaryContent(byte[] content) throws IOException { + public final void setBinaryContent(@NotNull byte[] content) throws IOException { setBinaryContent(content, -1, -1); } - public void setBinaryContent(final byte[] content, long newModificationStamp, long newTimeStamp) throws IOException { + public void setBinaryContent(@NotNull byte[] content, long newModificationStamp, long newTimeStamp) throws IOException { setBinaryContent(content, newModificationStamp, newTimeStamp, this); } - public void setBinaryContent(final byte[] content, long newModificationStamp, long newTimeStamp, Object requestor) throws IOException { + public void setBinaryContent(@NotNull byte[] content, long newModificationStamp, long newTimeStamp, Object requestor) throws IOException { OutputStream outputStream = null; try { outputStream = getOutputStream(requestor, newModificationStamp, newTimeStamp);