Prior to this commit, AbstractAutowireCapableBeanFactory's invokeCustomInitMethod() method invoked ClassUtils.getInterfaceMethodIfPossible() even if the security manager was not being used. This commit ensures that getInterfaceMethodIfPossible() is only invoked if the security manager is used. Closes gh-23323