- String textContent = "";
- try{
- textContent = xmlElement.getTextContent();
- }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);
- }
-
- Preconditions.checkNotNull(textContent, "This element should contain text %s", xmlElement);