You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jaikiran Pai <ja...@apache.org> on 2021/03/21 04:18:12 UTC
Re: [ant] branch master updated: add discardOutput and discardError
to redirector, apply, exec, java
On 20/03/21 11:31 pm, bodewig@apache.org wrote:
> ...
> + */
> +public class NullOutputStream extends OutputStream {
> +
> + /**
> + * Shared instance which is safe to use concurrently as the stream
> + * doesn't hold any state at all.
> + */
> + public static NullOutputStream INSTANCE = new NullOutputStream();
> +
> +
Should we consider adding a private constructor to prevent anyone from
directly instantiating this class? It won't make that major a
difference, but since we already expose this INSTANCE, it probably is a
good idea to prevent direct instantiation?
-Jaikiran
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: [ant] branch master updated: add discardOutput and discardError to redirector, apply, exec, java
Posted by Stefan Bodewig <bo...@apache.org>.
On 2021-03-21, Jaikiran Pai wrote:
> On 20/03/21 11:31 pm, bodewig@apache.org wrote:
> + */
> + public class NullOutputStream extends OutputStream {
> + /**
> + * Shared instance which is safe to use concurrently as the stream
> + * doesn't hold any state at all.
> + */
> + public static NullOutputStream INSTANCE = new NullOutputStream();
> Should we consider adding a private constructor to prevent anyone from
> directly instantiating this class?
fine with me.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org