Further refactoring to simplify the logic in the AbstractRegionParser.isSubRegion method.

This commit is contained in:
John Blum
2013-11-01 13:56:06 -07:00
parent 5766fa070d
commit e6e1573f0c

View File

@@ -52,8 +52,8 @@ abstract class AbstractRegionParser extends AbstractSingleBeanDefinitionParser {
protected abstract Class<?> getRegionFactoryClass();
protected boolean isSubRegion(Element element) {
return (element.getParentNode().getLocalName() != null
&& element.getParentNode().getLocalName().endsWith("region"));
String localName = element.getParentNode().getLocalName();
return (localName != null && localName.endsWith("region"));
}
@Override