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