return ret;
}
- @SuppressWarnings("unchecked")
private void updateNodes(
final DataObjectModification<Tables> table,
final UnsignedInteger peerUuid,
final DataObjectModification<Attributes> attUpdate = table.getModifiedChildContainer(Attributes.class);
- if (attUpdate != null && attUpdate.getDataAfter() != null) {
+ if (attUpdate != null) {
final Attributes newAttValue = attUpdate.getDataAfter();
- LOG.trace("Uptodate found for {}", newAttValue);
- tx.put(LogicalDatastoreType.OPERATIONAL, this.locRibTableIID.child(Attributes.class), newAttValue);
+ if (newAttValue != null) {
+ LOG.trace("Uptodate found for {}", newAttValue);
+ tx.put(LogicalDatastoreType.OPERATIONAL, this.locRibTableIID.child(Attributes.class), newAttValue);
+ }
}
- final DataObjectModification routesChangesContainer
- = table.getModifiedChildContainer((Class) this.ribSupport.routesContainerClass());
+ final DataObjectModification<S> routesChangesContainer
+ = table.getModifiedChildContainer(ribSupport.routesCaseClass(), ribSupport.routesContainerClass());
if (routesChangesContainer == null) {
return;
}
}
private void updateRoutesEntries(
- final Collection<DataObjectModification<? extends DataObject>> routeChanges,
+ final Collection<? extends DataObjectModification<? extends DataObject>> collection,
final UnsignedInteger routerId,
final Map<RouteUpdateKey, RouteEntry<C,S,R,I>> routes
) {
- for (final DataObjectModification<? extends DataObject> route : routeChanges) {
+ for (final DataObjectModification<? extends DataObject> route : collection) {
final R newRoute = (R) route.getDataAfter();
final R oldRoute = (R) route.getDataBefore();
String routeKey;