HHH-18770 Check if the monitoring event was null
When the JFR partial flush event is disabled (for instance when JFR is entirely disabled) beginPartialFlushEvent() will return a null event.
This commit is contained in:
parent
bdc44dbf4c
commit
f58d5af27a
|
@ -454,7 +454,7 @@ public class JfrEventManager implements EventManager {
|
|||
public void completePartialFlushEvent(
|
||||
HibernateMonitoringEvent hibernateMonitoringEvent,
|
||||
AutoFlushEvent event) {
|
||||
if ( event != null ) {
|
||||
if ( event != null && hibernateMonitoringEvent != null) {
|
||||
final PartialFlushEvent flushEvent = (PartialFlushEvent) hibernateMonitoringEvent;
|
||||
flushEvent.end();
|
||||
if ( flushEvent.shouldCommit() ) {
|
||||
|
|
Loading…
Reference in New Issue