[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: Patch to java/io/BufferedInputStream.java
From: |
Michael Koch |
Subject: |
Re: [cp-patches] FYI: Patch to java/io/BufferedInputStream.java |
Date: |
Mon, 6 Dec 2004 21:19:35 +0100 |
User-agent: |
KMail/1.6.2 |
Am Montag, 6. Dezember 2004 21:11 schrieb Jeroen Frijters:
> Tom Tromey wrote:
> > Michael> Does a Mauve testcase exist for this ? If not please
> > write one.
> >
> > Also, if there is some known motivation for an addition like
> > this, it is nice to have a comment in the source. For example,
> > an explanation of why the special case is necessary or desirable
> > would be helpful to future hackers.
>
> It seemed obvious to me ;-) (Not when I originally worked on it, of
> course.)
>
> Actually, I do think it's obvious now that the explicit check is
> there. It's an easy thing to forget, but when reading the code it
> should make sense that not reading bytes shouldn't cause the read
> to block. I must admit that commenting code isn't my strong suit.
> IMO most comments only obscure the code and are very often either
> completely obvious or wrong.
It's obvious for you why the check has to be in this class and not in
the underlying stream ? I would really vote for a comment on this.
Michael
--
Homepage: http://www.worldforge.org/