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
aad5355ad0
commit
46cb14089b
|
@ -452,7 +452,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