harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-550) [classlib][nio-channels]Multiple bugs in org.apache.harmony.tests.java.nio.ByteBufferTest
Date Fri, 02 Jun 2006 03:54:30 GMT
[classlib][nio-channels]Multiple bugs in org.apache.harmony.tests.java.nio.ByteBufferTest

         Key: HARMONY-550
         URL: http://issues.apache.org/jira/browse/HARMONY-550
     Project: Harmony
        Type: Bug

  Components: Classlib  
    Reporter: Paulex Yang
    Priority: Minor

1. Several "Arrays.equals(arg1, arg2)" in the testAsShortBuffer, testAsLongBuffer and testAsIntBuffer
method miss assertTrue() statement. 

2. When the missed asserts are added, four more test cases fail on Harmony, look more inside,
the evil is not in the ByteBuffer but in the helper methods of ByteBufferTest - short2bytes,
int2bytes(int value, ByteOrder order) and long2bytes(long value, ByteOrder order), These methods
try to convert a short/long/int value to byte arrays with the given ByteOrder, but if the
ByteOrder is set to ByteOrder.LITTLE_ENDIAN, an error may occur. For example, a short value
0x0102 should be converted to byte[2]{02,01} with ByteOrder.LITTLE_ENDIAN, but it returns
byte[2]{01,00} now. I will attach patch soon.

The test result keep same on RI before and after these bug fixing.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message