code style: two subsequent ifs merged to reduce inner indent

This commit is contained in:
Sergey Simonchik
2013-08-26 16:11:44 +04:00
parent e0df7a301c
commit aa8832d523
@@ -116,14 +116,12 @@ public final class ScriptRunnerUtil {
@Nullable Charset charset) throws ExecutionException {
if (SystemInfo.isMac) {
File exeFile = new File(exePath);
if (!exeFile.isAbsolute()) {
if (!exePath.contains(File.separator)) {
File originalResolvedExeFile = PathEnvironmentVariableUtil.findInOriginalPath(exePath);
if (originalResolvedExeFile == null) {
File resolvedExeFile = PathEnvironmentVariableUtil.findInPath(exePath);
if (resolvedExeFile != null) {
exePath = resolvedExeFile.getAbsolutePath();
}
if (!exeFile.isAbsolute() && !exePath.contains(File.separator)) {
File originalResolvedExeFile = PathEnvironmentVariableUtil.findInOriginalPath(exePath);
if (originalResolvedExeFile == null) {
File resolvedExeFile = PathEnvironmentVariableUtil.findInPath(exePath);
if (resolvedExeFile != null) {
exePath = resolvedExeFile.getAbsolutePath();
}
}
}