Hi ant-dev.
Attached is essentially a diff -u version of the code in the bug
description, except it checks for Java versions that don't support
-g:none. Comments are welcome, as it's my first patch submission.
Peter Janes
--
fix, n., v. What one does when a problem has been reported too many
times to be ignored.
--The New Hacker's Dictionary, 3rd ed.
Index:
src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
retrieving revision 1.3
diff -u -r1.3 DefaultCompilerAdapter.java
---
src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
2001/03/09 16:07:56 1.3
+++
src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
2001/03/28 05:52:50
@@ -244,6 +244,10 @@
if (debug) {
cmd.createArgument().setValue("-g");
}
+ else if (Project.getJavaVersion() != Project.JAVA_1_0 &&
+ Project.getJavaVersion() != Project.JAVA_1_1) {
+ cmd.createArgument().setValue("-g:none");
+ }
if (optimize) {
cmd.createArgument().setValue("-O");
}