diff options
Diffstat (limited to 'platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/FilePathChangesTreeList.java')
-rw-r--r-- | platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/FilePathChangesTreeList.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/FilePathChangesTreeList.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/FilePathChangesTreeList.java index fe9c12036596..ee3390390f06 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/FilePathChangesTreeList.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/FilePathChangesTreeList.java @@ -24,13 +24,11 @@ import javax.swing.tree.DefaultTreeModel; import java.util.List; public class FilePathChangesTreeList extends ChangesTreeList<FilePath> { - private final Project myProject; public FilePathChangesTreeList(@NotNull Project project, @NotNull List<FilePath> originalFiles, boolean showCheckboxes, boolean highlightProblems, @Nullable Runnable inclusionListener, @Nullable ChangeNodeDecorator nodeDecorator) { super(project, originalFiles, showCheckboxes, highlightProblems, inclusionListener, nodeDecorator); - myProject = project; } protected DefaultTreeModel buildTreeModel(final List<FilePath> changes, ChangeNodeDecorator changeNodeDecorator) { @@ -43,10 +41,7 @@ public class FilePathChangesTreeList extends ChangesTreeList<FilePath> { @Nullable protected FilePath getLeadSelectedObject(final ChangesBrowserNode node) { - final Object userObject = node.getUserObject(); - if (userObject instanceof FilePath) { - return (FilePath) userObject; - } - return null; + Object userObject = node.getUserObject(); + return userObject instanceof FilePath ? (FilePath)userObject : null; } } |