7116722: Miscellaneous warnings sun.misc ( and related classes )
Joe Darcy
joe.darcy at oracle.com
Wed Nov 30 17:04:47 UTC 2011
On 11/30/2011 8:56 AM, Alan Bateman wrote:
> On 30/11/2011 16:33, Chris Hegarty wrote:
>> I started to look at the reason why we suppressed unchecked warning
>> for sun.misc.Service in a few places, and this lead me into some
>> other sun.misc classes. Here's a change that fixes a few warnings in
>> this area.
>>
>> http://cr.openjdk.java.net/~chegar/7116722/webrev.00/webrev/
>>
>> -Chris.
> It's nice to see existing @SuppressWarnings going away.
>
> What would you think of just biting the bullet and getting InetAddress
> and the http server switched over to using ServiceLoader?
I was going to suggest the same.
>
> In ExtensionDependency.installExtension then I assume you could assign
> to a temporary variable with the @SuppressWarnings("unchecked") at the
> declaration and avoid the uncheckedClone.
>
>
A few other comments:
In this code,
public JarIndex() {
- indexMap = new HashMap();
- jarMap = new HashMap();
+ indexMap = new HashMap<String,LinkedList<String>>();
+ jarMap = new HashMap<String,LinkedList<String>>();
}
I believe diamond could be used to initalize indexMap and jarMap. (Not
using diamond here may be a style choice.)
Otherwise, looks good.
-Joe
More information about the core-libs-dev
mailing list