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

[jira] Resolved: (HARMONY-1471) [classlib][awt] TexturePaint expected NPE if one of input parameters is null

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

Mikhail Loenko resolved HARMONY-1471.
-------------------------------------

    Resolution: Fixed

fixed in revision 466035
Denis, please check the patch was applied as expected

> [classlib][awt] TexturePaint expected NPE if one of input parameters is null
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-1471
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1471
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Assigned To: Mikhail Loenko
>         Attachments: 1471-TexturePaint.patch, 1471-TexturePaintTest.patch
>
>
> Harmony implementation of TexturePaint  doesn't check null value of input parameters while RI does and throws NPE
> =========== Spec =================
> Nothing about exceptions
> ============== Test.java =============
> import java.awt.*;
> import java.awt.image.BufferedImage;
> public class Test {
>     static public void main(String[] args) {
>         try {
>             System.err.println("1");
>             new TexturePaint(null, new Rectangle());            
>         } catch (Exception e) {
>             e.printStackTrace();
>         }
>         try {
>             System.err.println("2");
>             new TexturePaint(new BufferedImage(1, 1, 1), null);            
>         } catch (Exception e) {
>             e.printStackTrace();
>         }
>     }
> }
> ============= RI output ============
> 1
> java.lang.NullPointerException
>     at java.awt.TexturePaint.<init>(TexturePaint.java:54)
>     at Test.main(Test.java:9)
> 2
> java.lang.NullPointerException
>     at java.awt.TexturePaint.<init>(TexturePaint.java:52)
>     at Test.main(Test.java:15)
> ========== Harmony output ========
> 1
> 2
> java.lang.UnsatisfiedLinkError: 
>     at org.apache.harmony.awt.gl.Surface.<clinit>(Surface.java:84)
>     at java.awt.image.BufferedImage.createImageSurface(BufferedImage.java:659)
>     at java.awt.image.BufferedImage.<init>(BufferedImage.java:352)
>     at bug9768.main(bug9768.java:15)

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