Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit 81cabdc

Browse files
committed
Revert my prior changes.
1 parent 1f5bc6b commit 81cabdc

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
public class PropertiesBasedResumableProcessor implements ResumableAsyncHandler.ResumableProcessor {
3131
private final static Logger log = LoggerFactory.getLogger(PropertiesBasedResumableProcessor.class);
3232
private final static File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc");
33-
static {
34-
TMP.deleteOnExit();
35-
}
3633
private final static String storeName = "ResumableAsyncHandler.properties";
3734
private final ConcurrentHashMap<String, Long> properties = new ConcurrentHashMap<String, Long>();
3835

@@ -67,7 +64,6 @@ public void save(Map<String, Long> map) {
6764
throw new IllegalStateException("Unable to create directory: " + TMP.getAbsolutePath());
6865
}
6966
File f = new File(TMP, storeName);
70-
f.deleteOnExit();
7167
if (!f.createNewFile()) {
7268
throw new IllegalStateException("Unable to create temp file: " + f.getAbsolutePath());
7369
}
@@ -103,9 +99,7 @@ private static String append(Map.Entry<String, Long> e) {
10399
/* @Override */
104100
public Map<String, Long> load() {
105101
try {
106-
File f = new File(TMP, storeName);
107-
f.deleteOnExit();
108-
Scanner scan = new Scanner(f, "UTF-8");
102+
Scanner scan = new Scanner(new File(TMP, storeName), "UTF-8");
109103
scan.useDelimiter("[=\n]");
110104

111105
String key;

0 commit comments

Comments
 (0)