From 6fb3b95ceaa9fa6e080350dd01ca288418017e60 Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Tue, 28 May 2019 15:11:53 +0300 Subject: [PATCH] shelf: cleanup - remove deprecated API usages GitOrigin-RevId: f7a0f3ba91b1009beb5799e1faeb5cce30252592 --- .../com/intellij/openapi/vcs/changes/shelf/ShelvedChange.java | 2 +- .../intellij/openapi/vcs/changes/shelf/ShelvedWrapper.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChange.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChange.java index d8707a3bf8f5..f4aecec8773d 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChange.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChange.java @@ -89,7 +89,7 @@ public class ShelvedChange { public Change getChange(@NotNull Project project) { // todo unify with if (myChange == null) { - File baseDir = new File(project.getBaseDir().getPath()); + File baseDir = new File(Objects.requireNonNull(project.getBasePath())); File file = getAbsolutePath(baseDir, myBeforePath); FilePath beforePath = VcsUtil.getFilePath(file, false); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedWrapper.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedWrapper.java index d6661406be0a..5a5602075beb 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedWrapper.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedWrapper.java @@ -75,8 +75,8 @@ class ShelvedWrapper { @Nullable public VirtualFile getBeforeVFUnderProject(@NotNull final Project project) { - if (getBeforePath() == null || project.getBaseDir() == null) return null; - final File baseDir = new File(project.getBaseDir().getPath()); + if (getBeforePath() == null || project.getBasePath() == null) return null; + final File baseDir = new File(project.getBasePath()); final File file = new File(baseDir, getBeforePath()); return LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file); }