Improved unit tests for AveragingProgressTracker class
[controller.git] / opendaylight / md-sal / sal-dom-xsql / src / main / java / org / opendaylight / controller / md / sal / dom / xsql / jdbc / JDBCServer.java
index 31941e496b4666108b2d03c84939044d288eef3b..2b50a4d87e0e4cd9158a54d99b5637f287d0b4ff 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2014, 2015 Cisco Systems, Inc. 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.controller.md.sal.dom.xsql.jdbc;
 
 import java.net.ServerSocket;
@@ -15,6 +23,10 @@ import org.opendaylight.controller.md.sal.dom.xsql.XSQLBluePrintNode;
 import org.opendaylight.controller.md.sal.dom.xsql.XSQLColumn;
 import org.opendaylight.controller.md.sal.dom.xsql.XSQLCriteria;
 
+/**
+ * To be removed in Nitrogen
+ */
+@Deprecated
 public class JDBCServer extends Thread {
     private ServerSocket socket = null;
     private XSQLAdapter adapter = null;
@@ -98,8 +110,8 @@ public class JDBCServer extends Thread {
             return;
         }
 
-        Map<String, XSQLBluePrintNode> logicalNameToNode = new HashMap<String, XSQLBluePrintNode>();
-        Map<String, String> origNameToName = new HashMap<String, String>();
+        Map<String, XSQLBluePrintNode> logicalNameToNode = new HashMap<>();
+        Map<String, String> origNameToName = new HashMap<>();
         List<XSQLColumn> columnOrder = new ArrayList<>();
         int nextLogField = addNextLogicalField(sql, 0,
                 logicalNameToNode, origNameToName,columnOrder);
@@ -261,12 +273,12 @@ public class JDBCServer extends Thread {
         Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = rs.getCriteria().get(
                 col.getTableName());
         if (tblCriteria == null) {
-            tblCriteria = new ConcurrentHashMap<XSQLColumn, List<XSQLCriteria>>();
+            tblCriteria = new ConcurrentHashMap<>();
             rs.getCriteria().put(col.getTableName(), tblCriteria);
         }
         List<XSQLCriteria> lstCriteria = tblCriteria.get(col);
         if (lstCriteria == null) {
-            lstCriteria = new ArrayList<XSQLCriteria>();
+            lstCriteria = new ArrayList<>();
             tblCriteria.put(col, lstCriteria);
         }
         lstCriteria.add(c);