[jboss-cvs] jboss-seam/src/main/org/jboss/seam/contexts ...
Gavin King
gavin.king at jboss.com
Fri Dec 15 00:45:36 EST 2006
User: gavin
Date: 06/12/15 00:45:36
Modified: src/main/org/jboss/seam/contexts PassivatedEntity.java
Log:
better behavior in exception cases
Revision Changes Path
1.2 +6 -2 jboss-seam/src/main/org/jboss/seam/contexts/PassivatedEntity.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PassivatedEntity.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/PassivatedEntity.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- PassivatedEntity.java 13 Dec 2006 04:57:59 -0000 1.1
+++ PassivatedEntity.java 15 Dec 2006 05:45:36 -0000 1.2
@@ -115,12 +115,16 @@
{
if (id==null)
{
- throw new IllegalStateException("could not get id of: " + /*beanClass.getName() + '.' +*/ fieldName);
+ //this can happen if persist() fails in Hibernate
+ return null;
}
+ else
+ {
return new PassivatedEntity( id, entityClass, persistenceContextName, fieldName );
}
}
}
+ }
return null;
}
More information about the jboss-cvs-commits
mailing list