You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexander D Shipilov (JIRA)" <ji...@apache.org> on 2006/12/27 13:08:22 UTC
[jira] Commented: (HARMONY-2598) [classlib][awt]
java.awt.Graphics2D.drawLine throws NPE if color is set to null
[ http://issues.apache.org/jira/browse/HARMONY-2598?page=comments#action_12460987 ]
Alexander D Shipilov commented on HARMONY-2598:
-----------------------------------------------
Note that suggested fix contains also fix of bug, contained in discussion:
http://mail-archives.apache.org/mod_mbox/harmony-dev/200612.mbox/%3cAEE3DE4D-FFA8-430D-84C5-BAAB0F677CF2@pobox.com%3e
> [classlib][awt] java.awt.Graphics2D.drawLine throws NPE if color is set to null
> -------------------------------------------------------------------------------
>
> Key: HARMONY-2598
> URL: http://issues.apache.org/jira/browse/HARMONY-2598
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: windows
> Reporter: Alexander Simbirtsev
> 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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira