HHH-17314 - Fix inconsistent Exception throwing in ParameterRecognizerImpl
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
parent
763a70f633
commit
26600ae4a6
|
@ -100,7 +100,7 @@ public class ParameterRecognizerImpl implements ParameterRecognizer {
|
|||
parameterStyle = ParameterStyle.JDBC;
|
||||
}
|
||||
else if ( parameterStyle != ParameterStyle.JDBC ) {
|
||||
throw new IllegalStateException( "Cannot mix parameter styles between JDBC-style, ordinal and named in the same query" );
|
||||
throw new ParameterRecognitionException( "Cannot mix parameter styles between JDBC-style, ordinal and named in the same query" );
|
||||
}
|
||||
|
||||
int implicitPosition = ordinalParameterImplicitPosition++;
|
||||
|
@ -164,7 +164,7 @@ public class ParameterRecognizerImpl implements ParameterRecognizer {
|
|||
parameterStyle = ParameterStyle.NAMED;
|
||||
}
|
||||
else if ( parameterStyle != ParameterStyle.NAMED ) {
|
||||
throw new IllegalStateException( "Cannot mix parameter styles between JDBC-style, ordinal and named in the same query" );
|
||||
throw new ParameterRecognitionException( "Cannot mix parameter styles between JDBC-style, ordinal and named in the same query" );
|
||||
}
|
||||
|
||||
if ( position < 1 ) {
|
||||
|
|
Loading…
Reference in New Issue