<AWT Dev> [OpenJDK 2D-Dev] [8] Review request for 8007295: Reduce number of warnings in awt classes
Jim Graham
james.graham at oracle.com
Fri Mar 22 18:34:25 PDT 2013
This bug has probably already been committed, but I am wondering if
there was a reason why the generics identifiers were left as "Object"
rather than using the known key and value types?
For example, RenderingHints.Key.identityMap should really be
HashMap<Key, WeakReference<Key>>
RenderingHints.hintmap should also probably be
HashMap<Key, Object>
but it looks like the API unfortunately had "Object" all over it with
explicit casts to Key. Still, just because the public API has some type
weaknesses, isn't it worthwhile to have our implementation be strongly
typed?
Or is there a general "If you fix warnings by adding generics
identifiers you should use the weakest generic types" rule in our
warning-fixing tactics?
...jim
On 3/5/2013 3:37 AM, Andrew Brygin wrote:
> I have reviewed changes in
> src/share/classes/java/awt/RenderingHints.java and
> src/share/classes/java/awt/geom/AffineTransform.java, and they look good
> to me.
>
> Thanks,
> Andrew
>
> On 3/5/2013 2:50 PM, Anthony Petrov wrote:
>> Looks good to me. There's also some 2D code, so I'm adding 2d-dev@ for
>> an additional review.
>>
>> --
>> best regards,
>> Anthony
>>
>> On 3/4/2013 20:15, mikhail cherkasov wrote:
>>> Hi all,
>>>
>>> Please review the following changes:
>>>
>>> Webrev: http://cr.openjdk.java.net/~mcherkas/8007295/webrev.00/
>>> <http://cr.openjdk.java.net/%7Emcherkas/8007295/webrev.00/>
>>> Link to bug: http://bugs.sun.com/view_bug.do?bug_id=8007295
>>>
>>> A bunch of javac's warnings were fixed.
>>>
>>> Thanks,
>>> Mikhail.
>>>
>>>
>
More information about the awt-dev
mailing list