< prev index next >
src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template
Print this page
@@ -108,14 +108,15 @@
return cs;
}
// Instantiate the charset and cache it
try {
- Class<?> c = Class.forName(packagePrefix + "." + cln,
+ @SuppressWarnings("deprecation")
+ Object o = Class.forName(packagePrefix + "." + cln,
true,
- this.getClass().getClassLoader());
- cs = (Charset)c.newInstance();
+ this.getClass().getClassLoader()).newInstance();
+ cs = (Charset)o;
cache.put(csn, cs);
return cs;
} catch (ClassNotFoundException |
IllegalAccessException |
InstantiationException x) {
< prev index next >