Based on https://github.com/SpringSource/spring-framework/pull/263 (cherry picked from commit 06fdfb0)
06fdfb0