[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...
Gavin King
gavin.king at jboss.com
Mon Jun 25 21:13:28 EDT 2007
User: gavin
Date: 07/06/25 21:13:28
Modified: src/main/org/jboss/seam Entity.java
Log:
minor
Revision Changes Path
1.9 +7 -2 jboss-seam/src/main/org/jboss/seam/Entity.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Entity.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Entity.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- Entity.java 26 Jun 2007 00:59:33 -0000 1.8
+++ Entity.java 26 Jun 2007 01:13:28 -0000 1.9
@@ -183,9 +183,14 @@
throw new IllegalStateException("No application context active");
}
- clazz = Seam.getEntityClass(clazz);
+ Class entityClass = Seam.getEntityClass(clazz);
- String name = getModelName(clazz);
+ if (entityClass==null)
+ {
+ throw new IllegalArgumentException("Not an entity class: " + clazz.getName());
+ }
+
+ String name = getModelName(entityClass);
Model model = (Model) Contexts.getApplicationContext().get(name);
if ( model==null || !(model instanceof Entity) )
{
More information about the jboss-cvs-commits
mailing list