src/share/classes/javax/imageio/metadata/IIOMetadata.java
Print this page
rev 9293 : 8034998: Fix raw and unchecked lint warnings in javax.imageio
Reviewed-by:
*** 393,411 ****
}
if (formatClassName == null) {
throw new IllegalArgumentException("Unsupported format name");
}
try {
! Class cls = null;
final Object o = this;
// firstly we try to use classloader used for loading
// the IIOMetadata implemantation for this plugin.
! ClassLoader loader = (ClassLoader)
java.security.AccessController.doPrivileged(
! new java.security.PrivilegedAction() {
! public Object run() {
return o.getClass().getClassLoader();
}
});
try {
--- 393,411 ----
}
if (formatClassName == null) {
throw new IllegalArgumentException("Unsupported format name");
}
try {
! Class<?> cls = null;
final Object o = this;
// firstly we try to use classloader used for loading
// the IIOMetadata implemantation for this plugin.
! ClassLoader loader =
java.security.AccessController.doPrivileged(
! new java.security.PrivilegedAction<ClassLoader>() {
! public ClassLoader run() {
return o.getClass().getClassLoader();
}
});
try {
*** 413,426 ****
loader);
} catch (ClassNotFoundException e) {
// we failed to load IIOMetadataFormat class by
// using IIOMetadata classloader.Next try is to
// use thread context classloader.
! loader = (ClassLoader)
java.security.AccessController.doPrivileged(
! new java.security.PrivilegedAction() {
! public Object run() {
return Thread.currentThread().getContextClassLoader();
}
});
try {
cls = Class.forName(formatClassName, true,
--- 413,426 ----
loader);
} catch (ClassNotFoundException e) {
// we failed to load IIOMetadataFormat class by
// using IIOMetadata classloader.Next try is to
// use thread context classloader.
! loader =
java.security.AccessController.doPrivileged(
! new java.security.PrivilegedAction<ClassLoader>() {
! public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
}
});
try {
cls = Class.forName(formatClassName, true,