On Tue, Apr 7, 2020 at 10:16 AM Mark Thomas <[email protected]> wrote:
> > Noted, I think a compromise may be in order. Where we simply add a
> > constructor that avoids the Class.forName
> > and that allows the developer to explicitly invoke a constructor that
> > avoids it.
>
> My thinking was more along the following lines...
>
> Rewrite the Connector (and possibly some/all other components) so that
> if a known class name was specified, rather than using the specified
> name directly via reflection we could do something like:
>
> if ("org.apache.coyote.http11.Http11NioProtocol".equals(className)) {
> protocol = new Http11NioProtocol();
> } else if ("org...
> ...
> } else {
> // OK. Unrecognised class name. Use reflection
> ...
> }
>
> Would that style of approach help at all?
>
Proposed patch:
https://pastebin.com/ydCYnBD9
Rémy
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>