File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
operator/src/main/java/oracle/kubernetes/operator/helpers Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -31,18 +31,24 @@ public class ClientPool extends Pool<ApiClient> {
31
31
public static void initialize (ThreadFactory threadFactory ) {
32
32
ClientPool .threadFactory =
33
33
(r ) -> {
34
- return threadFactory .newThread (
35
- () -> {
36
- try {
37
- r .run ();
38
- } catch (Throwable t ) {
39
- // These will almost always be spurious exceptions
40
- LOGGER .fine (MessageKeys .EXCEPTION , t );
41
- }
42
- });
34
+ return threadFactory .newThread (wrapRunnable (r ));
43
35
};
44
36
}
45
37
38
+ private static Runnable wrapRunnable (Runnable r ) {
39
+ return new Runnable () {
40
+ @ Override
41
+ public void run () {
42
+ try {
43
+ r .run ();
44
+ } catch (Throwable t ) {
45
+ // These will almost always be spurious exceptions
46
+ LOGGER .fine (MessageKeys .EXCEPTION , t );
47
+ }
48
+ }
49
+ };
50
+ }
51
+
46
52
public static ClientPool getInstance () {
47
53
return SINGLETON ;
48
54
}
You can’t perform that action at this time.
0 commit comments