grails/grails-core — comment on commit 53a0439ad6caf028526e0cf33756ec5ff4550407
File:  line 0
By dgtized:

So... given that applicationSingleton will return null if no setApplication has been called. Should this still return applicationSingleton? The error message may be confusing, but it at least gives a way to point to why one would receive a null applicationContext. It especially makes me nervous given that there is a comment to remove applicationSingleton. Having run into this particular error through poor interactions between I believe spring-security and the resources plugin, I would agree the error is confusing, but perhaps then the exception should not be swallowed?