You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2007/12/04 15:22:43 UTC

[jira] Commented: (HARMONY-4070) [classlib][luni] Compatibility: StreamTokenizer.toString() returns different values on Harmony and RI if current token is a special character like '*', ',' '-', '}', '&'

    [ https://issues.apache.org/jira/browse/HARMONY-4070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548266 ] 

Tim Ellison commented on HARMONY-4070:
--------------------------------------

Thanks for the fix Stepan.


> [classlib][luni] Compatibility: StreamTokenizer.toString() returns different values on Harmony and RI if current token is a special character like '*', ',' '-', '}', '&'
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4070
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4070
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Elena Sayapina
>            Assignee: Tim Ellison
>            Priority: Trivial
>         Attachments: tokenizerTest2.java
>
>
> StreamTokenizer.toString() returns different values on Harmony and RI if current token is a special character like '*', ',' '-', '}', '&' ... 
> Harmony returns Token[null], line number,  while RI returns Token[null], line number. 
> Please, consider the following code: 
> import java.io.ByteArrayInputStream;
> import java.io.IOException;
> import java.io.StreamTokenizer;
> public class tokenizerTest2 {
> 	public static void main(String[] args) throws IOException {
> 	    byte[] data = new byte[] {(byte) '-'};
> 	    StreamTokenizer tokenizer = new StreamTokenizer(new ByteArrayInputStream(data));
> 	    tokenizer.nextToken();
> 	    String result = tokenizer.toString();
> 	    System.out.println("tokenizer.toString(): " + result);   
> 	    if(result.equals("Token['-'], line 1")) System.out.println("TEST PASSED");
> 	    else System.out.println("TEST FAILED");
> 	}
> }
> Output on Harmony-r544727: 
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
> as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r544727, (Jun  6 2007), Windows/ia32/msvc 1310, release build
> http://harmony.apache.org
> tokenizer.toString(): Token[null], line 1
> TEST FAILED
> Output on HotSpot: 
> java version "1.5.0_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)
> tokenizer.toString(): Token['-'], line 1
> TEST PASSED
> Note that it may be a regression caused by HARMONY-3880 fix applied at r542433, 
> because tokenizerTest2 output on Harmony-r542415 is: 
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
> as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542415, (May 29 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> tokenizer.toString(): Token['-'], line 1
> TEST PASSED
> Please, use attached tokenizerTest2.java for the issue reproducing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.