|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2023 the original author or authors. |
|
|
|
* Copyright 2002-2025 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -69,8 +69,14 @@ public class TaskRejectedException extends RejectedExecutionException { |
|
|
|
|
|
|
|
|
|
|
|
private static String executorDescription(Executor executor) { |
|
|
|
private static String executorDescription(Executor executor) { |
|
|
|
if (executor instanceof ExecutorService executorService) { |
|
|
|
if (executor instanceof ExecutorService executorService) { |
|
|
|
|
|
|
|
try { |
|
|
|
return "ExecutorService in " + (executorService.isShutdown() ? "shutdown" : "active") + " state"; |
|
|
|
return "ExecutorService in " + (executorService.isShutdown() ? "shutdown" : "active") + " state"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
catch (Exception ex) { |
|
|
|
|
|
|
|
// UnsupportedOperationException/IllegalStateException from ManagedExecutorService.isShutdown()
|
|
|
|
|
|
|
|
// Falling back to toString() below.
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return executor.toString(); |
|
|
|
return executor.toString(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|