Protect against NPE when escaping LiveBeansView

Issue: SPR-12252
This commit is contained in:
Phillip Webb 2014-09-26 12:32:04 -07:00
parent ceb79c9bee
commit 3827e048d1
1 changed files with 3 additions and 0 deletions

View File

@ -220,6 +220,9 @@ public class LiveBeansView implements LiveBeansViewMBean, ApplicationContextAwar
*/
protected String getEscapedResourceDescription(BeanDefinition bd) {
String resourceDescription = bd.getResourceDescription();
if (resourceDescription == null) {
return null;
}
StringBuilder result = new StringBuilder(resourceDescription.length() + 16);
for (int i = 0; i < resourceDescription.length(); i++) {
char character = resourceDescription.charAt(i);