You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Tim Ellison <t....@gmail.com> on 2009/11/12 14:13:18 UTC

[classlib] poop (was Re: [classlib] BufferedReader and FileInputStream.available())

On 10/Nov/2009 06:14, enh wrote:
> Is noone concerned about pooping this ebcdic cruft all over the place?
> Shouldn't it be factored out into an isNewline method somewhere?

Where are they all?  A grep of the code, which admittedly is likely to
miss some cases shows the following (not counting test, native, and
generated code)

0x15

luni/src/main/java/java/io/PrintStream.java


\u0085

luni/src/main/java/java/util/Scanner.java
regex/src/main/java/java/util/regex/AbstractLineTerminator.java
regex/src/main/java/java/util/regex/EOLSet.java
regex/src/main/java/java/util/regex/Lexer.java
regex/src/main/java/java/util/regex/MultiLineEOLSet.java


Do we have a problem?

Regards,
Tim

> On Nov 9, 2009 10:10 PM, "Ray Chen" <cl...@gmail.com> wrote:
> 
> Shall we store the return value of out.position()-1 to avoid invoking it
> twice?
> If it is too tiny for performace improvement, current patch seems good for
> me.
> 
> On Tue, Nov 10, 2009 at 2:04 PM, Regis <xu...@gmail.com> wrote: > Ray
> Chen wrote: > >> Hi Regis...
> --
> Regards,
> 
> Ray Chen
> 

Re: [classlib] poop (was Re: [classlib] BufferedReader and FileInputStream.available())

Posted by enh <en...@google.com>.
On Thu, Nov 12, 2009 at 05:13, Tim Ellison <t....@gmail.com> wrote:
> On 10/Nov/2009 06:14, enh wrote:
>> Is noone concerned about pooping this ebcdic cruft all over the place?
>> Shouldn't it be factored out into an isNewline method somewhere?
>
> Where are they all?  A grep of the code, which admittedly is likely to
> miss some cases shows the following (not counting test, native, and
> generated code)
>
> 0x15
>
> luni/src/main/java/java/io/PrintStream.java

i notice the javadoc's wrong there. it should say "newline", not '\n'.

there are two reasons i'd like to see ebcdic changes clearly signaled:

1. i was worried about the *opposite* case, where we have '\n' but
mean "newline".

2. i think that there are plenty of people out there who really don't
care about ebcdic, and if they could turn it off in one single place,
probably would.

 --elliott

> \u0085
>
> luni/src/main/java/java/util/Scanner.java
> regex/src/main/java/java/util/regex/AbstractLineTerminator.java
> regex/src/main/java/java/util/regex/EOLSet.java
> regex/src/main/java/java/util/regex/Lexer.java
> regex/src/main/java/java/util/regex/MultiLineEOLSet.java
>
>
> Do we have a problem?
>
> Regards,
> Tim
>
>> On Nov 9, 2009 10:10 PM, "Ray Chen" <cl...@gmail.com> wrote:
>>
>> Shall we store the return value of out.position()-1 to avoid invoking it
>> twice?
>> If it is too tiny for performace improvement, current patch seems good for
>> me.
>>
>> On Tue, Nov 10, 2009 at 2:04 PM, Regis <xu...@gmail.com> wrote: > Ray
>> Chen wrote: > >> Hi Regis...
>> --
>> Regards,
>>
>> Ray Chen
>>
>



-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/