diff --git a/src/main/java/hudson/remoting/MultiClassLoaderSerializer.java b/src/main/java/hudson/remoting/MultiClassLoaderSerializer.java index d3ca2c876..6dfa6dd92 100644 --- a/src/main/java/hudson/remoting/MultiClassLoaderSerializer.java +++ b/src/main/java/hudson/remoting/MultiClassLoaderSerializer.java @@ -96,11 +96,12 @@ private ClassLoader readClassLoader() throws IOException, ClassNotFoundException case TAG_LOCAL_CLASSLOADER: Object proxyObject; + int oid = readInt(); try { - proxyObject = channel.getExportedObject(readInt()); + proxyObject = channel.getExportedObject(oid); } catch (ExecutionException ex) { throw new IOException("Cannot locate RemoteClassLoader.ClassLoaderProxy(" + - code + ") in the channel exported table", ex); + oid + ") in the channel exported table", ex); } cl = ((RemoteClassLoader.ClassLoaderProxy)proxyObject).cl; classLoaders.add(cl);