Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f8edf85

Browse files
GitCommander: tempOutputFile.deleteOnExit();
1 parent 54f30b3 commit f8edf85

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

‎src/main/java/com/symplegit/api/GitCommander.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
if (gitCommander.isResponseOk()) {
8080
System.out.println("Active Branch: " + gitCommander.getProcessOutput());
8181
}
82+
else {
83+
String error = gitCommander.getProcessError();
84+
System.out.println("Could not get the active branch: " + error);
85+
}
8286
}
8387
* </code>
8488
* </pre>
@@ -208,7 +212,7 @@ private void createOutputTempFile() throws IOException, FileNotFoundException {
208212
debug("After tempOutputFile creation");
209213

210214
// Optionally, delete the file when the JVM exits
211-
// tempOutputFile.deleteOnExit();
215+
tempOutputFile.deleteOnExit();
212216
}
213217

214218
private void stopProcess() {

‎src/main/java/com/symplegit/api/SympleGit.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ void addTempFile(File tempFile) {
211211

212212
/**
213213
* Deletes all temporary files. Should be done to to relieve java.io.tmpdir.
214+
* <br>
215+
* Temporary files are always deleted when the application is closed. <br>
214216
*/
215217
@Override
216218
public void close() throws Exception {

‎src/main/java/com/symplegit/util/version/VersionValues.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525

2626
public class VersionValues {
2727
public static final String VERSION = "v1.0";
28-
public static final String DATE = "17-Jan-2024";
28+
public static final String DATE = "18-Jan-2024";
2929
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /