import org.w3c.dom.Document;
import org.w3c.dom.Element;
-public class NetconfMessageTransformUtil {
+public final class NetconfMessageTransformUtil {
private static final Logger LOG = LoggerFactory.getLogger(NetconfMessageTransformUtil.class);
} else {
final Entry<QName, ModifyAction> modifyOperation = operation.isPresent()
? new AbstractMap.SimpleEntry<>(NETCONF_OPERATION_QNAME, operation.get()) : null;
- configContent = ImmutableNodes
- .fromInstanceId(ctx, dataPath, lastChildOverride, Optional.fromNullable(modifyOperation));
+ configContent = ImmutableNodes.fromInstanceId(ctx, dataPath, lastChildOverride.toJavaUtil(),
+ java.util.Optional.ofNullable(modifyOperation));
}
final Element element = XmlUtil.createElement(BLANK_DOCUMENT, NETCONF_CONFIG_QNAME.getLocalName(),
NetconfNotification.RFC3339_DATE_PARSER.apply(eventTimeElement.getTextContent()),
notificationElement);
} catch (final DocumentedException e) {
- throw new IllegalArgumentException("Notification payload does not contain " + EVENT_TIME + " " + message);
+ throw new IllegalArgumentException("Notification payload does not contain " + EVENT_TIME + " " + message,
+ e);
} catch (final DateTimeParseException e) {
LOG.warn("Unable to parse event time from {}. Setting time to {}", eventTimeElement,
NetconfNotification.UNKNOWN_EVENT_TIME, e);