-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Lines 62 to 82 in 218a58a
| /** | |
| * {@link ScheduledThreadPoolExecutor#setRemoveOnCancelPolicy(boolean)} is not available in Java | |
| * 6 so we invoke it with reflection to be able to compile against Java 6. | |
| * | |
| * @param executor | |
| */ | |
| private static void safeSetRemoveOnCancel(ScheduledThreadPoolExecutor executor) { | |
| try { | |
| executor.getClass().getMethod("setRemoveOnCancelPolicy", boolean.class).invoke(executor, Boolean.TRUE); | |
| } catch (IllegalAccessException e) { | |
| throwSetRemoveOnCancelException(e); | |
| } catch (IllegalArgumentException e) { | |
| throwSetRemoveOnCancelException(e); | |
| } catch (InvocationTargetException e) { | |
| throwSetRemoveOnCancelException(e.getCause()); | |
| } catch (NoSuchMethodException e) { | |
| throw new SdkClientException("The request timeout feature is only available for Java 1.7 and above."); | |
| } catch (SecurityException e) { | |
| throw new SdkClientException("The request timeout feature needs additional permissions to function.", e); | |
| } | |
| } |
it was called reflectively to be compilable with Java 6, but now the minimal version Java 1.8
Line 61 in 218a58a
| <jre.version>1.8</jre.version> |
Metadata
Metadata
Assignees
Labels
No labels