harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: svn commit: r835212 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedReader.java
Date Fri, 13 Nov 2009 17:22:28 GMT
This commit breaks a couple of existing compatibility tests for

java.lang.NullPointerException: buffer is null
at java.io.BufferedReader.read(BufferedReader.java:282)
at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)


junit.framework.AssertionFailedError: should throw IOException
at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)


On 12/Nov/2009 03:25, jessewilson@apache.org wrote:
> Author: jessewilson
> Date: Thu Nov 12 03:25:52 2009
> New Revision: 835212
> URL: http://svn.apache.org/viewvc?rev=835212&view=rev
> Log:
> Cleanup and bugfix BufferedReader.
> This change includes the following functional changes:
>  - changing read to not clear the mark upon reading EOF. The previous behaviour was incorrect.
>  - changing read(char[], int, int) to use the 'read directly from the source stream'
shortcut when the mark has exceeded its limit. Previously we took the shortcut only when the
mark was unset.
> And these nonfunctional changes:
>  - rewrote read(char[], int, int). The new revision contains only one call to 'System.arrayCopy'
and the related bookkeeping. Previously there was one call before the loop, and another call
in the loop.
>  - renamed markpos to mark
>  - renamed marklimit to markLimit
>  - renamed count to end (it isn't a count, it's a position)
>  - renamed fillbuf() to fillBuf()
>  - simplified conditions that used >= when > was impossible
>  - reducing the number of field reads where convenient
> This tidy up is intended to prepare BufferedReader for some further bugfixing. We've
seen some bugs reported against readLine() and I found it quite frustrating to work on the
code when the names were wrong (ie. count) or of a foreign style (such as fillbuf()). I also
attempted to document what the heck was going on in the more sophiticated methods.
> Modified:
>     harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedReader.java

View raw message