jdk/src/share/classes/sun/io/Converters.java
changeset 7803 56bc97d69d93
parent 5506 202f599c92aa
child 7816 55a18147b4bf
equal deleted inserted replaced
7802:74f2ee2b62ba 7803:56bc97d69d93
   118         return null;
   118         return null;
   119     }
   119     }
   120 
   120 
   121     private static Class<?> cache(int type, Object encoding, Class<?> c) {
   121     private static Class<?> cache(int type, Object encoding, Class<?> c) {
   122         SoftReference<Object[]>[] srs = classCache[type];
   122         SoftReference<Object[]>[] srs = classCache[type];
   123         srs[CACHE_SIZE - 1] = new SoftReference<Object[]>(new Object[] { c, encoding });
   123         srs[CACHE_SIZE - 1] = new SoftReference<>(new Object[] { c, encoding });
   124         moveToFront(srs, CACHE_SIZE - 1);
   124         moveToFront(srs, CACHE_SIZE - 1);
   125         return c;
   125         return c;
   126     }
   126     }
   127 
   127 
   128     /* Used to avoid doing expensive charset lookups for charsets that are not
   128     /* Used to avoid doing expensive charset lookups for charsets that are not