Merge "Fix checkstyle warnings in logback-config-loader."
authorTony Tkacik <ttkacik@cisco.com>
Wed, 26 Nov 2014 10:25:46 +0000 (10:25 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 26 Nov 2014 10:25:46 +0000 (10:25 +0000)
47 files changed:
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/CapabilityProviderImpl.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/DefaultCommitNotificationProducer.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSession.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSessionListener.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSessionListenerFactory.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSessionNegotiator.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSessionNegotiatorFactory.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/SubtreeFilter.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/CapabilityProvider.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSession.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCommit.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultGetSchema.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStartExi.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStopExi.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivator.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfMonitoringServiceImpl.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationRouterImpl.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceFactoryListenerImpl.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceSnapshotImpl.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/util/DeserializerExceptionHandler.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/AdditionalHeaderParserTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/ConcurrentClientsTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/NetconfDispatcherImplTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/NetconfMonitoringServiceImplTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/SubtreeFilterTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSessionTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCommitTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultGetSchemaTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStopExiTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivatorTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceFactoryTrackerTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/util/DeserializerExceptionHandlerTest.java
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/AbstractNetconfConfigTest.java
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfITMonitoringTest.java
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/SSLUtil.java
opendaylight/netconf/netconf-mapping-api/src/main/java/org/opendaylight/controller/netconf/mapping/api/Capability.java
opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/Get.java
opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/osgi/NetconfMonitoringActivator.java
opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/osgi/NetconfMonitoringServiceTracker.java
opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/xml/JaxBSerializer.java
opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/xml/model/MonitoringSchema.java
opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/xml/model/MonitoringSession.java
opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/xml/model/NetconfState.java
opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/xml/model/package-info.java
opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/osgi/NetconfMonitoringActivatorTest.java
opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/osgi/NetconfMonitoringOperationServiceTest.java
opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/osgi/NetconfMonitoringServiceTrackerTest.java

index 91385bab33e5102659e72c7f42a435f509b5c1fa..13cc973ba7127ccd16180dd0d0ff30c2a75acd07 100644 (file)
@@ -11,25 +11,24 @@ package org.opendaylight.controller.netconf.impl;
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
-import org.opendaylight.controller.netconf.impl.mapping.CapabilityProvider;
-import org.opendaylight.controller.netconf.mapping.api.Capability;
-import org.opendaylight.controller.netconf.mapping.api.NetconfOperationService;
-import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceSnapshot;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
+import org.opendaylight.controller.netconf.impl.mapping.CapabilityProvider;
+import org.opendaylight.controller.netconf.mapping.api.Capability;
+import org.opendaylight.controller.netconf.mapping.api.NetconfOperationService;
+import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceSnapshot;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CapabilityProviderImpl implements CapabilityProvider {
     private final NetconfOperationServiceSnapshot netconfOperationServiceSnapshot;
     private final Set<String> capabilityURIs;
 
-    private static final Logger logger = LoggerFactory.getLogger(DefaultCommitNotificationProducer.class);
+    private static final Logger LOG = LoggerFactory.getLogger(CapabilityProviderImpl.class);
 
     public CapabilityProviderImpl(NetconfOperationServiceSnapshot netconfOperationServiceSnapshot) {
         this.netconfOperationServiceSnapshot = netconfOperationServiceSnapshot;
@@ -49,7 +48,7 @@ public class CapabilityProviderImpl implements CapabilityProvider {
             for (Capability cap : caps) {
 
                 if(capabilityMap.containsKey(cap.getCapabilityUri())) {
-                    logger.debug("Duplicate capability {} from service {}", cap.getCapabilityUri(), netconfOperationService);
+                    LOG.debug("Duplicate capability {} from service {}", cap.getCapabilityUri(), netconfOperationService);
                 }
 
                 capabilityMap.put(cap.getCapabilityUri(), cap);
index 203fdf272584015f40f8bde0dd4e80b753eb51f0..ab37bac683829a95cc4e78ec24bcfb56c584faf1 100644 (file)
@@ -8,13 +8,7 @@
 
 package org.opendaylight.controller.netconf.impl;
 
-import org.opendaylight.controller.netconf.api.jmx.CommitJMXNotification;
-import org.opendaylight.controller.netconf.api.jmx.DefaultCommitOperationMXBean;
-import org.opendaylight.controller.netconf.api.jmx.NetconfJMXNotification;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Element;
-
+import java.util.Set;
 import javax.management.InstanceAlreadyExistsException;
 import javax.management.InstanceNotFoundException;
 import javax.management.MBeanRegistrationException;
@@ -22,12 +16,17 @@ import javax.management.MBeanServer;
 import javax.management.NotCompliantMBeanException;
 import javax.management.NotificationBroadcasterSupport;
 import javax.management.ObjectName;
-import java.util.Set;
+import org.opendaylight.controller.netconf.api.jmx.CommitJMXNotification;
+import org.opendaylight.controller.netconf.api.jmx.DefaultCommitOperationMXBean;
+import org.opendaylight.controller.netconf.api.jmx.NetconfJMXNotification;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Element;
 
 public class DefaultCommitNotificationProducer extends NotificationBroadcasterSupport implements
         DefaultCommitOperationMXBean, AutoCloseable {
 
-    private static final Logger logger = LoggerFactory.getLogger(DefaultCommitNotificationProducer.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DefaultCommitNotificationProducer.class);
 
     private final MBeanServer mbeanServer;
 
@@ -35,7 +34,7 @@ public class DefaultCommitNotificationProducer extends NotificationBroadcasterSu
 
     public DefaultCommitNotificationProducer(MBeanServer mBeanServer) {
         this.mbeanServer = mBeanServer;
-        logger.debug("Registering to JMX under {}", on);
+        LOG.debug("Registering to JMX under {}", on);
         registerMBean(this, mbeanServer, on);
     }
 
@@ -49,7 +48,7 @@ public class DefaultCommitNotificationProducer extends NotificationBroadcasterSu
 
     public void sendCommitNotification(String message, Element cfgSnapshot, Set<String> capabilities) {
         CommitJMXNotification notif = NetconfJMXNotification.afterCommit(this, message, cfgSnapshot, capabilities);
-        logger.debug("Notification about commit {} sent", notif);
+        LOG.debug("Notification about commit {} sent", notif);
         sendNotification(notif);
     }
 
@@ -58,7 +57,7 @@ public class DefaultCommitNotificationProducer extends NotificationBroadcasterSu
         try {
             mbeanServer.unregisterMBean(on);
         } catch (InstanceNotFoundException | MBeanRegistrationException e) {
-            logger.warn("Ignoring exception while unregistering {} as {}", this, on, e);
+            LOG.warn("Ignoring exception while unregistering {} as {}", this, on, e);
         }
     }
 }
index 7d409092b9178bcd2816c96371108930f200fe3a..ca604a4f6531c4f03d878825ac5fde5cfd360aeb 100644 (file)
@@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory;
 
 public final class NetconfServerSession extends AbstractNetconfSession<NetconfServerSession, NetconfServerSessionListener> implements NetconfManagementSession {
 
-    private static final Logger logger = LoggerFactory.getLogger(NetconfServerSession.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfServerSession.class);
 
     private final NetconfHelloMessageAdditionalHeader header;
 
@@ -50,7 +50,7 @@ public final class NetconfServerSession extends AbstractNetconfSession<NetconfSe
             NetconfHelloMessageAdditionalHeader header) {
         super(sessionListener, channel, sessionId);
         this.header = header;
-        logger.debug("Session {} created", toString());
+        LOG.debug("Session {} created", toString());
     }
 
     @Override
@@ -111,9 +111,12 @@ public final class NetconfServerSession extends AbstractNetconfSession<NetconfSe
 
     private Class<? extends Transport> getTransportForString(String transport) {
         switch(transport) {
-        case "ssh" : return NetconfSsh.class;
-        case "tcp" : return NetconfTcp.class;
-        default: throw new IllegalArgumentException("Unknown transport type " + transport);
+        case "ssh" :
+            return NetconfSsh.class;
+        case "tcp" :
+            return NetconfTcp.class;
+        default:
+            throw new IllegalArgumentException("Unknown transport type " + transport);
         }
     }
 
index 4f2f65c1a00732137229fba7e1416d9c1db70904..b2b8c50029868d507971cf70d1f22af940861e0d 100644 (file)
@@ -11,7 +11,6 @@ package org.opendaylight.controller.netconf.impl;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
-
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.NetconfMessage;
 import org.opendaylight.controller.netconf.api.NetconfSessionListener;
@@ -31,7 +30,7 @@ import org.w3c.dom.Node;
 
 public class NetconfServerSessionListener implements NetconfSessionListener<NetconfServerSession> {
 
-    static final Logger logger = LoggerFactory.getLogger(NetconfServerSessionListener.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfServerSessionListener.class);
     private final SessionMonitoringService monitoringService;
     private final NetconfOperationRouter operationRouter;
     private final AutoCloseable onSessionDownCloseable;
@@ -50,7 +49,7 @@ public class NetconfServerSessionListener implements NetconfSessionListener<Netc
 
     @Override
     public void onSessionDown(NetconfServerSession netconfNetconfServerSession, Exception cause) {
-        logger.debug("Session {} down, reason: {}", netconfNetconfServerSession, cause.getMessage());
+        LOG.debug("Session {} down, reason: {}", netconfNetconfServerSession, cause.getMessage());
         onDown(netconfNetconfServerSession);
     }
 
@@ -60,19 +59,19 @@ public class NetconfServerSessionListener implements NetconfSessionListener<Netc
         try {
             operationRouter.close();
         } catch (Exception closingEx) {
-            logger.debug("Ignoring exception while closing operationRouter", closingEx);
+            LOG.debug("Ignoring exception while closing operationRouter", closingEx);
         }
         try {
             onSessionDownCloseable.close();
         } catch(Exception ex){
-            logger.debug("Ignoring exception while closing onSessionDownCloseable", ex);
+            LOG.debug("Ignoring exception while closing onSessionDownCloseable", ex);
         }
     }
 
     @Override
     public void onSessionTerminated(NetconfServerSession netconfNetconfServerSession,
             NetconfTerminationReason netconfTerminationReason) {
-        logger.debug("Session {} terminated, reason: {}", netconfNetconfServerSession,
+        LOG.debug("Session {} terminated, reason: {}", netconfNetconfServerSession,
                 netconfTerminationReason.getErrorMessage());
         onDown(netconfNetconfServerSession);
     }
@@ -86,7 +85,7 @@ public class NetconfServerSessionListener implements NetconfSessionListener<Netc
             // schemas
             final NetconfMessage message = processDocument(netconfMessage,
                     session);
-            logger.debug("Responding with message {}", XmlUtil.toString(message.getDocument()));
+            LOG.debug("Responding with message {}", XmlUtil.toString(message.getDocument()));
             session.sendMessage(message);
 
             if (isCloseSession(netconfMessage)) {
@@ -95,11 +94,11 @@ public class NetconfServerSessionListener implements NetconfSessionListener<Netc
 
         } catch (final RuntimeException e) {
             // TODO: should send generic error or close session?
-            logger.error("Unexpected exception", e);
+            LOG.error("Unexpected exception", e);
             session.onIncommingRpcFail();
             throw new IllegalStateException("Unable to process incoming message " + netconfMessage, e);
         } catch (NetconfDocumentedException e) {
-            logger.trace("Error occurred while processing message",e);
+            LOG.trace("Error occurred while processing message",e);
             session.onOutgoingRpcError();
             session.onIncommingRpcFail();
             SendErrorExceptionUtil.sendErrorMessage(session, e, netconfMessage);
@@ -109,7 +108,7 @@ public class NetconfServerSessionListener implements NetconfSessionListener<Netc
     private void closeNetconfSession(NetconfServerSession session) {
         // destroy NetconfOperationService
         session.close();
-        logger.info("Session {} closed successfully", session.getSessionId());
+        LOG.info("Session {} closed successfully", session.getSessionId());
     }
 
 
@@ -148,7 +147,9 @@ public class NetconfServerSessionListener implements NetconfSessionListener<Netc
     }
 
     private void checkMessageId(Node rootNode) throws NetconfDocumentedException {
-            NamedNodeMap attributes = rootNode.getAttributes();
+
+        NamedNodeMap attributes = rootNode.getAttributes();
+
         if(attributes.getNamedItemNS(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, XmlNetconfConstants.MESSAGE_ID)!=null) {
             return;
         }
@@ -159,8 +160,9 @@ public class NetconfServerSessionListener implements NetconfSessionListener<Netc
 
         throw new NetconfDocumentedException("Missing attribute" + rootNode.getNodeName(),
                 NetconfDocumentedException.ErrorType.protocol, NetconfDocumentedException.ErrorTag.missing_attribute,
-                NetconfDocumentedException.ErrorSeverity.error, ImmutableMap.of(NetconfDocumentedException.ErrorTag.missing_attribute.toString(),
-                XmlNetconfConstants.MESSAGE_ID));
+                NetconfDocumentedException.ErrorSeverity.error,
+                ImmutableMap.of(NetconfDocumentedException.ErrorTag.missing_attribute.toString(),
+                        XmlNetconfConstants.MESSAGE_ID));
     }
 
     private static boolean isCloseSession(final NetconfMessage incomingDocument) {
index 34a8bc4fd57f7a670aad66aa68cc824bf2905572..4be8b91a946ebbc115077d71e5d8751e8757f047 100644 (file)
@@ -8,8 +8,8 @@
 
 package org.opendaylight.controller.netconf.impl;
 
-import org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouter;
 import org.opendaylight.controller.netconf.impl.mapping.CapabilityProvider;
+import org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouter;
 import org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouterImpl;
 import org.opendaylight.controller.netconf.impl.osgi.SessionMonitoringService;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceSnapshot;
index f7bb281b9122b259e6e4df1a2e15b5bdca63b22f..2f72ad4d4769964021c0cc5f443692c4993ec0aa 100644 (file)
@@ -13,6 +13,10 @@ import io.netty.channel.Channel;
 import io.netty.channel.local.LocalAddress;
 import io.netty.util.Timer;
 import io.netty.util.concurrent.Promise;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.util.AbstractMap;
+import java.util.Map;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.NetconfServerSessionPreferences;
 import org.opendaylight.controller.netconf.nettyutil.AbstractNetconfSessionNegotiator;
@@ -21,17 +25,12 @@ import org.opendaylight.controller.netconf.util.messages.NetconfHelloMessageAddi
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.util.AbstractMap;
-import java.util.Map;
-
 public class NetconfServerSessionNegotiator
         extends
         AbstractNetconfSessionNegotiator<NetconfServerSessionPreferences, NetconfServerSession, NetconfServerSessionListener> {
 
-    static final Logger logger = LoggerFactory
-            .getLogger(NetconfServerSessionNegotiator.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfServerSessionNegotiator.class);
+    
     private static final String UNKNOWN = "unknown";
 
     protected NetconfServerSessionNegotiator(
@@ -71,7 +70,7 @@ public class NetconfServerSessionNegotiator
 
         }
 
-        logger.debug("Additional header from hello parsed as {} from {}",
+        LOG.debug("Additional header from hello parsed as {} from {}",
                 parsedHeader, additionalHeader);
 
         return new NetconfServerSession(sessionListener, channel,
index 487ffd6e5dc2d8f5e7dbd13db1402b3d7e0559a7..34f4f0e653137235a22e917a99224bb96f138ca7 100644 (file)
@@ -12,9 +12,11 @@ import static org.opendaylight.controller.netconf.mapping.api.NetconfOperationPr
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableSet;
-
+import com.google.common.collect.Sets;
+import io.netty.channel.Channel;
+import io.netty.util.Timer;
+import io.netty.util.concurrent.Promise;
 import java.util.Set;
-
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.NetconfServerSessionPreferences;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
@@ -26,13 +28,6 @@ import org.opendaylight.controller.netconf.util.messages.NetconfHelloMessage;
 import org.opendaylight.protocol.framework.SessionListenerFactory;
 import org.opendaylight.protocol.framework.SessionNegotiator;
 import org.opendaylight.protocol.framework.SessionNegotiatorFactory;
-
-import com.google.common.collect.Sets;
-
-import io.netty.channel.Channel;
-import io.netty.util.Timer;
-import io.netty.util.concurrent.Promise;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -51,7 +46,7 @@ public class NetconfServerSessionNegotiatorFactory implements SessionNegotiatorF
     private final long connectionTimeoutMillis;
     private final DefaultCommitNotificationProducer commitNotificationProducer;
     private final SessionMonitoringService monitoringService;
-    private static final Logger logger = LoggerFactory.getLogger(NetconfServerSessionNegotiatorFactory.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfServerSessionNegotiatorFactory.class);
     private final Set<String> baseCapabilities;
 
     // TODO too many params, refactor
@@ -112,7 +107,7 @@ public class NetconfServerSessionNegotiatorFactory implements SessionNegotiatorF
             proposal = new NetconfServerSessionPreferences(
                     createHelloMessage(sessionId, capabilityProvider), sessionId);
         } catch (NetconfDocumentedException e) {
-            logger.error("Unable to create hello mesage for session {} with capability provider {}", sessionId,capabilityProvider);
+            LOG.error("Unable to create hello mesage for session {} with capability provider {}", sessionId,capabilityProvider);
             throw new IllegalStateException(e);
         }
 
index 8b2ca86010a06aa5c1b509bd617a08de72fd684a..2e7accad45e8950b7be2c3fb11a0a1ad1e74b93d 100644 (file)
@@ -28,14 +28,14 @@ import org.xml.sax.SAXException;
  * See <a href="http://tools.ietf.org/html/rfc6241#section-6">rfc6241</a> for details.
  */
 public class SubtreeFilter {
-    private static final Logger logger = LoggerFactory.getLogger(SubtreeFilter.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SubtreeFilter.class);
 
     static Document applySubtreeFilter(Document requestDocument, Document rpcReply) throws NetconfDocumentedException {
         // FIXME: rpcReply document must be reread otherwise some nodes do not inherit namespaces. (services/service)
         try {
             rpcReply = XmlUtil.readXmlToDocument(XmlUtil.toString(rpcReply, true));
         } catch (SAXException | IOException e) {
-            logger.error("Cannot transform document", e);
+            LOG.error("Cannot transform document", e);
             throw new NetconfDocumentedException("Cannot transform document");
         }
 
@@ -49,8 +49,8 @@ public class SubtreeFilter {
                     XmlNetconfConstants.FILTER, XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
             if (maybeFilter.isPresent() && (
                     "subtree".equals(maybeFilter.get().getAttribute("type"))||
-                            "subtree".equals(maybeFilter.get().getAttribute("type", XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0))
-            )) {
+                            "subtree".equals(maybeFilter.get().getAttribute("type", XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0)))
+            ) {
 
 
                 // do
@@ -160,7 +160,7 @@ public class SubtreeFilter {
         if (result == null) {
             result = MatchingResult.NO_MATCH;
         }
-        logger.debug("Matching {} to {} resulted in {}", src, filter, result);
+        LOG.debug("Matching {} to {} resulted in {}", src, filter, result);
         return result;
     }
 
index b7a98bae83acae9a1ee0f525a015db251c998f3e..8c7465b02961197e4a1bc5c836d10d00c0441be5 100644 (file)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.controller.netconf.impl.mapping.operations;
 
+import com.google.common.base.Optional;
+import java.util.Collections;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation;
@@ -16,10 +18,6 @@ import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import com.google.common.base.Optional;
-
-import java.util.Collections;
-
 public class DefaultCloseSession extends AbstractSingletonNetconfOperation {
     public static final String CLOSE_SESSION = "close-session";
     private final AutoCloseable sessionResources;
@@ -49,7 +47,7 @@ public class DefaultCloseSession extends AbstractSingletonNetconfOperation {
                     + getNetconfSessionIdForReporting(), NetconfDocumentedException.ErrorType.application,
                     NetconfDocumentedException.ErrorTag.operation_failed,
                     NetconfDocumentedException.ErrorSeverity.error, Collections.singletonMap(
-                    NetconfDocumentedException.ErrorSeverity.error.toString(), e.getMessage()));
+                        NetconfDocumentedException.ErrorSeverity.error.toString(), e.getMessage()));
         }
         return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
     }
index 67b782c7c1d7666a32f78fe08f0ff77d5dd9f17e..fbe855f8bebddcb8aeffd728b553ce112fc50f6c 100644 (file)
@@ -9,12 +9,12 @@
 package org.opendaylight.controller.netconf.impl.mapping.operations;
 
 import com.google.common.base.Preconditions;
-
+import java.io.InputStream;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
-import org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouter;
 import org.opendaylight.controller.netconf.impl.DefaultCommitNotificationProducer;
 import org.opendaylight.controller.netconf.impl.mapping.CapabilityProvider;
+import org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouter;
 import org.opendaylight.controller.netconf.mapping.api.HandlingPriority;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationChainedExecution;
 import org.opendaylight.controller.netconf.util.mapping.AbstractNetconfOperation;
@@ -25,11 +25,9 @@ import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import java.io.InputStream;
-
 public class DefaultCommit extends AbstractNetconfOperation {
 
-    private static final Logger logger = LoggerFactory.getLogger(DefaultCommit.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DefaultCommit.class);
 
     private static final String NOTIFY_ATTR = "notify";
 
@@ -69,12 +67,12 @@ public class DefaultCommit extends AbstractNetconfOperation {
                 "Subsequent netconf operation expected by %s", this);
 
         if (isCommitWithoutNotification(requestMessage)) {
-            logger.debug("Skipping commit notification");
+            LOG.debug("Skipping commit notification");
         } else {
             // Send commit notification if commit was not issued by persister
             removePersisterAttributes(requestMessage);
             Element cfgSnapshot = getConfigSnapshot(operationRouter);
-            logger.debug("Config snapshot retrieved successfully {}", cfgSnapshot);
+            LOG.debug("Config snapshot retrieved successfully {}", cfgSnapshot);
             notificationProducer.sendCommitNotification("ok", cfgSnapshot, cap.getCapabilities());
         }
 
@@ -101,7 +99,7 @@ public class DefaultCommit extends AbstractNetconfOperation {
             xmlElement = XmlElement.fromDomElementWithExpected(message.getDocumentElement(),
                     XmlNetconfConstants.RPC_KEY, XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
         } catch (NetconfDocumentedException e) {
-            logger.trace("Commit operation is not valid due to  {}",e);
+            LOG.trace("Commit operation is not valid due to ",e);
             return false;
         }
 
@@ -110,7 +108,7 @@ public class DefaultCommit extends AbstractNetconfOperation {
         if (attr == null || attr.equals("")){
             return false;
         } else if (attr.equals(Boolean.toString(false))) {
-            logger.debug("Commit operation received with notify=false attribute {}", message);
+            LOG.debug("Commit operation received with notify=false attribute {}", message);
             return true;
         } else {
             return false;
index 6db74eaba2ec0aba6efb421b40e12e735709edde..53107048760dbee1ae27f23be7977b15481ba39a 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.controller.netconf.impl.mapping.operations;
 
 import com.google.common.base.Optional;
 import com.google.common.collect.Maps;
-
+import java.util.Map;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.impl.mapping.CapabilityProvider;
@@ -23,14 +23,12 @@ import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import java.util.Map;
-
 public final class DefaultGetSchema extends AbstractLastNetconfOperation {
     public static final String GET_SCHEMA = "get-schema";
     public static final String IDENTIFIER = "identifier";
     public static final String VERSION = "version";
 
-    private static final Logger logger = LoggerFactory.getLogger(DefaultGetSchema.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DefaultGetSchema.class);
     private final CapabilityProvider cap;
 
     public DefaultGetSchema(CapabilityProvider cap, String netconfSessionIdForReporting) {
@@ -60,7 +58,7 @@ public final class DefaultGetSchema extends AbstractLastNetconfOperation {
         } catch (IllegalStateException e) {
             Map<String, String> errorInfo = Maps.newHashMap();
             errorInfo.put(entry.identifier, e.getMessage());
-            logger.warn("Rpc error: {}", NetconfDocumentedException.ErrorTag.operation_failed, e);
+            LOG.warn("Rpc error: {}", NetconfDocumentedException.ErrorTag.operation_failed, e);
             throw new NetconfDocumentedException(e.getMessage(), NetconfDocumentedException.ErrorType.application,
                     NetconfDocumentedException.ErrorTag.operation_failed,
                     NetconfDocumentedException.ErrorSeverity.error, errorInfo);
@@ -69,7 +67,7 @@ public final class DefaultGetSchema extends AbstractLastNetconfOperation {
         Element getSchemaResult;
         getSchemaResult = XmlUtil.createTextElement(document, XmlNetconfConstants.DATA_KEY, schema,
                 Optional.of(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_YANG_IETF_NETCONF_MONITORING));
-        logger.trace("{} operation successful", GET_SCHEMA);
+        LOG.trace("{} operation successful", GET_SCHEMA);
 
         return getSchemaResult;
     }
@@ -86,7 +84,7 @@ public final class DefaultGetSchema extends AbstractLastNetconfOperation {
             try {
                 identifierElement = getSchemaElement.getOnlyChildElementWithSameNamespace(IDENTIFIER);
             } catch (MissingNameSpaceException e) {
-                logger.trace("Can't get identifier element as only child element with same namespace due to {}",e);
+                LOG.trace("Can't get identifier element as only child element with same namespace due to ",e);
                 throw NetconfDocumentedException.wrap(e);
             }
             identifier = identifierElement.getTextContent();
index 6de185ac1c1da4948fc343a4be19759362af03f0..3f0ae27dbbcea4e1226694eedd3aaab4a05ce586 100644 (file)
@@ -11,8 +11,8 @@ import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException.ErrorSeverity;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException.ErrorTag;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException.ErrorType;
-import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.api.NetconfMessage;
+import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.impl.NetconfServerSession;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationChainedExecution;
 import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation;
@@ -25,7 +25,7 @@ import org.w3c.dom.Element;
 public class DefaultStartExi extends AbstractSingletonNetconfOperation implements DefaultNetconfOperation {
     public static final String START_EXI = "start-exi";
 
-    private static final Logger logger = LoggerFactory.getLogger(DefaultStartExi.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DefaultStartExi.class);
     private NetconfServerSession netconfSession;
 
     public DefaultStartExi(String netconfSessionIdForReporting) {
@@ -35,7 +35,7 @@ public class DefaultStartExi extends AbstractSingletonNetconfOperation implement
     @Override
     public Document handle(Document message,
                            NetconfOperationChainedExecution subsequentOperation) throws NetconfDocumentedException {
-        logger.debug("Received start-exi message {} ", XmlUtil.toString(message));
+        LOG.debug("Received start-exi message {} ", XmlUtil.toString(message));
 
         try {
             netconfSession.startExiCommunication(new NetconfMessage(message));
@@ -50,7 +50,7 @@ public class DefaultStartExi extends AbstractSingletonNetconfOperation implement
     @Override
     protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement) throws NetconfDocumentedException {
         Element getSchemaResult = document.createElementNS( XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, XmlNetconfConstants.OK);
-        logger.trace("{} operation successful", START_EXI);
+        LOG.trace("{} operation successful", START_EXI);
         return getSchemaResult;
     }
 
index 233638d5b08d57b608957d1f18085535918f80f6..2b90a6150552e9306f3a137c6fe7056b2e422b3d 100644 (file)
@@ -23,8 +23,8 @@ public class DefaultStopExi extends AbstractSingletonNetconfOperation implements
     public static final String STOP_EXI = "stop-exi";
     private NetconfServerSession netconfSession;
 
-    private static final Logger logger = LoggerFactory
-            .getLogger(DefaultStartExi.class);
+    private static final Logger LOG = LoggerFactory
+            .getLogger(DefaultStopExi.class);
 
     public DefaultStopExi(String netconfSessionIdForReporting) {
         super(netconfSessionIdForReporting);
@@ -32,12 +32,12 @@ public class DefaultStopExi extends AbstractSingletonNetconfOperation implements
 
     @Override
     protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement) throws NetconfDocumentedException {
-        logger.debug("Received stop-exi message {} ", XmlUtil.toString(operationElement));
+        LOG.debug("Received stop-exi message {} ", XmlUtil.toString(operationElement));
 
         netconfSession.stopExiCommunication();
 
         Element getSchemaResult = document.createElementNS( XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, XmlNetconfConstants.OK);
-        logger.trace("{} operation successful", STOP_EXI);
+        LOG.trace("{} operation successful", STOP_EXI);
         return getSchemaResult;
     }
 
index 6ab62ef29a82037cd12e01c5f71d88e34a32a5bd..27423c09b7fb732e0bd6364dc3469efd2c13f884 100644 (file)
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
 
 public class NetconfImplActivator implements BundleActivator {
 
-    private static final Logger logger = LoggerFactory.getLogger(NetconfImplActivator.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfImplActivator.class);
 
     private NetconfOperationServiceFactoryTracker factoriesTracker;
     private DefaultCommitNotificationProducer commitNot;
@@ -62,7 +62,7 @@ public class NetconfImplActivator implements BundleActivator {
         NetconfServerDispatcher dispatch = new NetconfServerDispatcher(serverChannelInitializer, eventLoopGroup, eventLoopGroup);
 
         LocalAddress address = NetconfConfigUtil.getNetconfLocalAddress();
-        logger.trace("Starting local netconf server at {}", address);
+        LOG.trace("Starting local netconf server at {}", address);
         dispatch.createLocalServer(address);
 
         context.registerService(NetconfOperationProvider.class, factoriesListener, null);
@@ -84,7 +84,7 @@ public class NetconfImplActivator implements BundleActivator {
 
     @Override
     public void stop(final BundleContext context) {
-        logger.info("Shutting down netconf because YangStoreService service was removed");
+        LOG.info("Shutting down netconf because YangStoreService service was removed");
 
         commitNot.close();
         eventLoopGroup.shutdownGracefully(0, 1, TimeUnit.SECONDS);
index 2a45e1757b8655a6b6be8bcf097867b677fd70d1..3f44ff4ff834120d3edb655e55b5419b1569e7e0 100644 (file)
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
 
 public class NetconfMonitoringServiceImpl implements NetconfMonitoringService, SessionMonitoringService {
 
-    private static final Logger logger = LoggerFactory.getLogger(NetconfMonitoringServiceImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfMonitoringServiceImpl.class);
 
     private final Set<NetconfManagementSession> sessions = new ConcurrentSet<>();
     private final NetconfOperationProvider netconfOperationProvider;
@@ -49,14 +49,14 @@ public class NetconfMonitoringServiceImpl implements NetconfMonitoringService, S
 
     @Override
     public void onSessionUp(NetconfManagementSession session) {
-        logger.debug("Session {} up", session);
+        LOG.debug("Session {} up", session);
         Preconditions.checkState(!sessions.contains(session), "Session %s was already added", session);
         sessions.add(session);
     }
 
     @Override
     public void onSessionDown(NetconfManagementSession session) {
-        logger.debug("Session {} down", session);
+        LOG.debug("Session {} down", session);
         Preconditions.checkState(sessions.contains(session), "Session %s not present", session);
         sessions.remove(session);
     }
index aa590604b0087d5f7cc79f135a246b6a929abe07..6915ee4bfe373fa2ac402cedb5edd5f7540f643f 100644 (file)
@@ -10,6 +10,12 @@ package org.opendaylight.controller.netconf.impl.osgi;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.NavigableMap;
+import java.util.Set;
+import java.util.TreeMap;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.impl.DefaultCommitNotificationProducer;
 import org.opendaylight.controller.netconf.impl.NetconfServerSession;
@@ -30,16 +36,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.NavigableMap;
-import java.util.Set;
-import java.util.TreeMap;
-
 public class NetconfOperationRouterImpl implements NetconfOperationRouter {
 
-    private static final Logger logger = LoggerFactory.getLogger(NetconfOperationRouterImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfOperationRouterImpl.class);
 
     private final NetconfOperationServiceSnapshot netconfOperationServiceSnapshot;
     private Set<NetconfOperation> allNetconfOperations;
@@ -104,7 +103,7 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter {
             messageAsString = XmlUtil.toString(message);
             netconfOperationExecution = getNetconfOperationWithHighestPriority(message, session);
         } catch (IllegalArgumentException | IllegalStateException e) {
-            logger.warn("Unable to handle rpc {} on session {}", messageAsString, session, e);
+            LOG.warn("Unable to handle rpc {} on session {}", messageAsString, session, e);
 
             String errorMessage = String.format("Unable to handle rpc %s on session %s", messageAsString, session);
             Map<String, String> errorInfo = Maps.newHashMap();
@@ -137,7 +136,7 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter {
     }
 
     private NetconfDocumentedException handleUnexpectedEx(String s, Exception e) throws NetconfDocumentedException {
-        logger.error(s, e);
+        LOG.error(s, e);
 
         Map<String, String> info = Maps.newHashMap();
         info.put(NetconfDocumentedException.ErrorSeverity.error.toString(), e.toString());
@@ -150,7 +149,7 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter {
     private Document executeOperationWithHighestPriority(Document message,
             NetconfOperationExecution netconfOperationExecution, String messageAsString)
             throws NetconfDocumentedException {
-        logger.debug("Forwarding netconf message {} to {}", messageAsString, netconfOperationExecution.netconfOperation);
+        LOG.debug("Forwarding netconf message {} to {}", messageAsString, netconfOperationExecution.netconfOperation);
         return netconfOperationExecution.execute(message);
     }
 
index 63cd0baf347f8821a2f639cac5fca55cf4eae774..6c55c35e25b44716e1f930007f77d9c90f238e56 100644 (file)
@@ -7,11 +7,10 @@
  */
 package org.opendaylight.controller.netconf.impl.osgi;
 
-import org.opendaylight.controller.netconf.mapping.api.NetconfOperationProvider;
-import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceFactory;
-
 import java.util.HashSet;
 import java.util.Set;
+import org.opendaylight.controller.netconf.mapping.api.NetconfOperationProvider;
+import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceFactory;
 
 public class NetconfOperationServiceFactoryListenerImpl implements NetconfOperationServiceFactoryListener,
         NetconfOperationProvider {
index ce312548b2858f7884596ea1f8d2b9f927f966a5..1a35e4d6bace2e313c084cf5ffdf23bbfd3833bb 100644 (file)
@@ -8,15 +8,14 @@
 
 package org.opendaylight.controller.netconf.impl.osgi;
 
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationService;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceFactory;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceSnapshot;
 import org.opendaylight.controller.netconf.util.CloseableUtil;
 
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
 public class NetconfOperationServiceSnapshotImpl implements NetconfOperationServiceSnapshot {
 
     private final Set<NetconfOperationService> services;
index 31c4d4f57e7b65f6f4b9ae5e28376346e3be3600..e336914981222e5572a77a4f2b09a05fea82dc50 100644 (file)
@@ -11,18 +11,15 @@ package org.opendaylight.controller.netconf.impl.util;
 import com.google.common.collect.Maps;
 import io.netty.channel.ChannelHandler;
 import io.netty.channel.ChannelHandlerContext;
+import java.util.Map;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.util.messages.SendErrorExceptionUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Map;
-
-public final class
-        DeserializerExceptionHandler implements ChannelHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(DeserializerExceptionHandler.class);
+public final class DeserializerExceptionHandler implements ChannelHandler {
 
+    private static final Logger LOG = LoggerFactory.getLogger(DeserializerExceptionHandler.class);
 
     @Override
     public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
@@ -36,7 +33,7 @@ public final class
 
     @Override
     public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
-        logger.warn("An exception occurred during message handling", cause);
+        LOG.warn("An exception occurred during message handling", cause);
         handleDeserializerException(ctx, cause);
     }
 
index 444d4fe4abad44c6168d7ef2befff13f5d1af7fe..355f84ac66a581ed73557885cf0f4d2428bc1c78 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.controller.netconf.impl;
 
 import static org.junit.Assert.assertEquals;
+
 import org.junit.Test;
 import org.opendaylight.controller.netconf.util.messages.NetconfHelloMessageAdditionalHeader;
 
index 5f8bc06e1015625cf48b9134058f928c54f337c1..3b83daa693fb926a7e28831fcf64f6761d3cdd7d 100644 (file)
@@ -18,13 +18,11 @@ import static org.mockito.Mockito.mock;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
-
 import io.netty.channel.ChannelFuture;
 import io.netty.channel.EventLoopGroup;
 import io.netty.channel.nio.NioEventLoopGroup;
 import io.netty.util.HashedWheelTimer;
 import io.netty.util.concurrent.GlobalEventExecutor;
-
 import java.io.DataOutputStream;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -42,7 +40,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.atomic.AtomicLong;
-
 import org.apache.commons.io.IOUtils;
 import org.junit.After;
 import org.junit.AfterClass;
@@ -57,9 +54,9 @@ import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.client.NetconfClientDispatcher;
 import org.opendaylight.controller.netconf.client.NetconfClientDispatcherImpl;
 import org.opendaylight.controller.netconf.client.SimpleNetconfClientSessionListener;
+import org.opendaylight.controller.netconf.client.TestingNetconfClient;
 import org.opendaylight.controller.netconf.client.conf.NetconfClientConfiguration;
 import org.opendaylight.controller.netconf.client.conf.NetconfClientConfigurationBuilder;
-import org.opendaylight.controller.netconf.client.TestingNetconfClient;
 import org.opendaylight.controller.netconf.impl.osgi.NetconfOperationServiceFactoryListenerImpl;
 import org.opendaylight.controller.netconf.impl.osgi.SessionMonitoringService;
 import org.opendaylight.controller.netconf.mapping.api.Capability;
@@ -80,7 +77,7 @@ import org.w3c.dom.Document;
 
 @RunWith(Parameterized.class)
 public class ConcurrentClientsTest {
-    private static final Logger logger = LoggerFactory.getLogger(ConcurrentClientsTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ConcurrentClientsTest.class);
 
     private static ExecutorService clientExecutor;
 
@@ -99,16 +96,14 @@ public class ConcurrentClientsTest {
 
     @Parameterized.Parameters()
     public static Collection<Object[]> data() {
-        return Arrays.asList(new Object[][]{
-                {4, TestingNetconfClientRunnable.class, NetconfServerSessionNegotiatorFactory.DEFAULT_BASE_CAPABILITIES},
-                {1, TestingNetconfClientRunnable.class, NetconfServerSessionNegotiatorFactory.DEFAULT_BASE_CAPABILITIES},
-                // empty set of capabilities = only base 1.0 netconf capability
-                {4, TestingNetconfClientRunnable.class, Collections.emptySet()},
-                {4, TestingNetconfClientRunnable.class, getOnlyExiServerCaps()},
-                {4, TestingNetconfClientRunnable.class, getOnlyChunkServerCaps()},
-
-                {4, BlockingClientRunnable.class, getOnlyExiServerCaps()},
-                {1, BlockingClientRunnable.class, getOnlyExiServerCaps()},
+        return Arrays.asList(new Object[][]{{4, TestingNetconfClientRunnable.class, NetconfServerSessionNegotiatorFactory.DEFAULT_BASE_CAPABILITIES},
+                                            {1, TestingNetconfClientRunnable.class, NetconfServerSessionNegotiatorFactory.DEFAULT_BASE_CAPABILITIES},
+                                            // empty set of capabilities = only base 1.0 netconf capability
+                                            {4, TestingNetconfClientRunnable.class, Collections.emptySet()},
+                                            {4, TestingNetconfClientRunnable.class, getOnlyExiServerCaps()},
+                                            {4, TestingNetconfClientRunnable.class, getOnlyChunkServerCaps()},
+                                            {4, BlockingClientRunnable.class, getOnlyExiServerCaps()},
+                                            {1, BlockingClientRunnable.class, getOnlyExiServerCaps()},
         });
     }
 
@@ -174,7 +169,7 @@ public class ConcurrentClientsTest {
         try {
             nettyGroup.shutdownGracefully().get();
         } catch (InterruptedException | ExecutionException e) {
-            logger.warn("Ignoring exception while cleaning up after test", e);
+            LOG.warn("Ignoring exception while cleaning up after test", e);
         }
     }
 
@@ -198,7 +193,7 @@ public class ConcurrentClientsTest {
             } catch (InterruptedException e) {
                 throw new IllegalStateException(e);
             } catch (ExecutionException e) {
-                logger.error("Thread for testing client failed", e);
+                LOG.error("Thread for testing client failed", e);
                 fail("Client failed: " + e.getMessage());
             }
         }
@@ -241,7 +236,7 @@ public class ConcurrentClientsTest {
         @Override
         public Document handle(Document requestMessage, NetconfOperationChainedExecution subsequentOperation) throws NetconfDocumentedException {
             try {
-                logger.info("Handling netconf message from test {}", XmlUtil.toString(requestMessage));
+                LOG.info("Handling netconf message from test {}", XmlUtil.toString(requestMessage));
                 counter.getAndIncrement();
                 return XmlUtil.readXmlToDocument("<test/>");
             } catch (Exception e) {
@@ -310,7 +305,7 @@ public class ConcurrentClientsTest {
             while (sb.toString().endsWith("]]>]]>") == false) {
                 sb.append((char) inFromServer.read());
             }
-            logger.info(sb.toString());
+            LOG.info(sb.toString());
 
             outToServer.write(IOUtils.toByteArray(clientHello));
             outToServer.write("]]>]]>".getBytes());
@@ -324,7 +319,7 @@ public class ConcurrentClientsTest {
             while (sb.toString().endsWith("]]>]]>") == false) {
                 sb.append((char) inFromServer.read());
             }
-            logger.info(sb.toString());
+            LOG.info(sb.toString());
             clientSocket.close();
         }
     }
@@ -340,19 +335,19 @@ public class ConcurrentClientsTest {
                 final TestingNetconfClient netconfClient =
                         new TestingNetconfClient(Thread.currentThread().getName(), netconfClientDispatcher, getClientConfig());
                 long sessionId = netconfClient.getSessionId();
-                logger.info("Client with session id {}: hello exchanged", sessionId);
+                LOG.info("Client with session id {}: hello exchanged", sessionId);
 
                 final NetconfMessage getMessage = XmlFileLoader
                         .xmlFileToNetconfMessage("netconfMessages/getConfig.xml");
                 NetconfMessage result = netconfClient.sendRequest(getMessage).get();
-                logger.info("Client with session id {}: got result {}", sessionId, result);
+                LOG.info("Client with session id {}: got result {}", sessionId, result);
 
                 Preconditions.checkState(NetconfMessageUtil.isErrorMessage(result) == false,
                         "Received error response: " + XmlUtil.toString(result.getDocument()) + " to request: "
                                 + XmlUtil.toString(getMessage.getDocument()));
 
                 netconfClient.close();
-                logger.info("Client with session id {}: ended", sessionId);
+                LOG.info("Client with session id {}: ended", sessionId);
             } catch (final Exception e) {
                 throw new IllegalStateException(Thread.currentThread().getName(), e);
             }
index 42bd033c712d22daf600322680739b1f7b9f2b10..ecc33ca90fd05f5392d6173c6d88cd4a7a36128c 100644 (file)
@@ -12,14 +12,13 @@ import io.netty.channel.ChannelFuture;
 import io.netty.channel.EventLoopGroup;
 import io.netty.channel.nio.NioEventLoopGroup;
 import io.netty.util.HashedWheelTimer;
+import java.lang.management.ManagementFactory;
+import java.net.InetSocketAddress;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.netconf.impl.osgi.NetconfOperationServiceFactoryListenerImpl;
 
-import java.lang.management.ManagementFactory;
-import java.net.InetSocketAddress;
-
 public class NetconfDispatcherImplTest {
 
     private EventLoopGroup nettyGroup;
index 21250357994644a7bafa0940acc880a802c43a0f..395e5c03384abad0e988789d5bf5d42f8db42d9c 100644 (file)
@@ -8,6 +8,17 @@
 
 package org.opendaylight.controller.netconf.impl;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
 import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
@@ -18,8 +29,6 @@ import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.opendaylight.controller.netconf.api.monitoring.NetconfManagementSession;
-import org.opendaylight.controller.netconf.impl.NetconfServerSession;
-import org.opendaylight.controller.netconf.impl.NetconfServerSessionListener;
 import org.opendaylight.controller.netconf.impl.osgi.NetconfMonitoringServiceImpl;
 import org.opendaylight.controller.netconf.mapping.api.Capability;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationProvider;
@@ -27,11 +36,6 @@ import org.opendaylight.controller.netconf.mapping.api.NetconfOperationService;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceSnapshot;
 import org.opendaylight.controller.netconf.util.messages.NetconfHelloMessageAdditionalHeader;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.*;
-
 public class NetconfMonitoringServiceImplTest {
 
     private NetconfMonitoringServiceImpl service;
index 51dfa4b1a8df3ed9a785c468ec38b8ddfc5136f7..b925295e74a8ec86e8b235a48f691c2222d82aa8 100644 (file)
@@ -29,7 +29,7 @@ import org.xml.sax.SAXException;
 
 @RunWith(value = Parameterized.class)
 public class SubtreeFilterTest {
-    private static final Logger logger = LoggerFactory.getLogger(SubtreeFilterTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SubtreeFilterTest.class);
 
     private final int directoryIndex;
 
@@ -57,7 +57,7 @@ public class SubtreeFilterTest {
         Document preFilterDocument = getDocument("pre-filter.xml");
         Document postFilterDocument = getDocument("post-filter.xml");
         Document actualPostFilterDocument = SubtreeFilter.applySubtreeFilter(requestDocument, preFilterDocument);
-        logger.info("Actual document: {}", XmlUtil.toString(actualPostFilterDocument));
+        LOG.info("Actual document: {}", XmlUtil.toString(actualPostFilterDocument));
         Diff diff = XMLUnit.compareXML(postFilterDocument, actualPostFilterDocument);
         assertTrue(diff.toString(), diff.similar());
 
index d6b0201ab88a0245e666b4bb7fe2e77552a0075b..d82c1484e49e2f4786c5ac3ee7ddca51d6a3b95d 100644 (file)
@@ -8,14 +8,15 @@
 
 package org.opendaylight.controller.netconf.impl.mapping.operations;
 
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+
 import org.junit.Test;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.util.xml.XmlElement;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
 
 public class DefaultCloseSessionTest {
     @Test
index 98050de565c868a8e234da1c20757a52b1e1a81f..15aeb8d27c8badbafa64db0a7614174ce7155ceb 100644 (file)
@@ -8,6 +8,16 @@
 
 package org.opendaylight.controller.netconf.impl.mapping.operations;
 
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anySetOf;
+import static org.mockito.Mockito.anyString;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
 import com.google.common.collect.Sets;
 import org.junit.Before;
 import org.junit.Test;
@@ -22,8 +32,6 @@ import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import static org.mockito.Mockito.*;
-
 public class DefaultCommitTest {
 
     private NetconfOperationChainedExecution operation;
index 4218176f1d8ff7297f769c9c0f097287c5ae24a8..4ca50f6a1cb1aaeb92ea65d6a5313270fb95e18a 100644 (file)
@@ -14,6 +14,7 @@ import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
+
 import com.google.common.base.Optional;
 import org.junit.Before;
 import org.junit.Test;
index b335165706e137ae2fd840a90c988c38b88329a7..c06e78aa997cfaafdc5dd2624d784a33bb047364 100644 (file)
@@ -8,6 +8,14 @@
 
 package org.opendaylight.controller.netconf.impl.mapping.operations;
 
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyString;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
 import io.netty.channel.Channel;
 import io.netty.channel.ChannelHandler;
 import io.netty.channel.ChannelPipeline;
@@ -17,9 +25,6 @@ import org.opendaylight.controller.netconf.util.xml.XmlElement;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Mockito.*;
-
 public class DefaultStopExiTest {
     @Test
     public void testHandleWithNoSubsequentOperations() throws Exception {
index fd9295a4b365fe7908b8a330cd205ae5ba2fa62c..413c9cc9452334640e3aab9269def616e99b1ff3 100644 (file)
@@ -8,6 +8,13 @@
 
 package org.opendaylight.controller.netconf.impl.osgi;
 
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.anyString;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
 import java.util.Arrays;
 import java.util.Dictionary;
 import org.junit.Before;
@@ -20,13 +27,6 @@ import org.osgi.framework.ServiceListener;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
 public class NetconfImplActivatorTest {
 
     @Mock
index 0d7158aa21de7fc02d69d85697f6031abbba6cfa..d744504bb2aa4160dfb6b57229a29e2623cad864 100644 (file)
@@ -8,6 +8,14 @@
 
 package org.opendaylight.controller.netconf.impl.osgi;
 
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.anyString;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
@@ -17,10 +25,6 @@ import org.osgi.framework.BundleContext;
 import org.osgi.framework.Filter;
 import org.osgi.framework.ServiceReference;
 
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.*;
-
 public class NetconfOperationServiceFactoryTrackerTest {
 
     @Mock
index 6512b4bd334e298785712dafb234993425fc00b8..946654e60e6b009a0fe4b7a639edc31c36363d2f 100644 (file)
@@ -8,6 +8,13 @@
 
 package org.opendaylight.controller.netconf.impl.util;
 
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyObject;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
 import io.netty.channel.Channel;
 import io.netty.channel.ChannelFuture;
 import io.netty.channel.ChannelHandlerContext;
@@ -15,8 +22,6 @@ import io.netty.util.concurrent.GenericFutureListener;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.mockito.Mockito.*;
-
 public class DeserializerExceptionHandlerTest {
 
     private DeserializerExceptionHandler handler;
index bd931c33d0212858b615aed61d843e1e6f1744d9..a724d1d9c5e4e8b6cec46cdb94f98a7158c48407 100644 (file)
@@ -78,9 +78,11 @@ public abstract class AbstractNetconfConfigTest extends AbstractConfigTest {
     public static final String LOOPBACK_ADDRESS = "127.0.0.1";
     public static final int SERVER_CONNECTION_TIMEOUT_MILLIS = 5000;
 
-    static ModuleFactory[] FACTORIES = { new TestImplModuleFactory(),
-            new DepTestImplModuleFactory(), new NetconfTestImplModuleFactory(),
-            new IdentityTestModuleFactory(), new MultipleDependenciesModuleFactory() };
+    static ModuleFactory[] FACTORIES = {new TestImplModuleFactory(),
+                                        new DepTestImplModuleFactory(),
+                                        new NetconfTestImplModuleFactory(),
+                                        new IdentityTestModuleFactory(),
+                                        new MultipleDependenciesModuleFactory() };
 
     private EventLoopGroup nettyThreadgroup;
     private HashedWheelTimer hashedWheelTimer;
index a9558c06cdcd34472315c9ac80019e55dbb98b71..463b5f045efa9ea1f34a3694198ecc7e26fdd937 100644 (file)
@@ -72,17 +72,17 @@ public class NetconfITMonitoringTest extends AbstractNetconfConfigTest {
         return TCP_ADDRESS;
     }
 
-    static SessionMonitoringService getNetconfMonitoringListenerService(final Logger logger, final NetconfMonitoringServiceImpl monitor) {
+    static SessionMonitoringService getNetconfMonitoringListenerService(final Logger LOG, final NetconfMonitoringServiceImpl monitor) {
         return new SessionMonitoringService() {
             @Override
             public void onSessionUp(final NetconfManagementSession session) {
-                logger.debug("Management session up {}", session);
+                LOG.debug("Management session up {}", session);
                 monitor.onSessionUp(session);
             }
 
             @Override
             public void onSessionDown(final NetconfManagementSession session) {
-                logger.debug("Management session down {}", session);
+                LOG.debug("Management session down {}", session);
                 monitor.onSessionDown(session);
             }
         };
index f76bf4f4c37ebf96c99ba0eeccc90c9280f773da..56015b962519a9fd4945e81a7875f1beb062da0f 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.controller.netconf.it;
 
+import com.google.common.base.Preconditions;
 import java.io.IOException;
 import java.io.InputStream;
 import java.security.KeyManagementException;
@@ -15,13 +16,10 @@ import java.security.KeyStoreException;
 import java.security.NoSuchAlgorithmException;
 import java.security.UnrecoverableKeyException;
 import java.security.cert.CertificateException;
-
 import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManagerFactory;
 
-import com.google.common.base.Preconditions;
-
 public final class SSLUtil {
 
     private SSLUtil() {}
index 3b3f71b0ed0f3aad635d88d6b0bb93a3e4229aa3..6ab3cd4b6e638999ed9fa1787b8b3b8652e09422 100644 (file)
@@ -24,7 +24,7 @@ import org.w3c.dom.Element;
 
 public class Get extends AbstractNetconfOperation {
 
-    private static final Logger logger = LoggerFactory.getLogger(Get.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Get.class);
     private final NetconfMonitoringService netconfMonitor;
 
     public Get(final NetconfMonitoringService netconfMonitor) {
@@ -72,7 +72,7 @@ public class Get extends AbstractNetconfOperation {
             return innerResult;
         } catch (final RuntimeException e) {
             final String errorMessage = "Get operation for netconf-state subtree failed";
-            logger.warn(errorMessage, e);
+            LOG.warn(errorMessage, e);
 
             throw new NetconfDocumentedException(errorMessage, NetconfDocumentedException.ErrorType.application,
                     NetconfDocumentedException.ErrorTag.operation_failed,
index 9d332c644029ff3c26a2725703e4b348ff046cf0..1411350cd3dce0fec1d4854e3eeabe580c4aef4d 100644 (file)
@@ -16,7 +16,7 @@ import org.slf4j.LoggerFactory;
 
 public class NetconfMonitoringActivator implements BundleActivator {
 
-    private static final Logger logger = LoggerFactory.getLogger(NetconfMonitoringActivator.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfMonitoringActivator.class);
 
     private NetconfMonitoringServiceTracker monitor;
 
@@ -32,7 +32,7 @@ public class NetconfMonitoringActivator implements BundleActivator {
             try {
                 monitor.close();
             } catch (Exception e) {
-                logger.warn("Ignoring exception while closing {}", monitor, e);
+                LOG.warn("Ignoring exception while closing {}", monitor, e);
             }
         }
     }
index f99ae54e6dafac6e9ea01f36e85ab46261d9ce67..0b4d1c2688d64307b51815b0d3b441f0ff9722ec 100644 (file)
@@ -20,7 +20,7 @@ import org.slf4j.LoggerFactory;
 
 public class NetconfMonitoringServiceTracker extends ServiceTracker<NetconfMonitoringService, NetconfMonitoringService> {
 
-    private static final Logger logger = LoggerFactory.getLogger(NetconfMonitoringServiceTracker.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfMonitoringServiceTracker.class);
 
     private ServiceRegistration<NetconfOperationServiceFactory> reg;
 
@@ -51,7 +51,7 @@ public class NetconfMonitoringServiceTracker extends ServiceTracker<NetconfMonit
             try {
                 reg.unregister();
             } catch (final Exception e) {
-                logger.warn("Ignoring exception while unregistering {}", reg, e);
+                LOG.warn("Ignoring exception while unregistering {}", reg, e);
             }
         }
     }
index 962ad17b66c280c5e7fb68cfc279ff30d79c2285..45f02af78994d1e87b8dc1c86c7b81e7e57d9f1a 100644 (file)
@@ -7,14 +7,13 @@
  */
 package org.opendaylight.controller.netconf.monitoring.xml;
 
-import org.opendaylight.controller.netconf.monitoring.xml.model.NetconfState;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
 import javax.xml.transform.dom.DOMResult;
+import org.opendaylight.controller.netconf.monitoring.xml.model.NetconfState;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
 public class JaxBSerializer {
 
@@ -29,7 +28,7 @@ public class JaxBSerializer {
             res = new DOMResult();
             marshaller.marshal(monitoringModel, res);
         } catch (final JAXBException e) {
-           throw new RuntimeException("Unable to serialize netconf state " + monitoringModel, e);
+            throw new RuntimeException("Unable to serialize netconf state " + monitoringModel, e);
         }
         return ((Document)res.getNode()).getDocumentElement();
     }
index 16b38eca5172a96a6254713dbefb6dbd44324949..259fd73197b44d32b758720f775d7573e36df4a5 100644 (file)
@@ -11,13 +11,12 @@ package org.opendaylight.controller.netconf.monitoring.xml.model;
 import com.google.common.base.Function;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Collections2;
+import java.util.Collection;
 import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.Yang;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.schemas.Schema;
-
 import javax.annotation.Nullable;
 import javax.xml.bind.annotation.XmlElement;
-import java.util.Collection;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.Yang;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.schemas.Schema;
 
 final class MonitoringSchema {
 
index 8685ef72208b15fd77845b7486724846d67780a4..c70db895bf19300be20d30e2d1b1b4ababbdccd0 100644 (file)
@@ -7,10 +7,9 @@
  */
 package org.opendaylight.controller.netconf.monitoring.xml.model;
 
+import com.google.common.base.Joiner;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlTransient;
-
-import com.google.common.base.Joiner;
 import org.opendaylight.controller.netconf.monitoring.MonitoringConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.extension.rev131210.Session1;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.sessions.Session;
index 8f5a1c029d8611b9f75c7b4570fc63002d9f1e18..58f5b1897b4f0d67d4544f9048b3afb60d05baca 100644 (file)
@@ -9,6 +9,11 @@ package org.opendaylight.controller.netconf.monitoring.xml.model;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Collections2;
+import java.util.Collection;
+import javax.annotation.Nullable;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
 import org.opendaylight.controller.netconf.api.monitoring.NetconfMonitoringService;
 import org.opendaylight.controller.netconf.monitoring.MonitoringConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.Schemas;
@@ -16,12 +21,6 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.mon
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.schemas.Schema;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.sessions.Session;
 
-import javax.annotation.Nullable;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.Collection;
-
 @XmlRootElement(name = MonitoringConstants.NETCONF_MONITORING_XML_ROOT_ELEMENT)
 public final class NetconfState {
 
index a96c3a3836e55309751011af56bcea32f39d069a..1e510d4ed0395117e2be2406ae627fb00a2bb919 100644 (file)
@@ -15,8 +15,7 @@
 )
 package org.opendaylight.controller.netconf.monitoring.xml.model;
 
-import org.opendaylight.controller.netconf.monitoring.MonitoringConstants;
-
 import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchema;
\ No newline at end of file
+import javax.xml.bind.annotation.XmlSchema;
+import org.opendaylight.controller.netconf.monitoring.MonitoringConstants;
\ No newline at end of file
index b5b9f3c060f5bdf6c98abf832c256ab894ad95c2..6664f3e733bc399bd08d710dfbed882a36baa24e 100644 (file)
@@ -14,6 +14,7 @@ import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
+
 import java.util.Arrays;
 import org.junit.Before;
 import org.junit.Test;
index b8e35e934b23dc8c064eebe809be12320f488aee..74e6747ab79608b9c13fefd37348d0e3e18555e4 100644 (file)
@@ -8,14 +8,14 @@
 
 package org.opendaylight.controller.netconf.monitoring.osgi;
 
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+
 import com.google.common.base.Optional;
 import org.junit.Test;
 import org.opendaylight.controller.netconf.api.monitoring.NetconfMonitoringService;
 import org.opendaylight.controller.netconf.monitoring.MonitoringConstants;
 
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
-
 public class NetconfMonitoringOperationServiceTest {
     @Test
     public void testGetters() throws Exception {
index b992b0e44f363deaba01eeca50d9194d40fefc81..de716ccf6635e9a0eebb1c312170cc02658a21cd 100644 (file)
@@ -9,11 +9,12 @@
 package org.opendaylight.controller.netconf.monitoring.osgi;
 
 import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.anyString;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
+
 import java.util.Hashtable;
 import org.junit.Before;
 import org.junit.Test;