You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ilya Okomin (JIRA)" <ji...@apache.org> on 2006/09/28 14:46:50 UTC

[jira] Created: (HARMONY-1629) [classlib][awt]Compatibility: java.awt.image.LookupOp constructor for null LookupTable parameter throws NPE on RI while it doesn't on Harmony.

[classlib][awt]Compatibility: java.awt.image.LookupOp constructor for null LookupTable parameter throws NPE on RI while it doesn't on Harmony.
----------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-1629
                 URL: http://issues.apache.org/jira/browse/HARMONY-1629
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Ilya Okomin
            Priority: Minor


java.awt.image.LookupOp(LookupTable lookup, RenderingHints hints)  constructor for null LookupTable parameter throws NPE on RI while it doesn't on Harmony. NPE is unspecified in the spec, so it's a compatibility issue.
Test to reproduce:
---------test.java-----------
import java.awt.*;
import java.awt.image.*;

public class test{

    public static void main(String[] args) {
        RenderingHints localRenderingHints = new RenderingHints(null);
        try {
            LookupOp returnValue = new LookupOp(null, localRenderingHints);
            System.out.println("Fail: NullPointerException expected!");
        } catch (NullPointerException npe) {
            System.out.println("Success: " + npe + " was thrown!");
        }
    }
}
---------------------------------------

====== Output RI ======= 

Success: java.lang.NullPointerException was thrown!

====== Output Harmony ====== 

Fail: NullPointerException expected!

-- 
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-1629) [classlib][awt]Compatibility: java.awt.image.LookupOp constructor for null LookupTable parameter throws NPE on RI while it doesn't on Harmony.

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

Ilya Okomin updated HARMONY-1629:
---------------------------------

    Attachment: Harmony-1629.patch
                Harmony-1629-test.patch

Please try these fix and test.

> [classlib][awt]Compatibility: java.awt.image.LookupOp constructor for null LookupTable parameter throws NPE on RI while it doesn't on Harmony.
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1629
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1629
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ilya Okomin
>            Priority: Minor
>         Attachments: Harmony-1629-test.patch, Harmony-1629.patch
>
>
> java.awt.image.LookupOp(LookupTable lookup, RenderingHints hints)  constructor for null LookupTable parameter throws NPE on RI while it doesn't on Harmony. NPE is unspecified in the spec, so it's a compatibility issue.
> Test to reproduce:
> ---------test.java-----------
> import java.awt.*;
> import java.awt.image.*;
> public class test{
>     public static void main(String[] args) {
>         RenderingHints localRenderingHints = new RenderingHints(null);
>         try {
>             LookupOp returnValue = new LookupOp(null, localRenderingHints);
>             System.out.println("Fail: NullPointerException expected!");
>         } catch (NullPointerException npe) {
>             System.out.println("Success: " + npe + " was thrown!");
>         }
>     }
> }
> ---------------------------------------
> ====== Output RI ======= 
> Success: java.lang.NullPointerException was thrown!
> ====== Output Harmony ====== 
> Fail: NullPointerException expected!

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