@Nullable private Method determineDestroyMethod(String name) { try { if (System.getSecurityManager() != null) { return AccessController.doPrivileged((PrivilegedAction<Method>) () -> findDestroyMethod(name)); } else { return findDestroyMethod(name); } } catch (IllegalArgumentException ex) { throw new BeanDefinitionValidationException("Could not find unique destroy method on bean with name '" + this.beanName + ": " + ex.getMessage()); } }
@Nullable private Method determineDestroyMethod(String name) { try { if (System.getSecurityManager() != null) { return AccessController.doPrivileged((PrivilegedAction<Method>) () -> findDestroyMethod(name)); } else { return findDestroyMethod(name); } } catch (IllegalArgumentException ex) { throw new BeanDefinitionValidationException("Could not find unique destroy method on bean with name '" + this.beanName + ": " + ex.getMessage()); } }
private Method determineDestroyMethod() { try { if (System.getSecurityManager() != null) { return AccessController.doPrivileged(new PrivilegedAction<Method>() { public Method run() { return findDestroyMethod(); } }); } else { return findDestroyMethod(); } } catch (IllegalArgumentException ex) { throw new BeanDefinitionValidationException("Couldn't find a unique destroy method on bean with name '" + this.beanName + ": " + ex.getMessage()); } }