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(
|
public void completePartialFlushEvent(
|
||||||
HibernateMonitoringEvent hibernateMonitoringEvent,
|
HibernateMonitoringEvent hibernateMonitoringEvent,
|
||||||
AutoFlushEvent event) {
|
AutoFlushEvent event) {
|
||||||
if ( event != null ) {
|
if ( event != null && hibernateMonitoringEvent != null) {
|
||||||
final PartialFlushEvent flushEvent = (PartialFlushEvent) hibernateMonitoringEvent;
|
final PartialFlushEvent flushEvent = (PartialFlushEvent) hibernateMonitoringEvent;
|
||||||
flushEvent.end();
|
flushEvent.end();
|
||||||
if ( flushEvent.shouldCommit() ) {
|
if ( flushEvent.shouldCommit() ) {
|
||||||
|
|
Loading…
Reference in New Issue