You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2009/02/27 22:58:26 UTC

DO NOT REPLY [Bug 46781] New: with impl defined by embedder

https://issues.apache.org/bugzilla/show_bug.cgi?id=46781

           Summary: <input><handler type="secure"/></handler> with impl
                    defined by embedder
           Product: Ant
           Version: 1.7.1
          Platform: All
               URL: http://www.netbeans.org/nonav/issues/show_bug.cgi?id=1
                    55056
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: jglick@netbeans.org


When Ant is run embedded, the container can set a default input handler - there
is a method on Project for this. But it is pretty common for a script to
request SecureInputHandler to read a password. If it does this, the container
no longer has any way to substitute a preferred handler, so java.io.Console is
used whether this makes sense or not.

In the case of the NetBeans IDE (see URL), it would like to pop up a dialog
with a JPasswordField, and you can imagine other GUI embedders (or even CI
servers) wanting to provide their own impls.

Would like to introduce Project.setSecureInputHandler(InputHandler). Since
<input classname="..."> always loads exactly that, should introduce "secure" as
a value for HandlerType. Scripts using this mode would get the handler defined
by the project, SecureInputHandler if not set otherwise.

Old scripts using classname="...SecureInputHandler" would be unaffected; would
be nice to provide the new behavior for these automatically, but that would
mean you could not explicitly request SIH and nothing else. Possible trick:
introduce

public class ConsoleSecureInputHandler extends SecureInputHandler {}

(a no-op override), and treat <handler classname="...SecureInputHandler"/> like
<handler type="secure"/>, with <handler
classname="...ConsoleSecureInputHandler"/> available for scripts which really
do not want this to be overridden by a container.

Should probably have CLI

  -secureinputhandler <class>  the class which will handle secure input
requests

as well, useful for containers which fork Ant rather than embedding in-VM.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46781] with impl defined by embedder

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46781


Matt Benson <gu...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|<input><handler             |<input><handler
                   |type="secure"/></handler>   |type="secure"/></input>
                   |with impl defined by        |with impl defined by
                   |embedder                    |embedder




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.