From: <lk...@us...> - 2005-03-26 06:20:34
|
Update of /cvsroot/openorb/OpenORB/src/main/org/openorb/orb/rmi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24611 Modified Files: DeserializationKernelSun15.java Log Message: make sure the code compiles on JDK 1.3 Index: DeserializationKernelSun15.java =================================================================== RCS file: /cvsroot/openorb/OpenORB/src/main/org/openorb/orb/rmi/DeserializationKernelSun15.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DeserializationKernelSun15.java 28 Feb 2005 10:08:45 -0000 1.1 +++ DeserializationKernelSun15.java 26 Mar 2005 06:20:10 -0000 1.2 @@ -30,7 +30,7 @@ static { Method method = null; - try + try { method = ObjectStreamClass.class.getDeclaredMethod( "newInstance", new Class[]{} ); method.setAccessible( true ); @@ -95,17 +95,19 @@ } catch ( final InvocationTargetException e ) { - if ( e.getCause() instanceof InstantiationException ) + // TODO: use getCause() after converting OpenORB to JDK 1.4 + final Throwable cause = e.getTargetException(); + if ( cause instanceof InstantiationException ) { - throw ( InstantiationException ) e.getTargetException(); + throw ( InstantiationException ) cause; } - if ( e.getCause() instanceof IllegalAccessException ) + if ( cause instanceof IllegalAccessException ) { - throw ( IllegalAccessException ) e.getTargetException(); + throw ( IllegalAccessException ) cause; } throw ExceptionTool.initCause( new Error( "Unexpected exception (" - + e.getTargetException() + ")" ), e.getCause() ); + + cause + ")" ), cause ); } } |