- String textContent = xmlElement.getTextContent();
-
- Preconditions.checkNotNull(textContent, "This element should contain text %s", xmlElement);
- return AttributeConfigElement.create(getAttributeIfc(), textContent);
- }
-
- /**
- * Wrapper for JavaAttribute inner element attributes (in case JavaAttribute
- * is array)
- */
- static class AttributeIfcWrapper implements AttributeIfc {
-
- private final OpenType<?> elementOpenType;
-
- public AttributeIfcWrapper(OpenType<?> elementOpenType) {
- this.elementOpenType = elementOpenType;
- }
-
- @Override
- public String getAttributeYangName() {
- return null;
+ String textContent = "";
+ try{
+ textContent = readElementContent(xmlElement);
+ }catch(IllegalStateException | NullPointerException e) {
+ // yuma sends <attribute /> for empty value instead of <attribute></attribute>
+ logger.warn("Ignoring exception caused by failure to read text element", e);