Turns out Java does cast for the method reference argument before really calling a delegating method. * Revert cast method references (`((ApplicationContextAware) this.handler)::setApplicationContext`) back to lambdas - `context -> ((ApplicationContextAware) this.handler).setApplicationContext(this.applicationContext)` This way the cast is deferred until the lambda is called.