aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-07-14 06:05:42 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2003-07-14 06:05:42 +0000
commit3a009999ba155c613c5545fd752e54a093aec05b (patch)
treee2296bc95019c6ef6dbf5c83c864ed6c6403021c /libjava
parent6a71677713a891ed583f065f21e40e3d4d89562c (diff)
downloadgcc-3a009999ba155c613c5545fd752e54a093aec05b.zip
gcc-3a009999ba155c613c5545fd752e54a093aec05b.tar.gz
gcc-3a009999ba155c613c5545fd752e54a093aec05b.tar.bz2
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
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/gnu/java/rmi/server/UnicastServerRef.java11
2 files changed, 13 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index cc46804..baa5810 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,10 @@
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,
java/beans/PropertyEditorManager.java,
javax/naming/CompoundName.java,
diff --git a/libjava/gnu/java/rmi/server/UnicastServerRef.java b/libjava/gnu/java/rmi/server/UnicastServerRef.java
index a3a999f..e2f38ff 100644
--- a/libjava/gnu/java/rmi/server/UnicastServerRef.java
+++ b/libjava/gnu/java/rmi/server/UnicastServerRef.java
@@ -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)
}
}
+
+