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