This commit is contained in:
Alexey Kudravtsev
2013-02-26 14:33:11 +04:00
parent f8427d0336
commit 3f4bc3351f
2 changed files with 6 additions and 6 deletions
@@ -34,7 +34,7 @@ public abstract class JarFileSystem extends NewVirtualFileSystem implements JarC
@Nullable
public abstract VirtualFile getVirtualFileForJar(@Nullable VirtualFile entryVFile);
@Nullable
public abstract JarFile getJarFile(VirtualFile entryVFile) throws IOException;
public abstract JarFile getJarFile(@NotNull VirtualFile entryVFile) throws IOException;
@SuppressWarnings("MethodMayBeStatic")
@Nullable
@@ -110,7 +110,7 @@ public class JarFileSystemImpl extends JarFileSystem implements ApplicationCompo
}
@Nullable
private VirtualFile markDirty(final String path) {
private VirtualFile markDirty(@NotNull String path) {
final JarHandler handler;
synchronized (LOCK) {
handler = myHandlers.remove(path);
@@ -162,20 +162,20 @@ public class JarFileSystemImpl extends JarFileSystem implements ApplicationCompo
}
@Override
public JarFile getJarFile(VirtualFile entryVFile) throws IOException {
public JarFile getJarFile(@NotNull VirtualFile entryVFile) throws IOException {
JarHandler handler = getHandler(entryVFile);
return handler.getJar();
}
@Nullable
public File getMirroredFile(VirtualFile vFile) {
public File getMirroredFile(@NotNull VirtualFile vFile) {
VirtualFile jar = getJarRootForLocalFile(vFile);
final JarHandler handler = jar != null ? getHandler(jar) : null;
return handler != null ? handler.getMirrorFile(new File(vFile.getPath())) : null;
}
private JarHandler getHandler(final VirtualFile entryVFile) {
private JarHandler getHandler(@NotNull VirtualFile entryVFile) {
final String jarRootPath = extractRootPath(entryVFile.getPath());
JarHandler handler;
@@ -260,7 +260,7 @@ public class JarFileSystemImpl extends JarFileSystem implements ApplicationCompo
throw new IOException("Read-only: "+file.getPresentableUrl());
}
public boolean isMakeCopyOfJar(File originalJar) {
public boolean isMakeCopyOfJar(@NotNull File originalJar) {
if (myNoCopyJarPaths == null || myNoCopyJarPaths.contains(originalJar.getPath())) return false;
if (myNoCopyJarDir != null && FileUtil.isAncestor(myNoCopyJarDir, originalJar, false)) return false;
return true;