git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@426173 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -250,12 +250,16 @@ Fixed bugs: | |||||
| * <get> would fetch files that were up to date, because it used > in a | * <get> would fetch files that were up to date, because it used > in a | ||||
| remote/local timestamp comparison, not >=. Bugzilla 35607. | remote/local timestamp comparison, not >=. Bugzilla 35607. | ||||
| * <xslt> passes the current file (name + directory) to the stylesheet/transformation. | * <xslt> passes the current file (name + directory) to the stylesheet/transformation. | ||||
| xsl-parameter name is configurable. Bugzilla report 21042. | xsl-parameter name is configurable. Bugzilla report 21042. | ||||
| Other changes: | Other changes: | ||||
| -------------- | -------------- | ||||
| * InputHandler implementations may now call InputRequest.getDefaultValue() | |||||
| if they wish. | |||||
| * Took in bugzilla report 39320. | * Took in bugzilla report 39320. | ||||
| * Improve compatibility with GNU Classpath and java versions prior to 1.5. Bugzilla 39027. | * Improve compatibility with GNU Classpath and java versions prior to 1.5. Bugzilla 39027. | ||||
| @@ -25,6 +25,7 @@ package org.apache.tools.ant.input; | |||||
| public class InputRequest { | public class InputRequest { | ||||
| private String prompt; | private String prompt; | ||||
| private String input; | private String input; | ||||
| private String defaultValue; | |||||
| /** | /** | ||||
| * Construct an InputRequest. | * Construct an InputRequest. | ||||
| @@ -70,4 +71,20 @@ public class InputRequest { | |||||
| return input; | return input; | ||||
| } | } | ||||
| /** | |||||
| * Gets a configured default value. | |||||
| * @since Ant 1.7.0 | |||||
| */ | |||||
| public String getDefaultValue() { | |||||
| return defaultValue; | |||||
| } | |||||
| /** | |||||
| * Configures a default value. | |||||
| * @since Ant 1.7.0 | |||||
| */ | |||||
| public void setDefaultValue(String d) { | |||||
| defaultValue = d; | |||||
| } | |||||
| } | } | ||||
| @@ -221,6 +221,7 @@ public class Input extends Task { | |||||
| } else { | } else { | ||||
| request = new InputRequest(message); | request = new InputRequest(message); | ||||
| } | } | ||||
| request.setDefaultValue(defaultvalue); | |||||
| InputHandler h = handler == null | InputHandler h = handler == null | ||||
| ? getProject().getInputHandler() | ? getProject().getInputHandler() | ||||