ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 1011] New - <javac debug="false"> does not disable debug info generation
Date Sun, 18 Mar 2001 10:27:56 GMT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1011

*** shadow/1011	Sun Mar 18 02:27:56 2001
--- shadow/1011.tmp.46	Sun Mar 18 02:27:56 2001
***************
*** 0 ****
--- 1,31 ----
+ +============================================================================+
+ | <javac debug="false"> does not disable debug info generation               |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1011                        Product: Ant                     |
+ |       Status: NEW                         Version: 1.3                     |
+ |   Resolution:                            Platform: All                     |
+ |     Severity: Normal                   OS/Version: Linux                   |
+ |     Priority:                           Component: Core tasks              |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: ant-dev@jakarta.apache.org                                   |
+ |  Reported By: cspeter@rmki.kfki.hu                                         |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ <javac debug="false" ...> compiles files with debug info.
+ The explanation is that it calls javac without the -g option. Omitting -g works
+ in JDK 1.1 but not in JDK 1.2 and 1.3. In JDK 1.2-1.3, omitting -g is equivalent
+ to specifying "-g:lines,source". Debug info can be disabled using -g:none.
+ 
+ The bug is in this class:
+ org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
+         if (debug) {
+             cmd.createArgument().setValue("-g");
+         }
+ The correct implementation would be the following:
+         if (debug) {
+             cmd.createArgument().setValue("-g");
+         } else
+             cmd.createArgument().setValue("-g:none");

Mime
View raw message