This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: java.io.PrintStream - PR/13176


On Fri, Dec 05, 2003 at 04:50:48PM +0100, Mark Wielaard wrote:
> Hi,
> 
> On Fri, 2003-12-05 at 16:32, Michael Koch wrote:
> > On Fri, Dec 05, 2003 at 12:55:30AM +0100, Mark Wielaard wrote:
> >
> > > > @@ -435,6 +522,10 @@
> > > >          if (auto_flush && (oneByte == '\n'))
> > > >            flush ();
> > > >        }
> > > > +    catch (InterruptedIOException iioe)
> > > > +      {
> > > > +        Thread.currentThread ().interrupt ();
> > > > +      }
> > > >      catch (IOException e)
> > > >        {
> > > >          setError ();
> > > 
> > > How/why does this work and why do we need to do this?
> > 
> > After looking closer into this I removed that part of the patch. It was
> > removed in revision 1.19 which fixed an PR.
> 
> Since you didn't remove it from flush(), close() and print() I assume it
> is till needed there?

I dont know if its needed but doesnt seem to be wrong according to the
testcase in PR/11778.

> How/Why does it work?

It uses always the current OutputStream object in "out". That way a
subclass of PrintStream can always set a new object to it. The old
implementation using PrintWriter could only use the object set to out
during constructor execution because it gave a reference to the
PrintWriter constructor.



Michael


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]