mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 08:35:13 +00:00
fix a potential source of NPEs
(though this code path isn't working anyway for other reasons)
This commit is contained in:
parent
6596389e55
commit
85bfed78c3
@ -79,30 +79,31 @@ public void beforeStatement(
|
||||
SharedSessionContractImplementor session) {
|
||||
final BindingGroup bindingGroup = bindingGroupMap.get( statementDetails.getMutatingTableDetails().getTableName() );
|
||||
if ( bindingGroup == null ) {
|
||||
return;
|
||||
statementDetails.resolveStatement();
|
||||
}
|
||||
else {
|
||||
bindingGroup.forEachBinding( (binding) -> {
|
||||
try {
|
||||
binding.getValueBinder().bind(
|
||||
statementDetails.resolveStatement(),
|
||||
binding.getValue(),
|
||||
binding.getPosition(),
|
||||
session
|
||||
);
|
||||
}
|
||||
catch (SQLException e) {
|
||||
throw session.getJdbcServices().getSqlExceptionHelper().convert(
|
||||
e,
|
||||
String.format(
|
||||
Locale.ROOT,
|
||||
"Unable to bind parameter #%s - %s",
|
||||
binding.getPosition(),
|
||||
binding.getValue()
|
||||
)
|
||||
);
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
bindingGroup.forEachBinding( (binding) -> {
|
||||
try {
|
||||
binding.getValueBinder().bind(
|
||||
statementDetails.resolveStatement(),
|
||||
binding.getValue(),
|
||||
binding.getPosition(),
|
||||
session
|
||||
);
|
||||
}
|
||||
catch (SQLException e) {
|
||||
throw session.getJdbcServices().getSqlExceptionHelper().convert(
|
||||
e,
|
||||
String.format(
|
||||
Locale.ROOT,
|
||||
"Unable to bind parameter #%s - %s",
|
||||
binding.getPosition(),
|
||||
binding.getValue()
|
||||
)
|
||||
);
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user