/*
 * Copyright (c) 2013, 2015 EBay Software Foundation and others. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

package org.opendaylight.ovsdb.lib.message;

import org.opendaylight.ovsdb.lib.notation.json.Converter.UpdateNotificationConverter;
import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;

import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

@JsonDeserialize(converter = UpdateNotificationConverter.class)
public class UpdateNotification {
    Object context;
    DatabaseSchema databaseSchema;
    TableUpdates update;
    private JsonNode updatesJson;

    public Object getContext() {
        return context;
    }
    public void setContext(Object context) {
        this.context = context;
    }
    public TableUpdates getUpdate() {
        return update;
    }
    public void setUpdate(TableUpdates update) {
        this.update = update;
    }

    @JsonAnySetter
    public void setValue(String key, JsonNode val) {
        System.out.println("key = " + key);
        System.out.println("val = " + val);
        System.out.println();
    }

    public void setUpdates(JsonNode jsonNode) {
        this.updatesJson = jsonNode;
    }

    public JsonNode getUpdates() {
        return updatesJson;
    }

    public DatabaseSchema getDatabaseSchema() {
        return databaseSchema;
    }
    public void setDatabaseSchema(DatabaseSchema databaseSchema) {
        this.databaseSchema = databaseSchema;
    }
}

@@ -311,17 +311,16 @@
 tml%0A */%0A
-%0A
 package 
@@ -360,153 +360,8 @@
 e;%0A%0A
-import org.opendaylight.ovsdb.lib.notation.json.Converter.UpdateNotificationConverter;%0Aimport org.opendaylight.ovsdb.lib.schema.DatabaseSchema;%0A%0A
 impo
@@ -524,16 +524,217 @@
 rialize;
+%0Aimport org.opendaylight.ovsdb.lib.notation.json.Converter.UpdateNotificationConverter;%0Aimport org.opendaylight.ovsdb.lib.schema.DatabaseSchema;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;
 %0A%0A@JsonD
@@ -825,20 +825,119 @@
 ation %7B%0A
+%0A
     
+private static final Logger LOG = LoggerFactory.getLogger(UpdateNotification.class);%0A%0A    private 
 Object c
@@ -948,16 +948,24 @@
 xt;%0A    
+private 
 Database
@@ -991,16 +991,24 @@
 ma;%0A    
+private 
 TableUpd
@@ -1110,32 +1110,33 @@
  context;%0A    %7D%0A
+%0A
     public void 
@@ -1194,32 +1194,33 @@
  context;%0A    %7D%0A
+%0A
     public Table
@@ -1262,32 +1262,33 @@
 n update;%0A    %7D%0A
+%0A
     public void 
@@ -1441,115 +1441,112 @@
     
-System.out.println(%22key = %22 + key);%0A        System.out.println(%22val = %22 + val);%0A        System.out.println(
+LOG.error(%22setValue: Unexpected JSON property caught by @JsonAnySetter: key = %7B%7D, value = %7B%7D %22, key, val
 );%0A 
@@ -1798,16 +1798,17 @@
 ;%0A    %7D%0A
+%0A
     publ

Use logger instead of System.out.println (found by Checkstyle)