[9] RFR of 8143394: PushbackReader throws NullPointerException
Daniel Fuchs
daniel.fuchs at oracle.com
Fri Dec 4 11:44:47 UTC 2015
Hi Brian,
On 12/4/15 9:48 AM, Daniel Fuchs wrote:
> I wonder if:
> 248 public void close() throws IOException {
> 249 synchronized (lock) {
> 250 buf = null;
> 251 }
> 252 super.close();
> 253 }
>
> would be a safer implementation. I don't know the java.io code
> in depth - so that's just a question...
Actually scratch that. I see that all other super methods
are called from within the lock. So calling super.close()
from within the same lock as well is probably safer - and
what you have is good.
best regards,
-- daniel
More information about the core-libs-dev
mailing list