Minor refactoring to simplify the logic in the org.springframework.data.gemfire.config.AbstractRegionParser.isSubRegion(:Element) method. In addition, added test cases in the newly created AbstractRegionParserTest class.
This commit is contained in:
@@ -52,7 +52,8 @@ abstract class AbstractRegionParser extends AbstractSingleBeanDefinitionParser {
|
||||
protected abstract Class<?> getRegionFactoryClass();
|
||||
|
||||
protected boolean isSubRegion(Element element) {
|
||||
return element.getParentNode().getLocalName() == null? false: element.getParentNode().getLocalName().endsWith("region");
|
||||
return (element.getParentNode().getLocalName() != null
|
||||
&& element.getParentNode().getLocalName().endsWith("region"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user