*/
package org.opendaylight.netconf.callhome.mount;
+import com.google.common.collect.Iterables;
import com.google.common.net.InetAddresses;
import java.io.IOException;
import java.net.InetSocketAddress;
private volatile Global current = null;
@Override
- public void onDataTreeChanged(@Nonnull final Collection<DataTreeModification<Global>> mods) {
- for (DataTreeModification<Global> dataTreeModification : mods) {
- current = dataTreeModification.getRootNode().getDataAfter();
+ public void onDataTreeChanged(final Collection<DataTreeModification<Global>> mods) {
+ if (!mods.isEmpty()) {
+ current = Iterables.getLast(mods).getRootNode().getDataAfter();
}
}