mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2010 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -305,7 +305,7 @@ public class ArtifactsCompilerInstance extends GenericCompilerInstance<ArtifactB
|
||||
}
|
||||
|
||||
private static THashSet<String> createPathsHashSet() {
|
||||
return new THashSet<String>(FileUtil.T_HASHING_STRATEGY);
|
||||
return new THashSet<String>(FileUtil.PATH_HASHING_STRATEGY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.intellij.openapi.util.io;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
@@ -35,6 +34,7 @@ import org.intellij.lang.annotations.RegExp;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.util.rt.FileUtilRt;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -45,8 +45,21 @@ import java.util.regex.Pattern;
|
||||
@SuppressWarnings({"UtilityClassWithoutPrivateConstructor"})
|
||||
public class FileUtil extends FileUtilLight {
|
||||
public static final int MEGABYTE = 1024 * 1024;
|
||||
|
||||
@NonNls public static final String ASYNC_DELETE_EXTENSION = ".__del__";
|
||||
|
||||
public static final TObjectHashingStrategy<String> PATH_HASHING_STRATEGY;
|
||||
static {
|
||||
if (SystemInfo.isFileSystemCaseSensitive) {
|
||||
@SuppressWarnings({"unchecked", "UnnecessaryLocalVariable"})
|
||||
final TObjectHashingStrategy<String> canonical = TObjectHashingStrategy.CANONICAL;
|
||||
PATH_HASHING_STRATEGY = canonical;
|
||||
}
|
||||
else {
|
||||
PATH_HASHING_STRATEGY = CaseInsensitiveStringHashingStrategy.INSTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.util.io.FileUtil");
|
||||
|
||||
private static final ThreadLocal<byte[]> BUFFER = new ThreadLocal<byte[]>() {
|
||||
@@ -57,13 +70,11 @@ public class FileUtil extends FileUtilLight {
|
||||
|
||||
// do not use channels to copy files larger than 5 Mb because of possible MapFailed error
|
||||
private static final long CHANNELS_COPYING_LIMIT = 5L * MEGABYTE;
|
||||
private static final int MAX_FILE_DELETE_ATTEMPTS = 10;
|
||||
public static final Method JAVA_IO_FILESYSTEM_GET_BOOLEAN_ATTRIBUTES_METHOD;
|
||||
public static final Object/* java.io.FileSystem */ JAVA_IO_FILESYSTEM;
|
||||
|
||||
public static final TObjectHashingStrategy<String> T_HASHING_STRATEGY = SystemInfo.isFileSystemCaseSensitive
|
||||
? TObjectHashingStrategy.CANONICAL
|
||||
: CaseInsensitiveStringHashingStrategy.INSTANCE;
|
||||
private static final int MAX_FILE_DELETE_ATTEMPTS = 10;
|
||||
|
||||
private static final Method JAVA_IO_FILESYSTEM_GET_BOOLEAN_ATTRIBUTES_METHOD;
|
||||
private static final Object JAVA_IO_FILESYSTEM; // java.io.FileSystem
|
||||
|
||||
@Nullable
|
||||
public static String getRelativePath(File base, File file) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -96,7 +96,7 @@ public class MavenResourceCompiler implements ClassPostProcessingCompiler {
|
||||
}
|
||||
|
||||
private static Set<String> createPathsSet() {
|
||||
return new THashSet<String>(FileUtil.T_HASHING_STRATEGY);
|
||||
return new THashSet<String>(FileUtil.PATH_HASHING_STRATEGY);
|
||||
}
|
||||
|
||||
private void saveCache(final Project project) {
|
||||
|
||||
Reference in New Issue
Block a user