Removed an unnecessary check.

This commit is contained in:
Chris Cranford 2016-04-28 21:01:11 -05:00 committed by Steve Ebersole
parent 35f27be589
commit ad7771d489
1 changed files with 6 additions and 8 deletions

View File

@ -236,14 +236,12 @@ public class QueryParameterBindingsImpl implements QueryParameterBindings {
public void verifyParametersBound(boolean reserveFirstParameter) {
// verify named parameters bound
for ( Map.Entry<QueryParameter, QueryParameterBinding> bindEntry : parameterBindingMap.entrySet() ) {
if ( bindEntry.getKey().getPosition() == null ) {
if ( !bindEntry.getValue().isBound() ) {
if ( bindEntry.getKey().getName() != null ) {
throw new QueryException( "Named parameter [" + bindEntry.getKey().getName() + "] not set" );
}
else {
throw new QueryException( "Parameter memento [" + bindEntry.getKey() + "] not set" );
}
if ( !bindEntry.getValue().isBound() ) {
if ( bindEntry.getKey().getName() != null ) {
throw new QueryException( "Named parameter [" + bindEntry.getKey().getName() + "] not set" );
}
else {
throw new QueryException( "Parameter memento [" + bindEntry.getKey() + "] not set" );
}
}
}