This commit is contained in:
Vladimir Krivosheev
2016-09-19 16:48:09 +02:00
parent 2bfa7d048c
commit 5365d2fa43
2 changed files with 4 additions and 10 deletions
@@ -30,10 +30,10 @@ import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.newvfs.impl.NullVirtualFile;
import com.intellij.util.PathUtilRt;
import com.intellij.util.PatternUtil;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.util.regex.Matcher;
public class IgnoredFileBean {
@@ -48,12 +48,7 @@ public class IgnoredFileBean {
IgnoredFileBean(String path, IgnoreSettingsType type, Project project) {
myPath = path;
myType = type;
if (IgnoreSettingsType.FILE.equals(type)) {
myFilenameIfFile = new File(path).getName();
}
else {
myFilenameIfFile = null;
}
myFilenameIfFile = IgnoreSettingsType.FILE.equals(type) ? PathUtilRt.getFileName(path) : null;
myProject = project;
myMask = null;
myMatcher = null;
@@ -17,7 +17,6 @@ package com.intellij.openapi.vcs.changes;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.openapi.util.text.StringUtil;
import org.jdom.Element;
@@ -54,7 +53,7 @@ class ChangeListManagerSerialization {
}
@SuppressWarnings({"unchecked"})
public void readExternal(final Element element) throws InvalidDataException {
public void readExternal(final Element element) {
final List<Element> listNodes = element.getChildren(NODE_LIST);
for (Element listNode : listNodes) {
readChangeList(listNode);
@@ -135,7 +134,7 @@ class ChangeListManagerSerialization {
listNode.setAttribute(ATT_COMMENT, comment);
}
List<Change> changes = new ArrayList<>(list.getChanges());
Collections.sort(changes, new ChangeComparator());
changes.sort(new ChangeComparator());
for (Change change : changes) {
writeChange(listNode, change);
}