You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2003/02/28 03:23:28 UTC
DO NOT REPLY [Bug 17512] New: -
Quitting javac task with CTRL-C can leave temporary files
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17512>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17512
Quitting javac task with CTRL-C can leave temporary files
Summary: Quitting javac task with CTRL-C can leave temporary
files
Product: Ant
Version: 1.6Alpha (nightly)
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Core
AssignedTo: dev@ant.apache.org
ReportedBy: marc@kenamea.com
When compiling a large number of classes at once, it appears that when
Ant is configured to use jikes it will create a temporary file called
"filexxxx" or "file-xxxx" where xxxx is some random number. The
temporary file contains a list of all the java files being compiled. It
then removes this file when the jikes is complete. However, if the
compile is interrupted (such as hitting CTRL-C when a long list of
compile errors is being spewed back), it will fail to delete the
temporary file. If I switch the compiler to "javac" it doesn't appear
to create any temporary file.
I have created a fix for this based on the current CVS code. This fix includes
a new method to FileUtils called deleteOnExit(...) which uses reflection to
determine if JDK1.2+ is being used and if so, calls File.deleteOnExit() on the
file passed in as a parameter. The patch calls this new method in the
DefaultCompilerAdapter class when a temporary file is created. The patch seems
to get rid of this problem.