Untie FileUtil from registry

This commit is contained in:
Roman Shevchenko
2012-07-09 20:41:35 +02:00
parent a2c36b2864
commit 966fa7be62
2 changed files with 3 additions and 3 deletions
@@ -136,7 +136,6 @@ debugger.breakpoint.message.full.trace.description='Log message to console' brea
debugger.breakpoint.use.breakpoints.popup=true
filesystem.useNative=true
filesystem.useChannels=false
analyze.exceptions.on.the.fly=false
# suppress inspection "UnusedProperty"
@@ -18,7 +18,6 @@ package com.intellij.openapi.util.io;
import com.intellij.CommonBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.ArrayUtil;
import com.intellij.util.ObjectUtils;
@@ -73,6 +72,8 @@ public class FileUtil extends FileUtilRt {
private static final int MAX_FILE_DELETE_ATTEMPTS = 10;
private static final boolean USE_FILE_CHANNELS = SystemProperties.getBooleanProperty("idea.fs.useChannels", false);
@NotNull
public static String join(@NotNull final String... parts) {
return StringUtil.join(parts, File.separator);
@@ -504,7 +505,7 @@ public class FileUtil extends FileUtilRt {
}
public static void copy(@NotNull InputStream inputStream, @NotNull OutputStream outputStream) throws IOException {
if (Registry.is("filesystem.useChannels") && inputStream instanceof FileInputStream && outputStream instanceof FileOutputStream) {
if (USE_FILE_CHANNELS && inputStream instanceof FileInputStream && outputStream instanceof FileOutputStream) {
final FileChannel fromChannel = ((FileInputStream)inputStream).getChannel();
try {
final FileChannel toChannel = ((FileOutputStream)outputStream).getChannel();