HHH-4846 fix NPE and also address JCTS-946
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18630 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
2adcb4d926
commit
82c5616343
|
@ -241,10 +241,8 @@ public abstract class AbstractIdentifiableType<X>
|
|||
* 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" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue