equal
deleted
inserted
replaced
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 |