Initially SecurityWebApplicationContextUtils copied code from WebApplicationContextUtils.findWebApplicationContext to ensure compatibility with older Spring Framework versions. We no longer need to support versions of Spring Framework that old, so we should now call WebApplicationContextUtils.findWebApplicationContext

Comment From: ghost

Hello, @rwinch I have created a PR to remove the method please let me know if that was the expectation. I am trying to understand the project structure and thanks for tagging this as first-timers-only would really love to contribute to https://github.com/spring-projects/spring-security/tree/master/saml2/saml2-service-provider . Do let me know if there are other minor enhancements that I can try out first.