Merge "Make idle timeout configurable in ssh proxy server"
authorTony Tkacik <ttkacik@cisco.com>
Mon, 10 Nov 2014 16:03:57 +0000 (16:03 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 10 Nov 2014 16:03:57 +0000 (16:03 +0000)
61 files changed:
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/SchemaContextTest.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ClientActor.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/messages/KeyValue.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/messages/KeyValueSaved.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/messages/PrintRole.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/messages/PrintState.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActor.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLogImplEntry.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/Snapshot.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/ApplyLogEntries.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/ApplySnapshot.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/ApplyState.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/CommitEntry.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/ElectionTimeout.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/PersistEntry.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/Replicate.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/SaveSnapshot.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/SendHeartBeat.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/client/messages/FindLeader.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/client/messages/FindLeaderReply.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/AbstractRaftRPC.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/AppendEntries.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/AppendEntriesReply.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/InstallSnapshot.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/InstallSnapshotReply.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVote.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MockRaftActorContext.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/CandidateTest.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/MeteredBoundedMailbox.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/Monitor.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/raft/protobuff/client/messages/CompositeModificationPayload.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/common/actor/MeteredBoundedMailboxTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/xml/codec/XmlUtilsTest.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistration.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardManager.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/NotInitializedException.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/PrimaryNotFoundException.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/TimeoutException.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/UnknownMessageException.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ActorInitialized.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ActorNotInitialized.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardManagerTest.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/XSQLColumn.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/jdbc/JDBCCommand.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/jdbc/JDBCResultSet.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/jdbc/JDBCStatement.java
opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/util/NetconfMessageTransformUtil.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcManager.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteRpc.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/InvokeRpc.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/RpcResponse.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RoutingTable.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/gossip/BucketImpl.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/gossip/Messages.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java
opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/SshClientChannelInitializerTest.java
opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/TcpClientChannelInitializerTest.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/PaginatedRequestFactory.java

index 1837bac..b72d85c 100644 (file)
@@ -95,7 +95,7 @@ public class SchemaContextTest extends AbstractYangTest {
             }
         }
         assertEquals("Expected identities not found " + copyOfExpectedNames,
-                Collections.EMPTY_MAP, copyOfExpectedNames);
+                Collections.emptyMap(), copyOfExpectedNames);
     }
 
     @Test
index 2560f16..59bec91 100644 (file)
@@ -29,6 +29,7 @@ public class ClientActor extends UntypedActor {
 
     public static Props props(final ActorRef target){
         return Props.create(new Creator<ClientActor>(){
+            private static final long serialVersionUID = 1L;
 
             @Override public ClientActor create() throws Exception {
                 return new ClientActor(target);
index cb375c2..8e4a44c 100644 (file)
@@ -52,6 +52,7 @@ public class ExampleActor extends RaftActor {
     public static Props props(final String id, final Map<String, String> peerAddresses,
         final Optional<ConfigParams> configParams){
         return Props.create(new Creator<ExampleActor>(){
+            private static final long serialVersionUID = 1L;
 
             @Override public ExampleActor create() throws Exception {
                 return new ExampleActor(id, peerAddresses, configParams);
index 617bb7e..042b9fb 100644 (file)
@@ -739,9 +739,9 @@ public abstract class RaftActor extends AbstractUntypedPersistentActor {
     }
 
     static class DeleteEntries implements Serializable {
+        private static final long serialVersionUID = 1L;
         private final int fromIndex;
 
-
         public DeleteEntries(int fromIndex) {
             this.fromIndex = fromIndex;
         }
@@ -792,6 +792,7 @@ public abstract class RaftActor extends AbstractUntypedPersistentActor {
     }
 
     static class UpdateElectionTerm implements Serializable {
+        private static final long serialVersionUID = 1L;
         private final long currentTerm;
         private final String votedFor;
 
index fc2ec5c..ceb5633 100644 (file)
@@ -14,6 +14,7 @@ import java.io.Serializable;
 
 public class ReplicatedLogImplEntry implements ReplicatedLogEntry,
     Serializable {
+    private static final long serialVersionUID = 1L;
 
     private final long index;
     private final long term;
index 8e0fcca..77bf103 100644 (file)
@@ -12,6 +12,7 @@ import java.util.List;
 
 
 public class Snapshot implements Serializable {
+    private static final long serialVersionUID = 1L;
     private final byte[] state;
     private final List<ReplicatedLogEntry> unAppliedEntries;
     private final long lastIndex;
index c356804..54ee02a 100644 (file)
@@ -16,6 +16,7 @@ import java.io.Serializable;
  * Internal message, issued by follower to its actor
  */
 public class ApplySnapshot implements Serializable {
+    private static final long serialVersionUID = 1L;
     private final Snapshot snapshot;
 
     public ApplySnapshot(Snapshot snapshot) {
index b904335..0a7a632 100644 (file)
@@ -14,6 +14,7 @@ import org.opendaylight.controller.cluster.raft.ReplicatedLogEntry;
 import java.io.Serializable;
 
 public class ApplyState implements Serializable {
+    private static final long serialVersionUID = 1L;
     private final ActorRef clientActor;
     private final String identifier;
     private final ReplicatedLogEntry replicatedLogEntry;
index 9bc737a..611c6ea 100644 (file)
@@ -14,6 +14,7 @@ import org.opendaylight.controller.cluster.raft.ReplicatedLogEntry;
 import java.io.Serializable;
 
 public class Replicate implements Serializable {
+    private static final long serialVersionUID = 1L;
     private final ActorRef clientActor;
     private final String identifier;
     private final ReplicatedLogEntry replicatedLogEntry;
index 64c7350..8b2e45a 100644 (file)
@@ -11,6 +11,7 @@ package org.opendaylight.controller.cluster.raft.client.messages;
 import java.io.Serializable;
 
 public class FindLeaderReply implements Serializable {
+    private static final long serialVersionUID = 1L;
     private final String leaderActor;
 
     public FindLeaderReply(String leaderActor) {
index 14eb8a4..e5aebaa 100644 (file)
@@ -24,10 +24,10 @@ import java.util.Map;
  * heartbeat (§5.2).
  */
 public class AppendEntries extends AbstractRaftRPC {
-
     public static final Class<AppendEntriesMessages.AppendEntries> SERIALIZABLE_CLASS = AppendEntriesMessages.AppendEntries.class;
 
     private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(AppendEntries.class);
+    private static final long serialVersionUID = 1L;
 
     // So that follower can redirect clients
     private final String leaderId;
index b923baa..a782eda 100644 (file)
@@ -12,6 +12,7 @@ package org.opendaylight.controller.cluster.raft.messages;
  * Reply for the AppendEntriesRpc message
  */
 public class AppendEntriesReply extends AbstractRaftRPC {
+    private static final long serialVersionUID = 1L;
 
     // true if follower contained entry matching
     // prevLogIndex and prevLogTerm
index 5a0cc95..3c4e811 100644 (file)
@@ -14,6 +14,7 @@ import org.opendaylight.controller.protobuff.messages.cluster.raft.InstallSnapsh
 public class InstallSnapshot extends AbstractRaftRPC {
 
     public static final Class<InstallSnapshotMessages.InstallSnapshot> SERIALIZABLE_CLASS = InstallSnapshotMessages.InstallSnapshot.class;
+    private static final long serialVersionUID = 1L;
 
     private final String leaderId;
     private final long lastIncludedIndex;
index d293a47..71e7ecc 100644 (file)
@@ -9,6 +9,7 @@
 package org.opendaylight.controller.cluster.raft.messages;
 
 public class InstallSnapshotReply extends AbstractRaftRPC {
+    private static final long serialVersionUID = 1L;
 
     // The followerId - this will be used to figure out which follower is
     // responding
index 6ef2a06..8321d0c 100644 (file)
@@ -12,6 +12,7 @@ package org.opendaylight.controller.cluster.raft.messages;
  * Invoked by candidates to gather votes (§5.2).
  */
 public class RequestVote extends AbstractRaftRPC {
+    private static final long serialVersionUID = 1L;
 
     // candidate requesting vote
     private String candidateId;
index df80b4e..da3ba5c 100644 (file)
@@ -9,6 +9,7 @@
 package org.opendaylight.controller.cluster.raft.messages;
 
 public class RequestVoteReply extends AbstractRaftRPC {
+    private static final long serialVersionUID = 1L;
 
     // true means candidate received vot
     private final boolean voteGranted;
index a1088aa..562ca21 100644 (file)
@@ -198,6 +198,7 @@ public class MockRaftActorContext implements RaftActorContext {
     }
 
     public static class MockPayload extends Payload implements Serializable {
+        private static final long serialVersionUID = 1L;
         private String value = "";
 
         public MockPayload(){
@@ -231,6 +232,7 @@ public class MockRaftActorContext implements RaftActorContext {
     }
 
     public static class MockReplicatedLogEntry implements ReplicatedLogEntry, Serializable {
+        private static final long serialVersionUID = 1L;
 
         private final long term;
         private final long index;
index 8244604..9eb2fb7 100644 (file)
@@ -85,6 +85,7 @@ public class RaftActorTest extends AbstractActorTest {
         private final RaftActor delegate;
 
         public static final class MockRaftActorCreator implements Creator<MockRaftActor> {
+            private static final long serialVersionUID = 1L;
             private final Map<String, String> peerAddresses;
             private final String id;
             private final Optional<ConfigParams> config;
@@ -237,7 +238,7 @@ public class RaftActorTest extends AbstractActorTest {
             super(actorSystem);
 
             raftActor = this.getSystem().actorOf(MockRaftActor.props(actorName,
-                    Collections.EMPTY_MAP, Optional.<ConfigParams>absent()), actorName);
+                    Collections.<String,String>emptyMap(), Optional.<ConfigParams>absent()), actorName);
 
         }
 
@@ -314,7 +315,7 @@ public class RaftActorTest extends AbstractActorTest {
             config.setHeartBeatInterval(new FiniteDuration(1, TimeUnit.DAYS));
 
             ActorRef followerActor = getSystem().actorOf(MockRaftActor.props(persistenceId,
-                    Collections.EMPTY_MAP, Optional.<ConfigParams>of(config)), persistenceId);
+                    Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config)), persistenceId);
 
             watch(followerActor);
 
@@ -368,7 +369,7 @@ public class RaftActorTest extends AbstractActorTest {
 
             //reinstate the actor
             TestActorRef<MockRaftActor> ref = TestActorRef.create(getSystem(),
-                    MockRaftActor.props(persistenceId, Collections.EMPTY_MAP,
+                    MockRaftActor.props(persistenceId, Collections.<String,String>emptyMap(),
                             Optional.<ConfigParams>of(config)));
 
             ref.underlyingActor().waitForRecoveryComplete();
@@ -401,7 +402,7 @@ public class RaftActorTest extends AbstractActorTest {
                 config.setHeartBeatInterval(new FiniteDuration(1, TimeUnit.DAYS));
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config)), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config)), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -470,7 +471,7 @@ public class RaftActorTest extends AbstractActorTest {
                 config.setHeartBeatInterval(new FiniteDuration(1, TimeUnit.DAYS));
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), new DataPersistenceProviderMonitor()), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), new DataPersistenceProviderMonitor()), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -535,7 +536,7 @@ public class RaftActorTest extends AbstractActorTest {
                 dataPersistenceProviderMonitor.setPersistLatch(persistLatch);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -562,7 +563,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -591,7 +592,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -620,7 +621,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -647,7 +648,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(),
-                    MockRaftActor.props(persistenceId,Collections.EMPTY_MAP,
+                    MockRaftActor.props(persistenceId,Collections.<String,String>emptyMap(),
                         Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
@@ -687,7 +688,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -746,7 +747,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -776,7 +777,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProviderMonitor dataPersistenceProviderMonitor = new DataPersistenceProviderMonitor();
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -831,7 +832,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProviderMonitor dataPersistenceProviderMonitor = new DataPersistenceProviderMonitor();
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
index fb02481..485ee4b 100644 (file)
@@ -9,17 +9,16 @@ import org.junit.Test;
 import org.opendaylight.controller.cluster.raft.DefaultConfigParamsImpl;
 import org.opendaylight.controller.cluster.raft.MockRaftActorContext;
 import org.opendaylight.controller.cluster.raft.RaftActorContext;
+import org.opendaylight.controller.cluster.raft.ReplicatedLogEntry;
 import org.opendaylight.controller.cluster.raft.base.messages.ElectionTimeout;
 import org.opendaylight.controller.cluster.raft.messages.AppendEntries;
 import org.opendaylight.controller.cluster.raft.messages.AppendEntriesReply;
 import org.opendaylight.controller.cluster.raft.messages.RequestVote;
 import org.opendaylight.controller.cluster.raft.messages.RequestVoteReply;
 import org.opendaylight.controller.cluster.raft.utils.DoNothingActor;
-
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-
 import static org.junit.Assert.assertEquals;
 
 public class CandidateTest extends AbstractRaftActorBehaviorTest {
@@ -168,7 +167,7 @@ public class CandidateTest extends AbstractRaftActorBehaviorTest {
 
                     Candidate candidate = new Candidate(createActorContext(getTestActor()));
 
-                    candidate.handleMessage(getTestActor(), new AppendEntries(0, "test", 0,0,Collections.EMPTY_LIST, 0));
+                    candidate.handleMessage(getTestActor(), new AppendEntries(0, "test", 0,0,Collections.<ReplicatedLogEntry>emptyList(), 0));
 
                     final Boolean out = new ExpectMsg<Boolean>(duration("1 seconds"), "AppendEntriesResponse") {
                         // do not put code outside this method, will run afterwards
index 7517efe..9b4560c 100644 (file)
@@ -60,19 +60,20 @@ public class MeteredBoundedMailbox implements MailboxType, ProducesMessageQueue<
         if (registry.getMetrics().containsKey(metricName))
             return; //already registered
 
-        Gauge queueSize = getQueueSizeGuage(monitoredQueue);
+        Gauge<Integer> queueSize = getQueueSizeGuage(monitoredQueue);
         registerQueueSizeMetric(metricName, queueSize);
     }
 
 
     public static class MeteredMessageQueue extends BoundedDequeBasedMailbox.MessageQueue {
+        private static final long serialVersionUID = 1L;
 
         public MeteredMessageQueue(int capacity, FiniteDuration pushTimeOut) {
             super(capacity, pushTimeOut);
         }
     }
 
-    private Gauge getQueueSizeGuage(final MeteredMessageQueue monitoredQueue ){
+    private Gauge<Integer> getQueueSizeGuage(final MeteredMessageQueue monitoredQueue ){
         return new Gauge<Integer>() {
             @Override
             public Integer getValue() {
@@ -81,7 +82,7 @@ public class MeteredBoundedMailbox implements MailboxType, ProducesMessageQueue<
         };
     }
 
-    private void registerQueueSizeMetric(String metricName, Gauge metric){
+    private void registerQueueSizeMetric(String metricName, Gauge<Integer> metric){
         try {
             registry.register(metricName,metric);
         } catch (IllegalArgumentException e) {
index 88ce791..f81b34a 100644 (file)
@@ -13,6 +13,7 @@ import akka.actor.ActorRef;
 import java.io.Serializable;
 
 public class Monitor implements Serializable {
+    private static final long serialVersionUID = 1L;
     private final ActorRef actorRef;
 
     public Monitor(ActorRef actorRef){
index d33e79f..60efb9d 100644 (file)
@@ -81,6 +81,7 @@ public class MeteredBoundedMailboxTest {
 
         public static Props props(final ReentrantLock lock){
             return Props.create(new Creator<PingPongActor>(){
+                private static final long serialVersionUID = 1L;
                 @Override
                 public PingPongActor create() throws Exception {
                     return new PingPongActor(lock);
index 60dbcb0..2574bd6 100644 (file)
@@ -81,13 +81,13 @@ public class XmlUtilsTest {
   @Test
   public void testInputXmlToCompositeNode() {
     CompositeNode node = XmlUtils.inputXmlToCompositeNode(testRpc.getQName(), XML_CONTENT, schema);
-    ImmutableList<SimpleNode> input = (ImmutableList)node.getValue().get(0).getValue();
-    SimpleNode firstNode = input.get(0);
+    ImmutableList<SimpleNode<?>> input = (ImmutableList<SimpleNode<?>>)node.getValue().get(0).getValue();
+    SimpleNode<?> firstNode = input.get(0);
 
     Assert.assertEquals("id", firstNode.getNodeType().getLocalName());
     Assert.assertEquals("flowid", firstNode.getValue());
 
-    SimpleNode secondNode = input.get(1);
+    SimpleNode<?> secondNode = input.get(1);
     Assert.assertEquals("flow", secondNode.getNodeType().getLocalName());
 
     YangInstanceIdentifier instance = (YangInstanceIdentifier) secondNode.getValue();
@@ -104,7 +104,7 @@ public class XmlUtilsTest {
   @Test
   public void testInputCompositeNodeToXML() {
     CompositeNode input = XmlUtils.inputXmlToCompositeNode(testRpc.getQName(), XML_CONTENT, schema);
-    List<Node<?>> childNodes = new ArrayList();
+    List<Node<?>> childNodes = new ArrayList<>();
     childNodes.add(input);
     QName rpcQName = schema.getOperations().iterator().next().getQName();
     CompositeNode node = new ImmutableCompositeNode(rpcQName, input.getValue(), ModifyAction.REPLACE);
index 3426112..a8d7d22 100644 (file)
@@ -53,6 +53,7 @@ public class DataChangeListenerRegistration extends AbstractUntypedActor {
 
     private static class DataChangeListenerRegistrationCreator
                                             implements Creator<DataChangeListenerRegistration> {
+        private static final long serialVersionUID = 1L;
         final ListenerRegistration<AsyncDataChangeListener<YangInstanceIdentifier,
                                                            NormalizedNode<?, ?>>> registration;
 
index c7213e6..88f818f 100644 (file)
@@ -556,6 +556,7 @@ public class ShardManager extends AbstractUntypedPersistentActorWithMetering {
     }
 
     static class SchemaContextModules implements Serializable {
+        private static final long serialVersionUID = 1L;
         private final Set<String> modules;
 
         SchemaContextModules(Set<String> modules){
index f6eb6d7..e70d79c 100644 (file)
@@ -387,6 +387,7 @@ public class ShardManagerTest extends AbstractActorTest {
             throws Exception {
         final CountDownLatch persistLatch = new CountDownLatch(1);
         final Creator<ShardManager> creator = new Creator<ShardManager>() {
+            private static final long serialVersionUID = 1L;
             @Override
             public ShardManager create() throws Exception {
                 return new ShardManager(shardMrgIDSuffix, new MockClusterWrapper(), new MockConfiguration(), DatastoreContext.newBuilder().build()) {
@@ -466,6 +467,7 @@ public class ShardManagerTest extends AbstractActorTest {
     }
 
     private static class DelegatingShardManagerCreator implements Creator<ShardManager> {
+        private static final long serialVersionUID = 1L;
         private Creator<ShardManager> delegate;
 
         public DelegatingShardManagerCreator(Creator<ShardManager> delegate) {
index d3d57bd..c1404d5 100644 (file)
@@ -2,7 +2,9 @@ package org.opendaylight.controller.md.sal.dom.xsql;
 
 import java.io.Serializable;
 
-public class XSQLColumn implements Serializable, Comparable {
+public class XSQLColumn implements Serializable, Comparable<Object> {
+    private static final long serialVersionUID = 4854919735031714751L;
+
     private String name = null;
     private String tableName = null;
     private int charWidth = -1;
index 0197111..ba0626f 100644 (file)
@@ -6,6 +6,8 @@ import java.util.Map;
 import org.opendaylight.controller.md.sal.dom.xsql.XSQLBluePrint;
 
 public class JDBCCommand implements Serializable {
+    private static final long serialVersionUID = 1L;
+
     public int type = 0;
     public static final int TYPE_EXECUTE_QUERY = 1;
     public static final int TYPE_QUERY_REPLY = 2;
index e47bf87..5abe8a3 100644 (file)
@@ -207,7 +207,7 @@ public class JDBCResultSet implements Serializable, ResultSet,
         }
     }
 
-    public void addRecord(ArrayList hierarchy) {
+    public void addRecord(ArrayList<?> hierarchy) {
         Map rec = new HashMap();
         for (int i = hierarchy.size() - 1; i >= 0; i--) {
             Object element = hierarchy.get(i);
index b71b015..27e2196 100644 (file)
@@ -89,7 +89,7 @@ public class JDBCStatement implements PreparedStatement {
         return true;
     }
 
-    public void addRecord(ArrayList hierarchy) {
+    public void addRecord(ArrayList<?> hierarchy) {
         rs.addRecord(hierarchy);
     }
 
index 2e5f807..6117a21 100644 (file)
@@ -118,7 +118,7 @@ public class NetconfMessageTransformUtil {
     static Node<?> toNode(final YangInstanceIdentifier.NodeIdentifierWithPredicates argument, final Node<?> node) {
         final List<Node<?>> list = new ArrayList<>();
         for (final Map.Entry<QName, Object> arg : argument.getKeyValues().entrySet()) {
-            list.add(new SimpleNodeTOImpl(arg.getKey(), null, arg.getValue()));
+            list.add(new SimpleNodeTOImpl<>(arg.getKey(), null, arg.getValue()));
         }
         if (node != null) {
             list.add(node);
index 4ae9c2e..a840712 100644 (file)
@@ -65,6 +65,7 @@ public class RpcManager extends AbstractUntypedActor {
                             final Broker.ProviderSession brokerSession,
                             final RpcProvisionRegistry rpcProvisionRegistry) {
     return Props.create(new Creator<RpcManager>() {
+      private static final long serialVersionUID = 1L;
       @Override
       public RpcManager create() throws Exception {
         return new RpcManager(schemaContext, brokerSession, rpcProvisionRegistry);
index 522dd44..4bb5258 100644 (file)
@@ -14,6 +14,7 @@ import org.opendaylight.yangtools.yang.common.QName;
 import java.io.Serializable;
 
 public class ExecuteRpc implements Serializable {
+  private static final long serialVersionUID = 1L;
 
   private final String inputCompositeNode;
   private final QName rpc;
index 59d09fc..652569b 100644 (file)
@@ -15,6 +15,7 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import java.io.Serializable;
 
 public class InvokeRpc implements Serializable {
+  private static final long serialVersionUID = 1L;
 
   private final QName rpc;
   private final YangInstanceIdentifier identifier;
index 17766f1..387cb90 100644 (file)
@@ -7,11 +7,10 @@
  */
 package org.opendaylight.controller.remote.rpc.messages;
 
-
-
 import java.io.Serializable;
 
 public class RpcResponse implements Serializable {
+  private static final long serialVersionUID = 1L;
   private final String resultCompositeNode;
 
   public RpcResponse(final String resultCompositeNode) {
index d21d05d..fe8c463 100644 (file)
@@ -18,6 +18,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 public class RoutingTable implements Copier<RoutingTable>, Serializable {
+    private static final long serialVersionUID = 1L;
 
     private Map<RpcRouter.RouteIdentifier<?, ?, ?>, Long> table = new HashMap<>();
     private ActorRef router;
index 4dac456..01c77f1 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.remote.rpc.registry.gossip;
 import java.io.Serializable;
 
 public class BucketImpl<T extends Copier<T>> implements Bucket<T>, Serializable {
+    private static final long serialVersionUID = 1L;
 
     private Long version = System.currentTimeMillis();
 
index bf8b202..4e8f2c6 100644 (file)
@@ -29,9 +29,12 @@ public class Messages {
 
     public static class BucketStoreMessages{
 
-        public static class GetLocalBucket implements Serializable{}
+        public static class GetLocalBucket implements Serializable {
+            private static final long serialVersionUID = 1L;
+        }
 
         public static class ContainsBucket implements Serializable {
+            private static final long serialVersionUID = 1L;
             final private Bucket bucket;
 
             public ContainsBucket(Bucket bucket){
@@ -46,20 +49,25 @@ public class Messages {
         }
 
         public static class UpdateBucket extends ContainsBucket implements Serializable {
+            private static final long serialVersionUID = 1L;
             public UpdateBucket(Bucket bucket){
                 super(bucket);
             }
         }
 
         public static class GetLocalBucketReply extends ContainsBucket implements Serializable {
+            private static final long serialVersionUID = 1L;
             public GetLocalBucketReply(Bucket bucket){
                 super(bucket);
             }
         }
 
-        public static class GetAllBuckets implements Serializable{}
+        public static class GetAllBuckets implements Serializable {
+            private static final long serialVersionUID = 1L;
+        }
 
         public static class GetBucketsByMembers implements Serializable{
+            private static final long serialVersionUID = 1L;
             private Set<Address> members;
 
             public GetBucketsByMembers(Set<Address> members){
@@ -73,6 +81,7 @@ public class Messages {
         }
 
         public static class ContainsBuckets implements Serializable{
+            private static final long serialVersionUID = 1L;
             private Map<Address, Bucket> buckets;
 
             public ContainsBuckets(Map<Address, Bucket> buckets){
@@ -94,20 +103,25 @@ public class Messages {
         }
 
         public static class GetAllBucketsReply extends ContainsBuckets implements Serializable{
+            private static final long serialVersionUID = 1L;
             public GetAllBucketsReply(Map<Address, Bucket> buckets) {
                 super(buckets);
             }
         }
 
         public static class GetBucketsByMembersReply extends ContainsBuckets implements Serializable{
+            private static final long serialVersionUID = 1L;
             public GetBucketsByMembersReply(Map<Address, Bucket> buckets) {
                 super(buckets);
             }
         }
 
-        public static class GetBucketVersions implements Serializable{}
+        public static class GetBucketVersions implements Serializable {
+            private static final long serialVersionUID = 1L;
+        }
 
         public static class ContainsBucketVersions implements Serializable{
+            private static final long serialVersionUID = 1L;
             Map<Address, Long> versions;
 
             public ContainsBucketVersions(Map<Address, Long> versions) {
@@ -123,12 +137,14 @@ public class Messages {
         }
 
         public static class GetBucketVersionsReply extends ContainsBucketVersions implements Serializable{
+            private static final long serialVersionUID = 1L;
             public GetBucketVersionsReply(Map<Address, Long> versions) {
                 super(versions);
             }
         }
 
         public static class UpdateRemoteBuckets extends ContainsBuckets implements Serializable{
+            private static final long serialVersionUID = 1L;
             public UpdateRemoteBuckets(Map<Address, Bucket> buckets) {
                 super(buckets);
             }
@@ -136,11 +152,16 @@ public class Messages {
     }
 
     public static class GossiperMessages{
-        public static class Tick implements Serializable {}
+        public static class Tick implements Serializable {
+            private static final long serialVersionUID = 1L;
+        }
 
-        public static final class GossipTick extends Tick {}
+        public static final class GossipTick extends Tick {
+            private static final long serialVersionUID = 1L;
+        }
 
         public static final class GossipStatus extends ContainsBucketVersions implements Serializable{
+            private static final long serialVersionUID = 1L;
             private Address from;
 
             public GossipStatus(Address from, Map<Address, Long> versions) {
@@ -154,6 +175,7 @@ public class Messages {
         }
 
         public static final class GossipEnvelope extends ContainsBuckets implements Serializable {
+            private static final long serialVersionUID = 1L;
             private final Address from;
             private final Address to;
 
index e61b54f..cf42ebf 100644 (file)
@@ -71,7 +71,7 @@ public class GossiperTest {
     @Test
     public void testReceiveGossipTick_WhenNoRemoteMemberShouldIgnore(){
 
-        mockGossiper.setClusterMembers(Collections.EMPTY_LIST);
+        mockGossiper.setClusterMembers(Collections.<Address>emptyList());
         doNothing().when(mockGossiper).getLocalStatusAndSendTo(any(Address.class));
         mockGossiper.receiveGossipTick();
         verify(mockGossiper, times(0)).getLocalStatusAndSendTo(any(Address.class));
index 0830c29..8c55d8c 100644 (file)
@@ -29,7 +29,7 @@ public class SshClientChannelInitializerTest {
         NetconfClientSessionNegotiatorFactory negotiatorFactory = mock(NetconfClientSessionNegotiatorFactory.class);
         NetconfClientSessionListener sessionListener = mock(NetconfClientSessionListener.class);
 
-        SessionNegotiator sessionNegotiator = mock(SessionNegotiator.class);
+        SessionNegotiator<?> sessionNegotiator = mock(SessionNegotiator.class);
         doReturn("").when(sessionNegotiator).toString();
         doReturn(sessionNegotiator).when(negotiatorFactory).getSessionNegotiator(any(SessionListenerFactory.class), any(Channel.class), any(Promise.class));
         ChannelPipeline pipeline = mock(ChannelPipeline.class);
index 369f0ed..9c57565 100644 (file)
@@ -22,7 +22,7 @@ public class TcpClientChannelInitializerTest {
     @Test
     public void testInitializeSessionNegotiator() throws Exception {
         NetconfClientSessionNegotiatorFactory factory = mock(NetconfClientSessionNegotiatorFactory.class);
-        SessionNegotiator sessionNegotiator = mock(SessionNegotiator.class);
+        SessionNegotiator<?> sessionNegotiator = mock(SessionNegotiator.class);
         doReturn("").when(sessionNegotiator).toString();
         doReturn(sessionNegotiator).when(factory).getSessionNegotiator(any(SessionListenerFactory.class), any(Channel.class), any(Promise.class));
         NetconfClientSessionListener listener = mock(NetconfClientSessionListener.class);
index 5f9653f..7f6c296 100644 (file)
@@ -23,6 +23,12 @@ import org.opendaylight.controller.northbound.commons.exception.BadRequestExcept
 import org.opendaylight.controller.northbound.commons.exception.ResourceNotFoundException;
 
 public class PaginatedRequestFactory {
+    private static final Comparator<INeutronObject> NEUTRON_OBJECT_COMPARATOR = new Comparator<INeutronObject>() {
+        @Override
+        public int compare(INeutronObject o1, INeutronObject o2) {
+            return o1.getID().compareTo(o2.getID());
+        }
+    };
 
     public static class PaginationResults<T extends INeutronObject> {
         List<T> collection;
@@ -34,6 +40,24 @@ public class PaginatedRequestFactory {
         }
     }
 
+    private static final class MarkerObject implements INeutronObject {
+        private final String id;
+
+        MarkerObject(String id) {
+            this.id = id;
+        }
+
+        @Override
+        public String getID() {
+            return id;
+        }
+
+        @Override
+        public void setID(String id) {
+            throw new UnsupportedOperationException("Marker has constant ID");
+        }
+    }
+
     /*
      * SuppressWarnings is needed because the compiler does not understand that we
      * are actually safe here.
@@ -62,58 +86,29 @@ public class PaginatedRequestFactory {
 
     private static <T extends INeutronObject> PaginationResults<T> _paginate(Integer limit, String marker, Boolean pageReverse, UriInfo uriInfo, List<T> collection) {
         List<NeutronPageLink> links = new ArrayList<>();
-        Integer startPos = null;
+        final int startPos;
         String startMarker;
         String endMarker;
         Boolean firstPage = false;
         Boolean lastPage = false;
 
-        Comparator<INeutronObject> neutronObjectComparator = new Comparator<INeutronObject>() {
-            @Override
-            public int compare(INeutronObject o1, INeutronObject o2) {
-                return o1.getID().compareTo(o2.getID());
-            }
-        };
-
-        Collections.sort(collection, neutronObjectComparator);
+        Collections.sort(collection, NEUTRON_OBJECT_COMPARATOR);
 
-        if (marker == null) {
-            startPos = 0;
-        }
-
-        else {
-
-            class MarkerObject implements INeutronObject {
-                private String id;
-
-                @Override
-                public String getID() {
-                    return id;
-                }
-
-                @Override
-                public void setID(String id) {
-                    this.id = id;
-                }
+        if (marker != null) {
+            int offset = Collections.binarySearch(collection, new MarkerObject(marker), NEUTRON_OBJECT_COMPARATOR);
+            if (offset < 0) {
+                throw new ResourceNotFoundException("UUID for marker: " + marker + " could not be found");
             }
 
-            INeutronObject markerObject = new MarkerObject();
-
-            markerObject.setID(marker);
-
-            startPos = Collections.binarySearch(collection, markerObject, neutronObjectComparator);
-
-            if (!pageReverse){
-                startPos = startPos + 1;
+            if (!pageReverse) {
+                startPos = offset + 1;
             }
             else {
-                startPos = startPos - limit;
+                startPos = offset - limit;
             }
-
         }
-
-        if (startPos == null) {
-            throw new ResourceNotFoundException("UUID for marker:" + marker + " could not be found");
+        else {
+            startPos = 0;
         }
 
         if (startPos == 0){