harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Khaschansky (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2691) [classlib][awt][compatibility] java.awt.image.RescaleOp(float[] scaleFactors, float[] offsets, RenderingHints hints) throws IllegalArgumentException if an array is empty
Date Thu, 14 Dec 2006 12:51:23 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2691?page=all ]

Oleg Khaschansky updated HARMONY-2691:
--------------------------------------

    Attachment: harmony-2691-test.patch

unit test

> [classlib][awt][compatibility] java.awt.image.RescaleOp(float[] scaleFactors, float[]
offsets, RenderingHints hints) throws IllegalArgumentException if an array is empty
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2691
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2691
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>            Priority: Minor
>         Attachments: harmony-2691-test.patch, harmony-2691.patch
>
>
> Specification doesn't mention any exceptions for
> RescaleOp(float[] scaleFactors,float[] offsets,RenderingHints hints)
> constructor.
> Harmony throws IllegalArgumentException if scaleFactors or offsets is empty while RI
does not.
> Testcase:
> import java.awt.image.*;
> import junit.framework.TestCase;
> import java.awt.*;
> public class test extends TestCase  {
>     public void testcase1() {                           
>         float[] array0 = new float[] {};
>         float[] array1 = new float[] { 0.75F};
>         new RescaleOp(array1, array0, null);                            
>     }
>     public void testcase2() {                           
>         float[] array0 = new float[] {};
>         float[] array1 = new float[] { 0.75F};
>         new RescaleOp(array0, array1, null);                            
>     }                                                                        
> }
> Output on RI:
> ..
> Time: 0,016
> OK (2 tests)
> Output on Harmony+drlvm/j9:
> .E.E
> Time: 0
> There were 2 errors:
> 1) testcase2(test)java.lang.IllegalArgumentException: The number of scale
> factors should not be zero
>         at java.awt.image.RescaleOp.<init>(RescaleOp.java:47)
>         at test.testcase2(test.java:11)
>         at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> 2) testcase3(test)java.lang.IllegalArgumentException: The number of scale
> factors should not be zero
>         at java.awt.image.RescaleOp.<init>(RescaleOp.java:47)
>         at test.testcase3(test.java:16)
>         at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> FAILURES!!!
> Tests run: 2,  Failures: 0,  Errors: 2

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

        

Mime
View raw message