UnicastServerRef.java: New version from classpath.

2003-07-14  Michael Koch  <konqueror@gmx.de>

	* gnu/java/rmi/server/UnicastServerRef.java:
	New version from classpath.

From-SVN: r69322
This commit is contained in:
Michael Koch 2003-07-14 06:05:42 +00:00 committed by Michael Koch
parent 6a71677713
commit 3a009999ba
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2003-07-14 Michael Koch <konqueror@gmx.de>
* gnu/java/rmi/server/UnicastServerRef.java:
New version from classpath.
2003-07-14 Michael Koch <konqueror@gmx.de>
* java/awt/image/MemoryImageSource.java,

View file

@ -138,8 +138,9 @@ public boolean unexportObject(Remote obj, boolean force) {
private Object getHelperClass(Class cls, String type) {
try {
String classname = cls.getName();
ClassLoader cl = cls.getClassLoader(); //DONT use "Class scls = Class.forName(classname + type);"
Class scls = cl.loadClass(classname + type);
ClassLoader cl = cls.getClassLoader();
Class scls = cl == null ? Class.forName(classname + type)
: cl.loadClass(classname + type);
if (type.equals("_Stub")) {
try {
// JDK 1.2 stubs
@ -225,7 +226,9 @@ public Object incomingMessageCall(UnicastConnection conn, int method, long hash)
* lets us know that.
*/
try {
args[i] = in.readObject();
// need to handle primitive types
args[i] = ((RMIObjectInputStream)in).readValue(meth.getParameterTypes()[i]);
}
catch (Exception t) {
t.printStackTrace();
@ -257,3 +260,5 @@ public Object incomingMessageCall(UnicastConnection conn, int method, long hash)
}
}