git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277727 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -337,6 +337,9 @@ Fixed bugs: | |||||
| * NPE when when <presetdef> tries to configure a task that | * NPE when when <presetdef> tries to configure a task that | ||||
| cannot be instantiated. Bugzilla Report 33689. | cannot be instantiated. Bugzilla Report 33689. | ||||
| * <javac debug="false"> created an invalid command line when running | |||||
| the Symantec Java compiler. | |||||
| Changes from Ant 1.6.1 to Ant 1.6.2 | Changes from Ant 1.6.1 to Ant 1.6.2 | ||||
| =================================== | =================================== | ||||
| @@ -276,8 +276,8 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter { | |||||
| } else { | } else { | ||||
| cmd.createArgument().setValue("-g"); | cmd.createArgument().setValue("-g"); | ||||
| } | } | ||||
| } else if (!assumeJava11()) { | |||||
| cmd.createArgument().setValue("-g:none"); | |||||
| } else if (getNoDebugArgument() != null) { | |||||
| cmd.createArgument().setValue(getNoDebugArgument()); | |||||
| } | } | ||||
| if (optimize) { | if (optimize) { | ||||
| cmd.createArgument().setValue("-O"); | cmd.createArgument().setValue("-O"); | ||||
| @@ -608,5 +608,19 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter { | |||||
| } | } | ||||
| return bp.concatSystemBootClasspath("ignore"); | return bp.concatSystemBootClasspath("ignore"); | ||||
| } | } | ||||
| /** | |||||
| * The argument the compiler wants to see if the debug attribute | |||||
| * has been set to false. | |||||
| * | |||||
| * <p>A return value of <code>null</code> means no argument at all.</p> | |||||
| * | |||||
| * @return "-g:none" unless we expect to invoke a JDK 1.1 compiler. | |||||
| * | |||||
| * @since Ant 1.6.3 | |||||
| */ | |||||
| protected String getNoDebugArgument() { | |||||
| return assumeJava11() ? null : "-g:none"; | |||||
| } | |||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2001-2004 The Apache Software Foundation | |||||
| * Copyright 2001-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -45,6 +45,14 @@ public class Sj extends DefaultCompilerAdapter { | |||||
| executeExternalCompile(cmd.getCommandline(), firstFileName) == 0; | executeExternalCompile(cmd.getCommandline(), firstFileName) == 0; | ||||
| } | } | ||||
| /** | |||||
| * Returns null since sj either has -g for debug=true or no | |||||
| * argument at all. | |||||
| * | |||||
| * @since Ant 1.6.3 | |||||
| */ | |||||
| protected String getNoDebugArgument() { | |||||
| return null; | |||||
| } | |||||
| } | } | ||||