harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko" <dkishe...@gmail.com>
Subject Re: [jira] Created: (HARMONY-1570) [classlibl][awt] RI considers that negative rectangle is contained inside empty GeneralPath
Date Mon, 25 Sep 2006 13:33:52 GMT
Hi all

I have found strange behaviour of RI implementation of
java.awt.geom.GeneralPath.
RI returns TRUE for following code while Harmony returns FALSE

new GeneralPath().contains(0, 0, -10, -10))

Actually TRUE result is absolutely illogical because of
1. GeneralPath is empty
2. Negative width and height meen that rectangle is empty too

I have marked this issue as non-bug difference.

Any comments?



2006/9/25, Denis Kishenko (JIRA) <jira@apache.org>:
> [classlibl][awt] RI considers that negative rectangle is contained inside empty GeneralPath
> -------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1570
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1570
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Denis Kishenko
>
>
> RI implementation of GeneralPath.contains(x, y, width, height) returns true if input
width and height are negative and GeneralPath is empty. It's absolutely illogical.
>
> =========== Test.java ===============
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
>
> import java.awt.geom.GeneralPath;
>
> public class Test extends TestCase {
>        public void testcase0() {
>                GeneralPath p = new GeneralPath();
>                assertTrue(p.contains(0, 0, -10, -10));
>        }
>
>        static public void main(String[] args) {
>            TestRunner.run(Test.class);
>        }
> }
>
> ========= RI ===================.
> Time: 0,031
>
> OK (1 test)
>
>
> ======= Harmony ===============
> Time: 0.328
> There was 1 failure:
> 1) testcase0(Test)junit.framework.AssertionFailedError
>    at Test.testcase0(Test.java:10)
>    at java.lang.reflect.VMReflection.invokeMethod()
>
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0
>
>
>
>
> */
>
> --
> 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
>
>
>


-- 
Denis M. Kishenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message