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] Commented: (HARMONY-704) [classlib][nio]refactory nio buffer test step 2 - CharBuffer tests
Date Fri, 30 Jun 2006 03:14:30 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-704?page=comments#action_12418562 ] 

Paulex Yang commented on HARMONY-704:


Very sorry for the inconvence caused, but you just caught a big bug of the test code!  

The setup() of CharBufferTest has tried to fill test data to buffer by statement below, and
chars is a static char array
        buf = CharBuffer.wrap(chars);

but actually CharBuffer will use the chars as backing array, which means if writing to CharBuffer,
the chars also been modified, that's definitely not what the setUp() intends to do.

And because Eclipse and Ant may run the test classes in different order, the tests may succeed
in some cases while fail in others. 

I'll attach a new patch including the original one to fix this problem, thank you to point
out this, and sorry again. 

> [classlib][nio]refactory nio buffer test step 2 - CharBuffer tests
> ------------------------------------------------------------------
>          Key: HARMONY-704
>          URL: http://issues.apache.org/jira/browse/HARMONY-704
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: harmony-704.zip
> As I proposed on the mailing list, I'm going to refactor the nio buffers' tests, here
goes the refactory for CharBuffer tests following Harmony-575. I'll attach patch soon.

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