796 |
if (sm == null) |
if (sm == null) |
797 |
sm = new SecurityManager () {}; |
sm = new SecurityManager () {}; |
798 |
|
|
799 |
return currentClassLoader(sm); |
return VMObjectInputStream.currentClassLoader(sm); |
800 |
} |
} |
801 |
|
|
802 |
/** |
/** |
888 |
if (sm == null) |
if (sm == null) |
889 |
sm = new SecurityManager() {}; |
sm = new SecurityManager() {}; |
890 |
|
|
891 |
ClassLoader cl = currentClassLoader(sm); |
ClassLoader cl = VMObjectInputStream.currentClassLoader(sm); |
892 |
|
|
893 |
Class[] clss = new Class[intfs.length]; |
Class[] clss = new Class[intfs.length]; |
894 |
if(cl == null) |
if(cl == null) |
1838 |
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()); |
1839 |
try |
try |
1840 |
{ |
{ |
1841 |
return allocateObject(real_class, constructor.getDeclaringClass(), constructor); |
return VMObjectInputStream.allocateObject(real_class, constructor.getDeclaringClass(), constructor); |
1842 |
} |
} |
1843 |
catch (InstantiationException e) |
catch (InstantiationException e) |
1844 |
{ |
{ |
1866 |
} |
} |
1867 |
} |
} |
1868 |
|
|
|
/** |
|
|
* 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); |
|
|
|
|
1869 |
private void callReadMethod (Method readObject, Class klass, Object obj) |
private void callReadMethod (Method readObject, Class klass, Object obj) |
1870 |
throws ClassNotFoundException, IOException |
throws ClassNotFoundException, IOException |
1871 |
{ |
{ |
1897 |
prereadFields = null; |
prereadFields = null; |
1898 |
} |
} |
1899 |
|
|
|
private native Object allocateObject(Class clazz, Class constr_clazz, Constructor constructor) |
|
|
throws InstantiationException; |
|
|
|
|
1900 |
private static final int BUFFER_SIZE = 1024; |
private static final int BUFFER_SIZE = 1024; |
1901 |
|
|
1902 |
private DataInputStream realInputStream; |
private DataInputStream realInputStream; |