Cleanup and deprecate old git executable validation

This commit is contained in:
Ivan Semenov
2018-01-31 14:01:05 +03:00
parent df708121ca
commit a26b451c2d
2 changed files with 3 additions and 14 deletions
@@ -410,6 +410,7 @@ public class GitVcs extends AbstractVcs<CommittedChangeList> {
: Collections.emptyList();
}
@Deprecated
@NotNull
public GitExecutableValidator getExecutableValidator() {
return myExecutableValidator;
@@ -32,7 +32,9 @@ import java.util.Map;
* and to display notification to the user proposing to fix the project set up.
*
* @author Kirill Likhodedov
* @deprecated in favor of {@link GitExecutableManager#identifyVersion(String)} and {@link GitExecutableProblemsNotifier}
*/
@Deprecated
public class GitExecutableValidator extends ExecutableValidator {
public GitExecutableValidator(@NotNull Project project) {
@@ -54,18 +56,4 @@ public class GitExecutableValidator extends ExecutableValidator {
public boolean isExecutableValid(@NotNull String executable) {
return doCheckExecutable(executable, Collections.singletonList("--version"), GitHandler.getGitTraceEnvironmentVariables());
}
/**
* Checks if git executable is valid. If not (which is a common case for low-level vcs exceptions), shows the
* notification. Otherwise throws the exception.
* This is to be used in catch-clauses
*
* @param e exception which was thrown.
* @throws VcsException if git executable is valid.
*/
public void showNotificationOrThrow(VcsException e) throws VcsException {
if (checkExecutableAndNotifyIfNeeded()) {
throw e;
}
}
}