harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-2598) [classlib][awt] java.awt.Graphics2D.drawLine throws NPE if color is set to null
Date Sat, 13 Jan 2007 17:36:27 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mark Hindess resolved HARMONY-2598.
-----------------------------------

    Resolution: Fixed
      Assignee: Mark Hindess

Applied patches in r495931.  I modified the test slightly to let junit handle the exceptions.
 Please confirm they have been applied as expected.

> [classlib][awt] java.awt.Graphics2D.drawLine throws NPE if color is set to null
> -------------------------------------------------------------------------------
>
>                 Key: HARMONY-2598
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2598
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: windows
>            Reporter: Alexander Simbirtsev
>         Assigned To: Mark Hindess
>         Attachments: CommonGraphics2D2598.patch, CommonGraphics2D2598Test.patch
>
>
> java.awt.Graphics2D.drawLine throws NPE if color is set to null while RI doesn't
> here's the code to reproduce:
> import java.awt.Graphics2D;
> import java.awt.image.BufferedImage;
> import junit.framework.TestCase;
> public class Test extends TestCase {
>     public void testcase1() {
>         Graphics2D g = new BufferedImage(56, 56,
>                                          BufferedImage.TYPE_INT_RGB).createGraphics();

>         g.setColor(null);
>         try {
>             g.drawLine(0, 0, 10, 10);
>         } catch (NullPointerException e) {
>             fail("NullPointerException is thrown");
>         }
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message