803 |
if (sm == null) |
if (sm == null) |
804 |
sm = new SecurityManager () {}; |
sm = new SecurityManager () {}; |
805 |
|
|
806 |
return currentClassLoader(sm); |
return VMObjectInputStream.currentClassLoader(sm); |
807 |
} |
} |
808 |
|
|
809 |
/** |
/** |
895 |
if (sm == null) |
if (sm == null) |
896 |
sm = new SecurityManager() {}; |
sm = new SecurityManager() {}; |
897 |
|
|
898 |
ClassLoader cl = currentClassLoader(sm); |
ClassLoader cl = VMObjectInputStream.currentClassLoader(sm); |
899 |
|
|
900 |
Class<?>[] clss = new Class<?>[intfs.length]; |
Class<?>[] clss = new Class<?>[intfs.length]; |
901 |
if(cl == null) |
if(cl == null) |
1845 |
throw new InvalidClassException("Missing accessible no-arg base class constructor for " + real_class.getName()); |
throw new InvalidClassException("Missing accessible no-arg base class constructor for " + real_class.getName()); |
1846 |
try |
try |
1847 |
{ |
{ |
1848 |
return allocateObject(real_class, constructor.getDeclaringClass(), constructor); |
return VMObjectInputStream.allocateObject(real_class, constructor.getDeclaringClass(), constructor); |
1849 |
} |
} |
1850 |
catch (InstantiationException e) |
catch (InstantiationException e) |
1851 |
{ |
{ |
1873 |
} |
} |
1874 |
} |
} |
1875 |
|
|
|
/** |
|
|
* This native method is used to get access to the protected method |
|
|
* of the same name in SecurityManger. |
|
|
* |
|
|
* @param sm SecurityManager instance which should be called. |
|
|
* @return The current class loader in the calling stack. |
|
|
*/ |
|
|
private static native ClassLoader currentClassLoader (SecurityManager sm); |
|
|
|
|
1876 |
private void callReadMethod (Method readObject, Class klass, Object obj) |
private void callReadMethod (Method readObject, Class klass, Object obj) |
1877 |
throws ClassNotFoundException, IOException |
throws ClassNotFoundException, IOException |
1878 |
{ |
{ |
1904 |
prereadFields = null; |
prereadFields = null; |
1905 |
} |
} |
1906 |
|
|
|
private native Object allocateObject(Class clazz, Class constr_clazz, Constructor constructor) |
|
|
throws InstantiationException; |
|
|
|
|
1907 |
private static final int BUFFER_SIZE = 1024; |
private static final int BUFFER_SIZE = 1024; |
1908 |
|
|
1909 |
private DataInputStream realInputStream; |
private DataInputStream realInputStream; |