Merge "Remove dead code in RuntimeMappingModule"
authorTony Tkacik <ttkacik@cisco.com>
Mon, 10 Nov 2014 08:54:36 +0000 (08:54 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 10 Nov 2014 08:54:36 +0000 (08:54 +0000)
23 files changed:
features/base/pom.xml
opendaylight/commons/httpclient/pom.xml
opendaylight/commons/integrationtest/pom.xml
opendaylight/commons/opendaylight/pom.xml
opendaylight/distribution/opendaylight-karaf-empty/pom.xml
opendaylight/distribution/opendaylight-karaf/pom.xml
opendaylight/distribution/opendaylight/pom.xml
opendaylight/md-sal/sal-akka-raft/pom.xml
opendaylight/md-sal/sal-binding-broker/pom.xml
opendaylight/md-sal/sal-binding-dom-it/pom.xml
opendaylight/md-sal/sal-clustering-commons/pom.xml
opendaylight/md-sal/sal-dom-broker/pom.xml
opendaylight/md-sal/sal-remoterpc-connector/pom.xml
opendaylight/md-sal/sal-rest-docgen/pom.xml
opendaylight/md-sal/statistics-manager/pom.xml
opendaylight/netconf/netconf-netty-util/pom.xml
opendaylight/netconf/pom.xml
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNetworkRequest.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronPortRequest.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSubnetRequest.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/PaginatedRequestFactory.java
opendaylight/topologymanager/implementation/pom.xml
opendaylight/topologymanager/shell/pom.xml

index cd84eeaf3395df9718dad12e9e9c006d82d39d04..3dbb9391b0606c6c1cfd9238d77bfaaddff136bf 100644 (file)
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>features-test</artifactId>
-      <version>0.7.0-SNAPSHOT</version>
     </dependency>
     <!-- dependency for opendaylight-karaf-empty for use by testing -->
     <dependency>
index 39364cbcbaee86d2fdf238b1825c5092d79beafa..3848044b430441b90b2659af24416f649fb047b5 100644 (file)
@@ -62,7 +62,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <failsOnError>true</failsOnError>
           <configLocation>controller/checkstyle.xml</configLocation>
index ad4e166cbd492fbd2279a8fe3e4fa10545ac7e2e..4769a03b2fee6de9c1b241a57638fe254e1ac5f0 100644 (file)
@@ -80,7 +80,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <failsOnError>true</failsOnError>
           <configLocation>controller/checkstyle.xml</configLocation>
@@ -96,7 +95,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>${surefire.version}</version>
         <configuration>
           <skipTests>true</skipTests>
         </configuration>
index ae37f4ae2aaed13ebbef886d17bca420dc9d92eb..f61094ab48c501beb2a8d77b55faf06217d44a0f 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <failsOnError>true</failsOnError>
           <configLocation>controller/checkstyle.xml</configLocation>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>${surefire.version}</version>
         <configuration>
           <argLine>${testvm.argLine} ${jacoco.agent.ut.arg}</argLine>
           <systemProperties>
index 72eaf005add191a82a08c9f4f81db0b4fc11c0ba..a66a502a70e540b237799cc348da0b8fe0ef67ed 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
         </configuration>
index 3a2f4b058020f86c3f20faaa5f5e61c4a558dfbb..e44b569759d3b611d35fa730778ca7a16d565a00 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
         </configuration>
index f6ecb44fa172f02fd4cd5f34824325ad30629ef8..cd02759f5a13e4573f41c06ca0f0c34c8e762919 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
         </configuration>
         <dependency>
           <groupId>commons-lang</groupId>
           <artifactId>commons-lang</artifactId>
-          <version>2.4</version>
         </dependency>
         <dependency>
           <groupId>org.apache.servicemix.bundles</groupId>
         <dependency>
           <groupId>org.opendaylight.controller</groupId>
           <artifactId>sal-inmemory-datastore</artifactId>
-          <version>1.2.0-SNAPSHOT</version>
         </dependency>
         <dependency>
           <groupId>org.opendaylight.controller</groupId>
         <dependency>
           <groupId>org.opendaylight.controller.model</groupId>
           <artifactId>model-topology</artifactId>
-          <version>1.2.0-SNAPSHOT</version>
         </dependency>
 
         <!-- toaster example I'm pretty sure we should trim -->
         <dependency>
           <groupId>org.opendaylight.controller.samples</groupId>
           <artifactId>sample-toaster</artifactId>
-          <version>${mdsal.version}</version>
         </dependency>
         <dependency>
           <groupId>org.opendaylight.controller.samples</groupId>
           <artifactId>sample-toaster-consumer</artifactId>
-          <version>${mdsal.version}</version>
         </dependency>
         <dependency>
           <groupId>org.opendaylight.controller.samples</groupId>
           <artifactId>sample-toaster-provider</artifactId>
-          <version>${mdsal.version}</version>
         </dependency>
         <dependency>
           <groupId>org.apache.sshd</groupId>
         <dependency>
           <groupId>org.opendaylight.yangtools.thirdparty</groupId>
           <artifactId>antlr4-runtime-osgi-nohead</artifactId>
-          <version>4.0</version>
         </dependency>
         <dependency>
           <groupId>org.opendaylight.yangtools.thirdparty</groupId>
           <artifactId>xtend-lib-osgi</artifactId>
-          <version>2.4.3</version>
         </dependency>
         <dependency>
           <groupId>org.openexi</groupId>
index 53353cded17e3abc57f21c3a3737b09cebb9dede..4b6091b4294f7ecd2a5ef103d1729440138f5193 100644 (file)
@@ -13,7 +13,6 @@
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>sal-clustering-commons</artifactId>
-      <version>1.2.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>com.google.guava</groupId>
@@ -81,7 +80,6 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
 
index 7482c52fdd005e531cf95a284cff87c5614b796b..ade3e1b8f6ba73376f5391a8db1da0f1d8c0dcb1 100644 (file)
@@ -70,7 +70,6 @@
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>binding-data-codec</artifactId>
-      <version>0.7.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
index fefd85b44b2888b2edde8108d6f67029c89bb8d8..01cd1f88ba0e29f5391ac3a07330cc10fb940606 100644 (file)
@@ -52,7 +52,6 @@
       <dependency>
           <groupId>org.opendaylight.controller</groupId>
           <artifactId>sal-test-model</artifactId>
-          <version>1.2.0-SNAPSHOT</version>
       </dependency>
   </dependencies>
   <build>
index 54a1fe7a95d75ae31c84ed4dec696d886d2692d1..f6d7dbab1a32255f2ee24171e410c1170974338d 100644 (file)
@@ -55,7 +55,6 @@
     <dependency>
       <groupId>com.google.code.findbugs</groupId>
       <artifactId>jsr305</artifactId>
-      <version>2.0.1</version>
     </dependency>
     <dependency>
       <groupId>com.google.guava</groupId>
     <dependency>
       <groupId>xmlunit</groupId>
       <artifactId>xmlunit</artifactId>
-      <version>1.5</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
       <dependency>
       <dependency>
           <groupId>xmlunit</groupId>
           <artifactId>xmlunit</artifactId>
-          <version>1.5</version>
       </dependency>
 
       <dependency>
       <dependency>
           <groupId>org.slf4j</groupId>
           <artifactId>slf4j-simple</artifactId>
-          <version>${slf4j.version}</version>
           <scope>test</scope>
       </dependency>
       <dependency>
           <groupId>com.google.code.findbugs</groupId>
           <artifactId>jsr305</artifactId>
-          <version>2.0.1</version>
       </dependency>
       <dependency>
           <groupId>com.codahale.metrics</groupId>
index dc20296ff52d2fe3256507dc90022ab6a7a89918..264709f687adcb8ab13cf4a7149099324dd9c476 100644 (file)
@@ -45,8 +45,6 @@
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>sal-inmemory-datastore</artifactId>
-      <version>1.2.0-SNAPSHOT</version>
-
     </dependency>
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
@@ -74,7 +72,6 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
index d16f67209f1cb152e9d332525f682c1225b44d91..ec5bb215bf991936c2f666c827d0292f048e0c80 100644 (file)
       <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
       <dependency>
index 5abb4f891043076d673cc416f867c57470b69f87..3d3c52d7d1237375e5483d2eccadde7d29736f07 100644 (file)
   <artifactId>sal-rest-docgen</artifactId>
   <packaging>bundle</packaging>
 
-  <properties>
-    <jaxrs-api.version>3.0.4.Final</jaxrs-api.version>
-  </properties>
-
   <dependencies>
     <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
@@ -42,7 +38,6 @@
     <dependency>
       <groupId>org.jboss.resteasy</groupId>
       <artifactId>jaxrs-api</artifactId>
-      <version>${jaxrs-api.version}</version>
     </dependency>
 
     <dependency>
index 1a443177c68a4ef8fa44ee2db7a461ff184ff8c1..eb6c51b35194e54c2c33ebc220668a99270a134a 100644 (file)
@@ -45,7 +45,6 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
index a9c1e8336d62419a79f6d320cd0784ecc8dc37cb..f1f7375f0a16901fffa09a810cc052761e979c72 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
-        <version>2.4</version>
         <executions>
           <execution>
             <goals>
index b392c5b6726ea2e3ed3c8fc63f943a9bed75dacc..0a3a77cc6030101078703adefdfc3d0431e652b1 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.12</version>
         <configuration>
           <failsOnError>false</failsOnError>
           <failOnViolation>false</failOnViolation>
index a4c113c2c1803081409e61c4132770482d51f3c0..2001fb758af68801ef5f17d26cb13264438087df 100644 (file)
@@ -9,17 +9,15 @@
 package org.opendaylight.controller.networkconfig.neutron.northbound;
 
 import java.util.List;
-
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-
 import org.opendaylight.controller.networkconfig.neutron.NeutronNetwork;
 
 @XmlRootElement
 @XmlAccessorType(XmlAccessType.NONE)
-public class NeutronNetworkRequest implements INeutronRequest {
+public class NeutronNetworkRequest implements INeutronRequest<NeutronNetwork> {
     // See OpenStack Network API v2.0 Reference for description of
     // annotated attributes
 
@@ -50,14 +48,17 @@ public class NeutronNetworkRequest implements INeutronRequest {
         singletonNetwork = net;
     }
 
+    @Override
     public NeutronNetwork getSingleton() {
         return singletonNetwork;
     }
 
+    @Override
     public boolean isSingleton() {
         return (singletonNetwork != null);
     }
 
+    @Override
     public List<NeutronNetwork> getBulk() {
         return bulkRequest;
     }
index 12b58aa2abc54e30799fd0458a4e126b9185124a..3bfac8a4fdf4d04a8131f10c6bf74f8df017ef03 100644 (file)
@@ -9,17 +9,15 @@
 package org.opendaylight.controller.networkconfig.neutron.northbound;
 
 import java.util.List;
-
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-
 import org.opendaylight.controller.networkconfig.neutron.NeutronPort;
 
 @XmlRootElement
 @XmlAccessorType(XmlAccessType.NONE)
-public class NeutronPortRequest implements INeutronRequest {
+public class NeutronPortRequest implements INeutronRequest<NeutronPort> {
     // See OpenStack Network API v2.0 Reference for description of
     // annotated attributes
 
@@ -50,14 +48,17 @@ public class NeutronPortRequest implements INeutronRequest {
         singletonPort = port;
     }
 
+    @Override
     public NeutronPort getSingleton() {
         return singletonPort;
     }
 
+    @Override
     public boolean isSingleton() {
         return (singletonPort != null);
     }
 
+    @Override
     public List<NeutronPort> getBulk() {
         return bulkRequest;
     }
index 57a724c1cc60936b3a15ed80ba0c1b9bc6d53288..4c230c525bcb79ffed8fe700110bf6af34e8260a 100644 (file)
@@ -9,18 +9,15 @@
 package org.opendaylight.controller.networkconfig.neutron.northbound;
 
 import java.util.List;
-
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-
 import org.opendaylight.controller.networkconfig.neutron.NeutronSubnet;
 
 @XmlRootElement
 @XmlAccessorType(XmlAccessType.NONE)
-
-public class NeutronSubnetRequest implements INeutronRequest {
+public class NeutronSubnetRequest implements INeutronRequest<NeutronSubnet> {
     // See OpenStack Network API v2.0 Reference for description of
     // annotated attributes
 
@@ -54,14 +51,17 @@ public class NeutronSubnetRequest implements INeutronRequest {
         links = null;
     }
 
+    @Override
     public NeutronSubnet getSingleton() {
         return singletonSubnet;
     }
 
+    @Override
     public List<NeutronSubnet> getBulk() {
         return bulkRequest;
     }
 
+    @Override
     public boolean isSingleton() {
         return (singletonSubnet != null);
     }
index 8f05e76e1839d9c10d630635f2e4d160b43a9908..5f9653f9029776b6a8f75892502de265908d086e 100644 (file)
 
 package org.opendaylight.controller.networkconfig.neutron.northbound;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import javax.ws.rs.core.UriInfo;
 import org.opendaylight.controller.networkconfig.neutron.INeutronObject;
 import org.opendaylight.controller.networkconfig.neutron.NeutronNetwork;
 import org.opendaylight.controller.networkconfig.neutron.NeutronPort;
@@ -17,12 +22,6 @@ import org.opendaylight.controller.networkconfig.neutron.NeutronSubnet;
 import org.opendaylight.controller.northbound.commons.exception.BadRequestException;
 import org.opendaylight.controller.northbound.commons.exception.ResourceNotFoundException;
 
-import javax.ws.rs.core.UriInfo;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
 public class PaginatedRequestFactory {
 
     public static class PaginationResults<T extends INeutronObject> {
@@ -35,26 +34,33 @@ public class PaginatedRequestFactory {
         }
     }
 
-    public static <T extends INeutronObject> INeutronRequest createRequest(Integer limit, String marker,
+    /*
+     * SuppressWarnings is needed because the compiler does not understand that we
+     * are actually safe here.
+     *
+     * FIXME: the only caller performs a cast back, so this is not actually necessary.
+     */
+    @SuppressWarnings("unchecked")
+    public static <T extends INeutronObject> INeutronRequest<T> createRequest(Integer limit, String marker,
                                                                            Boolean pageReverse,
                                                                            UriInfo uriInfo,
                                                                            List<T> collection,
                                                                            Class<T> clazz) {
-        PaginationResults results = _paginate(limit, marker, pageReverse, uriInfo, collection);
+        PaginationResults<T> results = _paginate(limit, marker, pageReverse, uriInfo, collection);
 
         if (clazz.equals(NeutronNetwork.class)){
-            return new NeutronNetworkRequest(results.collection, results.links);
+            return (INeutronRequest<T>) new NeutronNetworkRequest((List<NeutronNetwork>) results.collection, results.links);
         }
         if (clazz.equals(NeutronSubnet.class)){
-            return new NeutronSubnetRequest(results.collection, results.links);
+            return (INeutronRequest<T>) new NeutronSubnetRequest((List<NeutronSubnet>) results.collection, results.links);
         }
         if (clazz.equals(NeutronPort.class)){
-            return new NeutronPortRequest(results.collection, results.links);
+            return (INeutronRequest<T>) new NeutronPortRequest((List<NeutronPort>) results.collection, results.links);
         }
         return null;
     }
 
-    private static <T extends INeutronObject> PaginationResults _paginate(Integer limit, String marker, Boolean pageReverse, UriInfo uriInfo, List<T> collection) {
+    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;
         String startMarker;
@@ -80,10 +86,12 @@ public class PaginatedRequestFactory {
             class MarkerObject implements INeutronObject {
                 private String id;
 
+                @Override
                 public String getID() {
                     return id;
                 }
 
+                @Override
                 public void setID(String id) {
                     this.id = id;
                 }
@@ -149,6 +157,6 @@ public class PaginatedRequestFactory {
             links.add(previous);
         }
 
-        return new PaginationResults(collection, links);
+        return new PaginationResults<T>(collection, links);
     }
 }
index 430dfca74db3f50394f156a6dcb27f59bf098c3b..e5616be22275d3b9f73b2e30e2b1d9227cb06b97 100644 (file)
@@ -44,7 +44,6 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 2de8c5c26c6c05cbac6d8400853393107048fb99..4aa3e2791f79f12c2bf8830871b0470c5b814742 100644 (file)
@@ -27,7 +27,6 @@
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>topologymanager</artifactId>
-      <version>${topologymanager.version}</version>
     </dependency>
   </dependencies>
 
@@ -36,7 +35,6 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>${bundle.plugin.version}</version>
         <configuration>
           <instructions>
             <Import-Package>org.apache.felix.service.command,