Remove unused exceptions
[netconf.git] / netconf / netconf-impl / src / main / java / org / opendaylight / netconf / impl / osgi / NetconfCapabilityMonitoringService.java
index 6259ba28a3af10d84eaf787c28ac09dc6b10b3c0..fd520a363e9a4b4b9a9050ca79c70f2bfce03b12 100644 (file)
@@ -171,7 +171,7 @@ class NetconfCapabilityMonitoringService implements CapabilityListener, AutoClos
 
                 builder.setLocation(transformLocations(cap.getLocation()));
 
-                builder.setKey(new SchemaKey(Yang.class, identifier, version));
+                builder.withKey(new SchemaKey(Yang.class, identifier, version));
 
                 schemas.add(builder.build());
             }
@@ -205,7 +205,7 @@ class NetconfCapabilityMonitoringService implements CapabilityListener, AutoClos
     }
 
     @Override
-    public synchronized void close() throws Exception {
+    public synchronized void close() {
         listeners.clear();
         capabilities.clear();
     }
@@ -234,14 +234,14 @@ class NetconfCapabilityMonitoringService implements CapabilityListener, AutoClos
     private static NetconfCapabilityChange computeDiff(final Set<Capability> added, final Set<Capability> removed) {
         final NetconfCapabilityChangeBuilder netconfCapabilityChangeBuilder = new NetconfCapabilityChangeBuilder();
         netconfCapabilityChangeBuilder
-                .setChangedBy(new ChangedByBuilder().setServerOrUser(new ServerBuilder().setServer(true).build())
-                        .build());
+                .setChangedBy(new ChangedByBuilder().setServerOrUser(
+                    new ServerBuilder().setServer(Boolean.TRUE).build()).build());
         netconfCapabilityChangeBuilder.setDeletedCapability(Lists.newArrayList(Collections2
                 .transform(removed, CAPABILITY_TO_URI)));
         netconfCapabilityChangeBuilder.setAddedCapability(Lists.newArrayList(Collections2
                 .transform(added, CAPABILITY_TO_URI)));
         // TODO modified should be computed ... but why ?
-        netconfCapabilityChangeBuilder.setModifiedCapability(Collections.<Uri>emptyList());
+        netconfCapabilityChangeBuilder.setModifiedCapability(Collections.emptyList());
         return netconfCapabilityChangeBuilder.build();
     }