@@ -70,32 +70,49 @@ public void connectionPoolClosed(final ConnectionPoolEvent event) {
70
70
71
71
@ Override
72
72
public void connectionCheckedOut (final ConnectionEvent event ) {
73
- getStatistics (event ).connectionCheckedOut (event );
73
+ ConnectionPoolStatistics statistics = getStatistics (event );
74
+ if (statistics != null ) {
75
+ statistics .connectionCheckedOut (event );
76
+ }
74
77
}
75
78
76
79
@ Override
77
80
public void connectionCheckedIn (final ConnectionEvent event ) {
78
- getStatistics (event ).connectionCheckedIn (event );
81
+ ConnectionPoolStatistics statistics = getStatistics (event );
82
+ if (statistics != null ) {
83
+ statistics .connectionCheckedIn (event );
84
+ }
79
85
}
80
86
81
87
@ Override
82
88
public void waitQueueEntered (final ConnectionPoolWaitQueueEvent event ) {
83
- getStatistics (event ).waitQueueEntered (event );
89
+ ConnectionPoolListener statistics = getStatistics (event );
90
+ if (statistics != null ) {
91
+ statistics .waitQueueEntered (event );
92
+ }
84
93
}
85
94
86
95
@ Override
87
96
public void waitQueueExited (final ConnectionPoolWaitQueueEvent event ) {
88
- getStatistics (event ).waitQueueExited (event );
97
+ ConnectionPoolListener statistics = getStatistics (event );
98
+ if (statistics != null ) {
99
+ statistics .waitQueueExited (event );
100
+ }
89
101
}
90
-
91
102
@ Override
92
103
public void connectionAdded (final ConnectionEvent event ) {
93
- getStatistics (event ).connectionAdded (event );
104
+ ConnectionPoolStatistics statistics = getStatistics (event );
105
+ if (statistics != null ) {
106
+ statistics .connectionAdded (event );
107
+ }
94
108
}
95
109
96
110
@ Override
97
111
public void connectionRemoved (final ConnectionEvent event ) {
98
- getStatistics (event ).connectionRemoved (event );
112
+ ConnectionPoolStatistics statistics = getStatistics (event );
113
+ if (statistics != null ) {
114
+ statistics .connectionRemoved (event );
115
+ }
99
116
}
100
117
101
118
private ConnectionPoolStatistics getStatistics (final ConnectionEvent event ) {
0 commit comments