Skip to content

Commit

Permalink
consultingwerk#57 Use unique name for listing file to allow running o…
Browse files Browse the repository at this point in the history
…f several processes in same time.
  • Loading branch information
Daniel Baciu committed Oct 7, 2021
1 parent 51d8657 commit 0126c5e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.number
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Tue Aug 03 15:26:44 CEST 2021
build.number=1225
#Thu Oct 07 13:06:02 EEST 2021
build.number=1226
Binary file modified proparse.assemblies.zip
Binary file not shown.
Binary file modified proparse.jar
Binary file not shown.
Binary file modified proparse.java.zip
Binary file not shown.
18 changes: 15 additions & 3 deletions src/org/prorefactor/refactor/RefactorSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ private RefactorSession() {

private static RefactorSession theInstance;

private static String listingFile = null;



Expand Down Expand Up @@ -127,9 +128,20 @@ public static RefactorSession getInstance() {

/** Get the listing file name, makes sure the directory exists. */
public static String getListingFileName() {
String ret = getContextDirName() + "prorefactor/temp/listingfile.txt";
(new File(ret)).getParentFile().mkdirs();
return ret;

if (listingFile!=null )
return listingFile;

StringBuilder bldr = new StringBuilder();
bldr
.append(getContextDirName())
.append("prorefactor/temp/listingfile.")
.append(System.currentTimeMillis())
.append(".txt")
;
listingFile = bldr.toString();
(new File(listingFile)).getParentFile().mkdirs();
return listingFile;
}

public static String getMessagesFileName() {
Expand Down

0 comments on commit 0126c5e

Please sign in to comment.