harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-2519) [classlib][awt] Compatibility: java.awt.RenderingHints(RenderingHints.Key key,Object o) throws unexpected IllegalArgumentException while RI doesn'
Date Mon, 19 Mar 2007 15:11:32 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Petrenko closed HARMONY-2519.
------------------------------------

    Resolution: Duplicate
      Assignee: Alexey Petrenko

> [classlib][awt] Compatibility: java.awt.RenderingHints(RenderingHints.Key key,Object
o) throws unexpected IllegalArgumentException while RI doesn'
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2519
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2519
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Ilya Okomin
>         Assigned To: Alexey Petrenko
>            Priority: Minor
>
> Problem details:
> There is no mention of IllegalArgumentException in the specification, but
> java.awt.RenderingHints( RenderingHints.Key key,Object o) throws unexpected IllegalArgumentException
while RI does not.
> Test for reproducing:
> import junit.framework.TestCase;
> import java.awt.*;
> public class test extends TestCase {      
>     public void test1 () {       
>        new RenderingHints(RenderingHints.KEY_RENDERING,new
> String("MyMessageDigest"));            
>     }      
> }
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0
> There was 1 error:
> 1) test1(test)java.lang.IllegalArgumentException
>         at java.awt.RenderingHints.put(RenderingHints.java:98)
>         at java.awt.RenderingHints.<init>(RenderingHints.java:89)
>         at test.test1(test.java:6)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1
> I suggest to mark this case as non-bug difference. If you take a look at the put() method
description in RenderingHints class, spec says:
> "Throws: IllegalArgumentException - value is not appropriate for the specified key.".
I think the same check should be implemented in the constructor as it is done in Harmony.
IMO invalid values for the rendering hints' keys don't make any sense.

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


Mime
View raw message