diff --git a/src/de/uni_passau/fim/seibt/gitwrapper/process/ProcessExecutor.java b/src/de/uni_passau/fim/seibt/gitwrapper/process/ProcessExecutor.java index a4b78c1854e919326993cb76e1b33977ff7059a2..eff1f7fa1982157253dd92fe05118be19ea524b0 100644 --- a/src/de/uni_passau/fim/seibt/gitwrapper/process/ProcessExecutor.java +++ b/src/de/uni_passau/fim/seibt/gitwrapper/process/ProcessExecutor.java @@ -6,7 +6,7 @@ public class ProcessExecutor { * The result of a command line execution. */ public static class ExecRes { - public int code; + public int exitCode; public String output; } } diff --git a/src/de/uni_passau/fim/seibt/gitwrapper/repo/GitWrapper.java b/src/de/uni_passau/fim/seibt/gitwrapper/repo/GitWrapper.java index bdd07929fbc070c90983dc914b2aba05f6866a57..bf57484f4aae1f523139d1d7224136b2769134a0 100644 --- a/src/de/uni_passau/fim/seibt/gitwrapper/repo/GitWrapper.java +++ b/src/de/uni_passau/fim/seibt/gitwrapper/repo/GitWrapper.java @@ -63,7 +63,7 @@ public class GitWrapper { String firstLine = sc.nextLine(); Matcher matcher; - if (execRes.code == EXIT_SUCCESS) { + if (execRes.exitCode == EXIT_SUCCESS) { matcher = CLONING_INTO.matcher(firstLine); } else { matcher = ALREADY_EXISTS.matcher(firstLine); @@ -78,7 +78,7 @@ public class GitWrapper { File repoDir = new File(parentDir, name); String repoPath = repoDir.getAbsolutePath(); - if (execRes.code == EXIT_SUCCESS) { + if (execRes.exitCode == EXIT_SUCCESS) { LOG.fine(() -> String.format("Cloned '%s' into '%s'.", url, repoPath)); } else { LOG.fine(() -> String.format("Found '%s' which would be produced for '%s'", repoPath, url)); @@ -112,7 +112,7 @@ public class GitWrapper { } Optional<ExecRes> status = exec(directory, "rev-parse", "--is-inside-git-dir"); - return status.map(res -> res.code == EXIT_SUCCESS).orElse(false); + return status.map(res -> res.exitCode == EXIT_SUCCESS).orElse(false); } /** @@ -145,9 +145,9 @@ public class GitWrapper { Process p = b.start(); res.output = IOUtils.toString(p.getInputStream()); - res.code = p.waitFor(); + res.exitCode = p.waitFor(); - LOG.fine(() -> String.format("Execution of '%s' returned exit code %d.", cmd, res.code)); + LOG.fine(() -> String.format("Execution of '%s' returned exit code %d.", cmd, res.exitCode)); LOG.finest(() -> String.format("Execution of '%s' output:%n%s", cmd, res.output)); return Optional.of(res);