Bug 1062 - Disallow implicit serviceref creation.
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / operations / getconfig / GetConfig.java
index 11d3e32edf6748fe811a9a25174330afae5b1d28..03e0176e32892b034b413443d3edf35cca7afb3c 100644 (file)
@@ -66,16 +66,17 @@ public class GetConfig extends AbstractConfigNetconfOperation {
         Datastore sourceDatastore = Datastore.valueOf(sourceParsed);
 
         // Filter option - unsupported
-        if (xml.getChildElements(XmlNetconfConstants.FILTER).size() != 0)
+        if (xml.getChildElements(XmlNetconfConstants.FILTER).size() != 0){
             throw new UnsupportedOperationException("Unsupported option " + XmlNetconfConstants.FILTER + " for "
                     + GET_CONFIG);
+        }
 
         return sourceDatastore;
 
     }
 
     private Element getResponseInternal(final Document document, final ConfigRegistryClient configRegistryClient,
-            final Datastore source) throws NetconfDocumentedException {
+            final Datastore source) {
         Element dataElement = XmlUtil.createElement(document, XmlNetconfConstants.DATA_KEY, Optional.<String>absent());
         final Set<ObjectName> instances = Datastore.getInstanceQueryStrategy(source, this.transactionProvider)
                 .queryInstances(configRegistryClient);
@@ -104,6 +105,6 @@ public class GetConfig extends AbstractConfigNetconfOperation {
     public Element handleWithNoSubsequentOperations(Document document, XmlElement xml) throws NetconfDocumentedException {
         Datastore source;
         source = fromXml(xml);
-        return getResponseInternal(document, configRegistryClient, source);
+        return getResponseInternal(document, getConfigRegistryClient(), source);
     }
 }