diff -r af9631156b25 -r d92637d3d673 jdk/src/share/classes/sun/nio/cs/ThreadLocalCoders.java --- a/jdk/src/share/classes/sun/nio/cs/ThreadLocalCoders.java Wed Jul 27 18:10:10 2011 +0100 +++ b/jdk/src/share/classes/sun/nio/cs/ThreadLocalCoders.java Thu Jul 28 13:34:31 2011 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,6 @@ package sun.nio.cs; -import java.nio.*; import java.nio.charset.*; @@ -41,7 +40,7 @@ private static abstract class Cache { // Thread-local reference to array of cached objects, in LRU order - private ThreadLocal cache = new ThreadLocal(); + private ThreadLocal cache = new ThreadLocal<>(); private final int size; Cache(int size) { @@ -60,7 +59,7 @@ abstract boolean hasName(Object ob, Object name); Object forName(Object name) { - Object[] oa = (Object[])cache.get(); + Object[] oa = cache.get(); if (oa == null) { oa = new Object[size]; cache.set(oa);