Source:
<code>public void checkNullability( final Object[] values, final EntityPersister persister, final NullabilityCheckType checkType) { if ( checkNullability ) { final boolean[] nullability = persister.getPropertyNullability(); final boolean[] checkability = checkType == NullabilityCheckType.CREATE ? persister.getPropertyInsertability() : persister.getPropertyUpdateability(); final Type[] propertyTypes = persister.getPropertyTypes(); final InMemoryValueGenerationStrategy[] inMemoryValueGenerationStrategies = persister.getEntityMetamodel().getInMemoryValueGenerationStrategies(); boolean validValueGenerationStrategyCount = inMemoryValueGenerationStrategies.length == values.length; for ( int i = 0; i < values.length; i++ ) { if ( checkability[i] && values[i] != LazyPropertyInitializer.UNFETCHED_PROPERTY && <START> ( validValueGenerationStrategyCount && GenerationTiming.NEVER == inMemoryValueGenerationStrategies[i] <END> .getGenerationTiming() ) ) { final Object value = values[i]; if ( !nullability[i] && value == null ) { throw new PropertyValueException( "not-null property references a null or transient value", persister.getEntityName(), persister.getPropertyNames()[i] ); } else if ( value != null ) { final String breakProperties = checkSubElementsNullability( propertyTypes[i], value ); if ( breakProperties != null ) { throw new PropertyValueException( "not-null property references a null or transient value", persister.getEntityName(), buildPropertyPath( persister.getPropertyNames()[i], breakProperties ) ); } } } } } }</code><technical_language>want this expression return false if ! validValueGenerationStrategyCount ? Otherwise: suggestion ( !validValueGenerationStrategyCount || GenerationTiming.NEVER == inMemoryValueGenerationStrategies[i] kind of odd situation way, inMemoryValueGenerationStrategies.length == values.length..</technical_language>

Target:
public void checkNullability( final Object[] values, final EntityPersister persister, final NullabilityCheckType checkType) { if ( checkNullability ) { final boolean[] nullability = persister.getPropertyNullability(); final boolean[] checkability = checkType == NullabilityCheckType.CREATE ? persister.getPropertyInsertability() : persister.getPropertyUpdateability(); final Type[] propertyTypes = persister.getPropertyTypes(); final InMemoryValueGenerationStrategy[] inMemoryValueGenerationStrategies = persister.getEntityMetamodel().getInMemoryValueGenerationStrategies(); for ( int i = 0; i < values.length; i++ ) { if ( checkability[i] && values[i] != LazyPropertyInitializer.UNFETCHED_PROPERTY && GenerationTiming.NEVER == inMemoryValueGenerationStrategies[i].getGenerationTiming() ) { final Object value = values[i]; if ( !nullability[i] && value == null ) { throw new PropertyValueException( "not-null property references a null or transient value", persister.getEntityName(), persister.getPropertyNames()[i] ); } else if ( value != null ) { final String breakProperties = checkSubElementsNullability( propertyTypes[i], value ); if ( breakProperties != null ) { throw new PropertyValueException( "not-null property references a null or transient value", persister.getEntityName(), buildPropertyPath( persister.getPropertyNames()[i], breakProperties ) ); } } } } } }