You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/06/02 05:54:30 UTC

[jira] Created: (HARMONY-550) [classlib][nio-channels]Multiple bugs in org.apache.harmony.tests.java.nio.ByteBufferTest

[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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-550) [classlib][nio-channels]Multiple bugs in org.apache.harmony.tests.java.nio.ByteBufferTest

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-550?page=all ]

Paulex Yang updated HARMONY-550:
--------------------------------

    Attachment: Harmony550.diff

Please try this patch, thank you.

> [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
>  Attachments: Harmony550.diff
>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (HARMONY-550) [classlib][nio-channels]Multiple bugs in org.apache.harmony.tests.java.nio.ByteBufferTest

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-550?page=all ]
     
George Harley closed HARMONY-550:
---------------------------------


Verified by Paulex.

> [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
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: Harmony550.diff
>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-550) [classlib][nio-channels]Multiple bugs in org.apache.harmony.tests.java.nio.ByteBufferTest

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-550?page=comments#action_12415799 ] 

Paulex Yang commented on HARMONY-550:
-------------------------------------

Looks fine, thank you, George.

> [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
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: Harmony550.diff
>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (HARMONY-550) [classlib][nio-channels]Multiple bugs in org.apache.harmony.tests.java.nio.ByteBufferTest

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-550?page=all ]

George Harley reassigned HARMONY-550:
-------------------------------------

    Assign To: George Harley

> [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
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: Harmony550.diff
>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HARMONY-550) [classlib][nio-channels]Multiple bugs in org.apache.harmony.tests.java.nio.ByteBufferTest

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-550?page=all ]
     
George Harley resolved HARMONY-550:
-----------------------------------

    Resolution: Fixed

Hi Paulex, 

Changes committed in revision 412094. Please could you check that they have been applied as you expect. Thank you for this enhancement. 

Best regards, 
George




> [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
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: Harmony550.diff
>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira