User: starksm Date: 01/06/22 20:32:55 Modified: src/main/org/jboss/ejb/plugins BMPPersistenceManager.java Log: Fix unsafe downcast from Throwable to Error Revision Changes Path 1.24 +19 -7 jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java Index: BMPPersistenceManager.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- BMPPersistenceManager.java 2001/06/18 20:01:23 1.23 +++ BMPPersistenceManager.java 2001/06/23 03:32:55 1.24 @@ -36,7 +36,7 @@ * @see <related> * @author <a href="mailto:[EMAIL PROTECTED]">Rickard Öberg</a> * @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a> -* @version $Revision: 1.23 $ +* @version $Revision: 1.24 $ */ public class BMPPersistenceManager implements EntityPersistenceManager @@ -160,11 +160,15 @@ { // Wrap runtime exceptions throw new EJBException((Exception)e); - } else + } + else if(e instanceof Exception) { - // Rethrow exception throw (Exception)e; } + else + { + throw (Error)e; + } } // set the id @@ -215,11 +219,15 @@ { // Wrap runtime exceptions throw new EJBException((Exception)e); - } else + } + else if(e instanceof Exception) { - // Rethrow exception throw (Exception)e; } + else + { + throw (Error)e; + } } } @@ -501,10 +509,14 @@ { // Wrap runtime exceptions throw new EJBException((Exception)e); - } else + } + else if(e instanceof Exception) { - // Rethrow exception throw (Exception)e; + } + else + { + throw (Error)e; } } _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development