Make UpdateNotification context a String 74/70074/4
authorStephen Kitt <skitt@redhat.com>
Mon, 26 Mar 2018 00:14:20 +0000 (17:14 -0700)
committerSam Hague <shague@redhat.com>
Sat, 23 Jun 2018 21:23:34 +0000 (21:23 +0000)
UpdateNotification contexts are always strings, use the appropriate
type.

Change-Id: I59cba1fbef199861c3792a65ad3fe07bf894c9c4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbClientImpl.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/UpdateNotification.java

index 0b5e045a30a4ba60eb559d86753cc12d4c7c32d3..47970d3e9db7b161bbbe312399b063a78e1c12f3 100644 (file)
@@ -125,7 +125,7 @@ public class OvsdbClientImpl implements OvsdbClient {
             OvsdbRPC.Callback temp = new OvsdbRPC.Callback() {
                 @Override
                 public void update(Object node, UpdateNotification updateNotification) {
-                    Object key = updateNotification.getContext();
+                    String key = updateNotification.getContext();
                     CallbackContext callbackContext = monitorCallbacks.get(key);
                     MonitorCallBack monitorCallBack = callbackContext.monitorCallBack;
                     if (monitorCallBack == null) {
index 18d1912efd3755daf956b507c68da016ce55e573..ca316f9ae50ff7d85029cfad269caeb3f3a238ae 100644 (file)
@@ -20,16 +20,16 @@ public class UpdateNotification {
 
     private static final Logger LOG = LoggerFactory.getLogger(UpdateNotification.class);
 
-    private Object context;
+    private String context;
     private DatabaseSchema databaseSchema;
     private TableUpdates update;
     private JsonNode updatesJson;
 
-    public Object getContext() {
+    public String getContext() {
         return context;
     }
 
-    public void setContext(Object context) {
+    public void setContext(String context) {
         this.context = context;
     }