mx4j/src/core/mx4j/remote/rmi RMIMarshaller.java,1.12,1.13
Simone Bordet <[email protected]> Sun, 21 Nov 2004 14:19:32 +0000
| Newsgroups | gmane.comp.java.mx4j.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mx4j/mx4j/src/core/mx4j/remote/rmi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24610/src/core/mx4j/remote/rmi
Modified Files:
RMIMarshaller.java
Log Message:
Fix for when mx4j is in bootclasspath, allowing a null classloader to unmarshal arguments
Index: RMIMarshaller.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/mx4j/remote/rmi/RMIMarshaller.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** RMIMarshaller.java 13 Nov 2004 16:38:35 -0000 1.12
--- RMIMarshaller.java 21 Nov 2004 14:19:29 -0000 1.13
***************
*** 139,163 ****
private static Object unmarshal(MarshalledObject object, ClassLoader loader) throws IOException
{
! if (loader != null)
{
! ClassLoader old = Thread.currentThread().getContextClassLoader();
! try
! {
! setContextClassLoader(loader);
! return unmarshal(object);
! }
! catch (IOException x)
! {
! throw x;
! }
! catch (ClassNotFoundException ignored)
! {
! }
! finally
! {
! setContextClassLoader(old);
! }
}
! throw new IOException("Cannot unmarshal " + object);
}
--- 139,164 ----
private static Object unmarshal(MarshalledObject object, ClassLoader loader) throws IOException
{
! // if (loader != null)
! // {
! ClassLoader old = Thread.currentThread().getContextClassLoader();
! try
{
! setContextClassLoader(loader);
! return unmarshal(object);
}
! catch (IOException x)
! {
! throw x;
! }
! catch (ClassNotFoundException ignored)
! {
! throw new IOException(ignored.toString());
! }
! finally
! {
! setContextClassLoader(old);
! }
! // }
! // throw new IOException("Cannot unmarshal " + object);
}
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8