Bug 50400 - SecureHandler does not write to std err but to std out
Summary: SecureHandler does not write to std err but to std out
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.8.2
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2010-12-02 05:43 UTC by Michael Osipov
Modified: 2010-12-27 11:13 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2010-12-02 05:43:53 UTC
The secure input handles ouput looks like this:
Please enter the Tomcat Manager App admin password:

     [echo] Starting Tomcat customization...

The [input] is missing.
The default input handler does has the input tag as prefix. The difference is that def input handler prompts on System.err. The Console docs do not reveal where the console is attached to.
Anyway, this problem can be fixed.
In that line http://svn.apache.org/viewvc/ant/core/tags/ANT_181/src/main/org/apache/tools/ant/input/SecureInputHandler.java?view=markup#l48
you see the readPassword with args is called. If you replace the line with:

and now invoke reflectively the readPassword method without any parameters, this should work as the other input handler.