commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] [bugs #4742] java.io.StreamTokenizer behaves differently fro


From: Audrius Meškauskas
Subject: [commit-cp] [bugs #4742] java.io.StreamTokenizer behaves differently from Sun's implementation
Date: Mon, 28 Feb 2005 16:22:56 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

Update of bugs #4742 (project classpath):

                  Status:                    None => Need Info              
             Open/Closed:                    Open => In Process             

    _______________________________________________________

Follow-up Comment #2:

The bug #4742 contains a comprehensive test, verifying the work of
StreamTokenizer by parsing randomly generated data under randomly set
options. It reveals the single difference between the Sun and Classpath
implementations. 

If the numeric character ('0'..'9') obtains a specific status of comment,
whitespace or some other character, Sun's implementation only treats it as
such if found standing alone or in the beginning of the multi - character
number. If the number parsing has once started, the digits in that number are
trated as digits regardless of they spacific status. 

For example, after calling whitespaceChars('1', '1'), it reads "121" as 21
while Classpatch implementation reads it as "2", of course.

It is a piece of cake to make a patch for reproducing this behavior. The
StreamTokenizer has many Mauve tests and it is easy to ensure this does not
introduce any obvious regressions.

The question is, to fix of not to fix? A bug or not a bug? Who and why may
need to mark digits as a whitespace and still want to parse numbers? Maybe
some very old historical reasons?

In any case, 4742 will either be closed either as "not a bug" or as "fixed".

    _______________________________________________________

This item URL is:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=4742>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]