Skip to content

Commit

Permalink
repo-sqale: rapo service performanceMonitor NPE fix on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Aug 27, 2021
1 parent da32e67 commit df1fd77
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1892,14 +1892,18 @@ private void recordException(

private <T extends Containerable> long registerOperationStart(
String kind, PrismContainer<T> object) {
return performanceMonitor.registerOperationStart(kind, object.getCompileTimeClass());
return registerOperationStart(kind, object.getCompileTimeClass());
}

private <T extends Containerable> long registerOperationStart(String kind, Class<T> type) {
return performanceMonitor.registerOperationStart(kind, type);
return performanceMonitor != null
? performanceMonitor.registerOperationStart(kind, type)
: -1;
}

private void registerOperationFinish(long opHandle, int attempt) {
performanceMonitor.registerOperationFinish(opHandle, attempt);
if (performanceMonitor != null) {
performanceMonitor.registerOperationFinish(opHandle, attempt);
}
}
}

0 comments on commit df1fd77

Please sign in to comment.