You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/10/03 10:37:20 UTC

[jira] Updated: (HARMONY-1666) [classlib][awt] ByteLookupTable(4, new byte[]{}) expected IllegalArgumentException

     [ http://issues.apache.org/jira/browse/HARMONY-1666?page=all ]

Denis Kishenko updated HARMONY-1666:
------------------------------------

    Attachment: HARMONY-1666-ByteLookupTableTest.patch

test

> [classlib][awt] ByteLookupTable(4, new byte[]{}) expected IllegalArgumentException
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-1666
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1666
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>            Priority: Minor
>         Attachments: HARMONY-1666-ByteLookupTable.patch, HARMONY-1666-ByteLookupTableTest.patch
>
>
> Harmony implementation of ByteLookupTable constructor doesn't throw an exception while RI throws IllegalArgumentException. Harmony doesn't follow spec. 
> ============ Spec ==========================
> public ByteLookupTable(int offset, byte[][] data)
> Throws: 
>    IllegalArgumentException - if offset is is less than 0 or if the length of data is less than 1
> ============== Test =============
> import java.awt.image.*;
> public class Test {
>    public static void main(String[] argv) {
>        new ByteLookupTable(4, new byte[]{});
>    }
> }
> ============ RI output ============
> java.lang.IllegalArgumentException: Number of components must  be at least 1
>     at java.awt.image.LookupTable.<init>(LookupTable.java:55)
>     at java.awt.image.ByteLookupTable.<init>(ByteLookupTable.java:74)
>     at Test.main(Test.java:7)
> ========== Harmony output =========
> nothing

-- 
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