harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4135) [classlib][luni] InputStream handles UTF-16 incorrectly
Date Wed, 13 Jun 2007 02:08:26 GMT
[classlib][luni] InputStream handles UTF-16 incorrectly
-------------------------------------------------------

                 Key: HARMONY-4135
                 URL: https://issues.apache.org/jira/browse/HARMONY-4135
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Vasily Zakharov


Here's the simple test demonstrating the problem:

import java.io.*;
public class Test {
    public static void main(String[] args) throws Throwable {
        InputStream input = new ByteArrayInputStream("-".getBytes("UTF-16"));
        int first = (input.read() & 0xFF);
        int second = (input.read() & 0xFF);
        System.out.println("" + first + " " + second);
    }
}

Output on RI:

254 255

Output on Harmony (both IBM VM and DRL VM):

255 254

This problem was discovered while investigating the HARMONY-3850 with Eclipse Unit Test org.eclipse.core.tests.runtime.content.IContentTypeManagerTest.testContentDescription().


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


Mime
View raw message