< prev index next >
src/java.rmi/share/classes/java/rmi/server/RemoteObject.java
Print this page
*** 437,458 ****
*/
String internalRefClassName =
RemoteRef.packagePrefix + "." + refClassName;
Class<?> refClass = Class.forName(internalRefClassName);
try {
! ref = (RemoteRef) refClass.newInstance();
/*
* If this step fails, assume we found an internal
* class that is not meant to be a serializable ref
* type.
*/
! } catch (InstantiationException e) {
! throw new ClassNotFoundException(internalRefClassName, e);
! } catch (IllegalAccessException e) {
! throw new ClassNotFoundException(internalRefClassName, e);
! } catch (ClassCastException e) {
throw new ClassNotFoundException(internalRefClassName, e);
}
ref.readExternal(in);
}
}
--- 437,456 ----
*/
String internalRefClassName =
RemoteRef.packagePrefix + "." + refClassName;
Class<?> refClass = Class.forName(internalRefClassName);
try {
! @SuppressWarnings("deprecation")
! Object tmp = refClass.newInstance();
! ref = (RemoteRef) tmp;
/*
* If this step fails, assume we found an internal
* class that is not meant to be a serializable ref
* type.
*/
! } catch (InstantiationException | IllegalAccessException | ClassCastException e) {
throw new ClassNotFoundException(internalRefClassName, e);
}
ref.readExternal(in);
}
}
< prev index next >