File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -360,10 +360,17 @@ private ControllerExecution(ExecutionScope<R> executionScope) {
360
360
@ Override
361
361
public void run () {
362
362
// change thread name for easier debugging
363
- Thread .currentThread ().setName ("EventHandler-" + controllerName );
364
- PostExecutionControl <R > postExecutionControl =
365
- eventDispatcher .handleExecution (executionScope );
366
- eventProcessingFinished (executionScope , postExecutionControl );
363
+ final var thread = Thread .currentThread ();
364
+ final var name = thread .getName ();
365
+ try {
366
+ thread .setName ("EventHandler-" + controllerName );
367
+ PostExecutionControl <R > postExecutionControl =
368
+ eventDispatcher .handleExecution (executionScope );
369
+ eventProcessingFinished (executionScope , postExecutionControl );
370
+ } finally {
371
+ // restore original name
372
+ thread .setName (name );
373
+ }
367
374
}
368
375
369
376
@ Override
You can’t perform that action at this time.
0 commit comments