You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrey Pavlenko (JIRA)" <ji...@apache.org> on 2007/04/16 10:50:15 UTC

[jira] Commented: (HARMONY-1447) [classlib][awt] RI Polygon.add(int,int) throws exception after Polygon(new int[2], new int[2], 0)

    [ https://issues.apache.org/jira/browse/HARMONY-1447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489045 ] 

Andrey Pavlenko commented on HARMONY-1447:
------------------------------------------

I think this issue should be closed. 
Link to discussion in the dev-list - http://www.mail-archive.com/dev@harmony.apache.org/msg06341.html

> [classlib][awt] RI Polygon.add(int,int) throws exception after Polygon(new int[2], new int[2], 0)
> -------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1447
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1447
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Denis Kishenko
>            Priority: Minor
>
> Spec doesn't say about any exceptions. Even if Polygon created with empty point buffer (not null but zero length), method addPoint() should reallocate buffer to append new point but RI throws ArrayIndexOutOfBoundsException exception. Seems like RI bug.
> ================= Test.java ===================
> import java.awt.*;
> public class Test {
>     static public void main(String[] args) {                   
> //        Polygon p = new Polygon(); it works
>         Polygon p = new Polygon(new int[2], new int[2], 0);
>         p.addPoint(1, 1);    
>     }         
> }
> ============= RI ====================
> java.lang.ArrayIndexOutOfBoundsException
>     at java.awt.Polygon.addPoint(Polygon.java:262)
>     at Test.main(Test.java:8)
> =========== Harmony ================
> nothing

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.