You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "B. K. Oxley (binkley)" <bi...@alumni.rice.edu> on 2005/02/09 22:38:11 UTC
[io] why synchronized for NullOutputStream
Why are some of the write methods in NullOutputStream synchronized?
Example:
public synchronized void write(byte[] b, int off, int len) {
//to /dev/null
}
Cheers,
--binkley
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [io] why synchronized for NullOutputStream
Posted by Henri Yandell <fl...@gmail.com>.
Definitely cut and paste.
I tend to run javap on a class and redirect it into a new ,java file
that I plan to use as a proxy/delegate :) Pretty sure that's how Null
was written. If it's the one I originally wrote.
Probably best to open a bugzilla entry; patch if you want but it's
pretty simple as you're pointing out :)
IO 1.1 is my next target once Lang 2.1 is out; unsure what anyone
else's plans are.
Hen
On Wed, 09 Feb 2005 20:19:41 -0600, B. K. Oxley (binkley)
<bi...@alumni.rice.edu> wrote:
> Stephen Colebourne wrote:
> > Cut and paste?!!
>
> You prefer a patch removing the synchronized keywords? :-)
>
> Again, is there some technical reason for empty-bodied methods to be
> sychronized?
>
>
> Cheers,
> --binkley
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [io] why synchronized for NullOutputStream
Posted by "B. K. Oxley (binkley)" <bi...@alumni.rice.edu>.
Stephen Colebourne wrote:
> Cut and paste?!!
You prefer a patch removing the synchronized keywords? :-)
Again, is there some technical reason for empty-bodied methods to be
sychronized?
Cheers,
--binkley
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [io] why synchronized for NullOutputStream
Posted by Stephen Colebourne <sc...@btopenworld.com>.
Cut and paste?!!
Stephen
----- Original Message -----
From: "B. K. Oxley (binkley)" <bi...@alumni.rice.edu>
> Why are some of the write methods in NullOutputStream synchronized?
>
> Example:
>
> public synchronized void write(byte[] b, int off, int len) {
> //to /dev/null
> }
>
>
>
> Cheers,
> --binkley
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org