[hibernate-commits] Hibernate SVN: r18630 - core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Tue Jan 26 09:51:55 EST 2010
Author: smarlow at redhat.com
Date: 2010-01-26 09:51:54 -0500 (Tue, 26 Jan 2010)
New Revision: 18630
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/AbstractIdentifiableType.java
Log:
HHH-4846 fix NPE and also address JCTS-946
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/AbstractIdentifiableType.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/AbstractIdentifiableType.java 2010-01-26 13:39:26 UTC (rev 18629)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/AbstractIdentifiableType.java 2010-01-26 14:51:54 UTC (rev 18630)
@@ -241,10 +241,8 @@
* super class.
*/
protected void checkDeclaredVersion() {
- if ( version == null ) {
- if ( getSupertype() != null && getSupertype().hasVersionAttribute() ) {
- throw new IllegalArgumentException( "The version attribute is not declared on this type" );
- }
+ if ( version == null || ( getSupertype() != null && getSupertype().hasVersionAttribute() )) {
+ throw new IllegalArgumentException( "The version attribute is not declared on this type" );
}
}
More information about the hibernate-commits
mailing list