Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 73094 invoked from network); 22 May 2007 03:45:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 May 2007 03:45:37 -0000 Received: (qmail 91690 invoked by uid 500); 22 May 2007 03:45:43 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 91644 invoked by uid 500); 22 May 2007 03:45:43 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 91609 invoked by uid 99); 22 May 2007 03:45:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 20:45:42 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 20:45:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 979FF714044 for ; Mon, 21 May 2007 20:45:16 -0700 (PDT) Message-ID: <3715607.1179805516618.JavaMail.jira@brutus> Date: Mon, 21 May 2007 20:45:16 -0700 (PDT) From: "spark shen (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-3880) [classlib][luni] Compatibility: StreamTokenizer.toString() returns different values on Harmony and RI if current token is a string constant In-Reply-To: <9547566.1179321497506.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] spark shen updated HARMONY-3880: -------------------------------- Attachment: StreamTokenier_HY3880.patch > [classlib][luni] Compatibility: StreamTokenizer.toString() returns different values on Harmony and RI if current token is a string constant > ------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-3880 > URL: https://issues.apache.org/jira/browse/HARMONY-3880 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Elena Sayapina > Priority: Trivial > Attachments: StreamTokenier_HY3880.patch, tokenizerTest.java > > > StreamTokenizer.toString() returns different values on Harmony and RI if current token is a string constant: > Harmony returns string delimit character, > RI returns a string constant without string delimit characters. > Please, consider the following code: > import java.io.ByteArrayInputStream; > import java.io.IOException; > import java.io.StreamTokenizer; > public class tokenizerTest { > public static void main(String[] args) throws IOException { > byte[] data = new byte[] {(byte) '"', > (byte) 'H', > (byte) 'e', > (byte) 'l', > (byte) 'l', > (byte) 'o', > (byte) '"'}; > StreamTokenizer tokenizer = new StreamTokenizer(new ByteArrayInputStream(data)); > try { > tokenizer.nextToken(); > } catch (Exception e) { > e.printStackTrace(); > } > System.out.println("sval: " + tokenizer.sval.toString()); > String result = tokenizer.toString(); > System.out.println("tokenizer.toString(): " + result); > if(result.equals("Token[Hello], line 1")) System.out.println("TEST PASSED"); > else System.out.println("TEST FAILED"); > } > } > Output on Harmony-r538431: > 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 = r538431, (May 16 2007), Windows/ia32/msvc 1310, release build > http://incubator.apache.org/harmony > sval: Hello > tokenizer.toString(): Token['"'], 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) > sval: Hello > tokenizer.toString(): Token[Hello], line 1 > TEST PASSED > Please, use attached tokenizerTest.java for the test reproducing. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.