Non-functional changes to silence Sonar 94/494/1
authorLott, Christopher (cl778h) <cl778h@att.com>
Wed, 10 Jul 2019 13:28:47 +0000 (09:28 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Wed, 10 Jul 2019 13:31:31 +0000 (09:31 -0400)
Change-Id: Ifaaa03b0fda05004d27c3045f5c523282dcba238
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
24 files changed:
a1-med-client/pom.xml
anr-xapp-client/pom.xml
app-mgr-client/pom.xml
docs/release-notes.rst
e2-mgr-client/pom.xml
webapp-backend/pom.xml
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardApplication.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/A1MediatorConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/A1MediatorMockConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappMockConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AppManagerConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AppManagerMockConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/E2ManagerConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AcXappController.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AdminController.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AppManagerController.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/CustomResponseEntityExceptionHandler.java [moved from webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/CustomizedResponseEntityExceptionHandler.java with 81% similarity]
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/SimpleErrorController.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/RanDetailsTransport.java
webapp-frontend/pom.xml

index 91a3126..f403e5c 100644 (file)
@@ -60,39 +60,32 @@ limitations under the License.
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-web</artifactId>
-                       <!-- <version>${spring-web-version}</version> -->
                </dependency>
                <!-- JSON processing: jackson -->
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-core</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-annotations</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-databind</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.jaxrs</groupId>
                        <artifactId>jackson-jaxrs-json-provider</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.datatype</groupId>
                        <artifactId>jackson-datatype-jsr310</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <!-- test dependencies -->
                <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-api</artifactId>
-                       <!-- spring sets the <version>5.4.2</version> -->
                        <scope>test</scope>
                </dependency>
        </dependencies>
@@ -134,7 +127,6 @@ limitations under the License.
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
-                               <!-- version>2.5</version> -->
                                <configuration>
                                        <archive>
                                                <manifest>
index 956918e..975a15b 100644 (file)
@@ -60,39 +60,32 @@ limitations under the License.
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-web</artifactId>
-                       <!-- <version>${spring-web-version}</version> -->
                </dependency>
                <!-- JSON processing: jackson -->
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-core</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-annotations</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-databind</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.jaxrs</groupId>
                        <artifactId>jackson-jaxrs-json-provider</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.datatype</groupId>
                        <artifactId>jackson-datatype-jsr310</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <!-- test dependencies -->
                <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-api</artifactId>
-                       <!-- spring sets the <version>5.4.2</version> -->
                        <scope>test</scope>
                </dependency>
        </dependencies>
@@ -134,7 +127,6 @@ limitations under the License.
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
-                               <!-- version>2.5</version> -->
                                <configuration>
                                        <archive>
                                                <manifest>
index 9c0276d..bac52fa 100644 (file)
@@ -60,39 +60,32 @@ limitations under the License.
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-web</artifactId>
-                       <!-- <version>${spring-web-version}</version> -->
                </dependency>
                <!-- JSON processing: jackson -->
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-core</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-annotations</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-databind</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.jaxrs</groupId>
                        <artifactId>jackson-jaxrs-json-provider</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.datatype</groupId>
                        <artifactId>jackson-datatype-jsr310</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <!-- test dependencies -->
                <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-api</artifactId>
-                       <!-- spring sets the <version>5.4.2</version> -->
                        <scope>test</scope>
                </dependency>
        </dependencies>
index 253d43d..c81ca59 100644 (file)
@@ -25,6 +25,7 @@ Version 1.2.0, 10 July 2019
 * Split URL properties into prefix/suffix parts
 * Add jacoco plugin to back-end for code coverage
 * Compile with Java version 11, run with image openjdk:11
+* Clean code of issues reported by Sonar
 
 Version 1.0.5, 5 July 2019
 --------------------------
index 021fe68..0ae645e 100644 (file)
@@ -60,39 +60,32 @@ limitations under the License.
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-web</artifactId>
-                       <!-- <version>${spring-web-version}</version> -->
                </dependency>
                <!-- JSON processing: jackson -->
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-core</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-annotations</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-databind</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.jaxrs</groupId>
                        <artifactId>jackson-jaxrs-json-provider</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.datatype</groupId>
                        <artifactId>jackson-datatype-jsr310</artifactId>
-                       <!-- <version>${jackson-version}</version> -->
                </dependency>
                <!-- test dependencies -->
                <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-api</artifactId>
-                       <!-- spring sets the <version>5.4.2</version> -->
                        <scope>test</scope>
                </dependency>
        </dependencies>
index 89a8315..d7e12ec 100644 (file)
@@ -144,7 +144,6 @@ limitations under the License.
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
-                               <!-- Spring sets the <version>2.5</version> -->
                                <configuration>
                                        <archive>
                                                <manifest>
@@ -158,7 +157,6 @@ limitations under the License.
                        </plugin>
                        <plugin>
                                <artifactId>maven-resources-plugin</artifactId>
-                               <!-- spring-boot sets the <version>3.1.0</version> -->
                                <executions>
                                        <execution>
                                                <id>copy-resources</id>
@@ -181,7 +179,6 @@ limitations under the License.
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-deploy-plugin</artifactId>
-                               <!-- spring sets the <version>2.8</version> -->
                                <configuration>
                                        <skip>true</skip>
                                </configuration>
index 4cf2fd2..9dfa584 100644 (file)
@@ -28,8 +28,9 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.context.annotation.ComponentScan;
 
 @SpringBootApplication
-// Limit the annotation scan to the dashboard classes;
-// exclude the generated client classes!
+// Using this package limits the annotation scan to the dashboard classes.
+// Do not want Spring to find the autowired annotations in the generated
+// classes.
 @ComponentScan("org.oransc.ric.portal.dashboard")
 public class DashboardApplication {
 
index 0c8f4f2..0101fc9 100644 (file)
@@ -20,8 +20,6 @@
 package org.oransc.ric.portal.dashboard.config;
 
 import java.lang.invoke.MethodHandles;
-import java.net.URI;
-import java.net.URISyntaxException;
 
 import org.oransc.ric.a1med.client.api.A1MediatorApi;
 import org.oransc.ric.a1med.client.invoker.ApiClient;
@@ -33,6 +31,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
 import org.springframework.web.client.RestTemplate;
+import org.springframework.web.util.DefaultUriBuilderFactory;
 
 /**
  * Creates an A1 mediator client as a bean to be managed by the Spring
@@ -49,10 +48,10 @@ public class A1MediatorConfiguration {
 
        @Autowired
        public A1MediatorConfiguration(@Value("${a1med.url.prefix}") final String urlPrefix, //
-                       @Value("${a1med.url.suffix}") final String urlSuffix) throws URISyntaxException {
+                       @Value("${a1med.url.suffix}") final String urlSuffix) {
                logger.debug("ctor prefix '{}' suffix '{}'", urlPrefix, urlSuffix);
-               URI uri = new URI(urlPrefix.trim() + "/" + urlSuffix.trim()).normalize();
-               a1medUrl = uri.toString();
+               a1medUrl = new DefaultUriBuilderFactory(urlPrefix.trim()).builder().path(urlSuffix.trim()).build().normalize()
+                               .toString();
                logger.info("Configuring A1 Mediator at URL {}", a1medUrl);
        }
 
index 672e304..4b394e5 100644 (file)
@@ -60,15 +60,8 @@ public class A1MediatorMockConfiguration {
                ApiClient apiClient = apiClient();
                A1MediatorApi mockApi = mock(A1MediatorApi.class);
                when(mockApi.getApiClient()).thenReturn(apiClient);
-
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).a1ControllerGetHandler(any(String.class));
-
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).a1ControllerPutHandler(any(String.class), any(Object.class));
-
+               doAnswer(i -> null).when(mockApi).a1ControllerGetHandler(any(String.class));
+               doAnswer(i -> null).when(mockApi).a1ControllerPutHandler(any(String.class), any(Object.class));
                return mockApi;
        }
 
index 9cffa4b..33a5384 100644 (file)
@@ -20,8 +20,6 @@
 package org.oransc.ric.portal.dashboard.config;
 
 import java.lang.invoke.MethodHandles;
-import java.net.URI;
-import java.net.URISyntaxException;
 
 import org.oransc.ric.anrxapp.client.api.HealthApi;
 import org.oransc.ric.anrxapp.client.api.NcrtApi;
@@ -34,6 +32,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
 import org.springframework.web.client.RestTemplate;
+import org.springframework.web.util.DefaultUriBuilderFactory;
 
 /**
  * Creates instances of the ANR xApp client APIs.
@@ -49,10 +48,10 @@ public class AnrXappConfiguration {
 
        @Autowired
        public AnrXappConfiguration(@Value("${anrxapp.url.prefix}") final String urlPrefix,
-                       @Value("${anrxapp.url.suffix}") final String urlSuffix) throws URISyntaxException {
+                       @Value("${anrxapp.url.suffix}") final String urlSuffix) {
                logger.debug("ctor prefix '{}' suffix '{}'", urlPrefix, urlSuffix);
-               URI uri = new URI(urlPrefix.trim() + "/" + urlSuffix.trim()).normalize();
-               anrXappUrl = uri.toString();
+               anrXappUrl = new DefaultUriBuilderFactory(urlPrefix.trim()).builder().path(urlSuffix.trim()).build().normalize()
+                               .toString();
                logger.info("Configuring ANR client at URL {}", anrXappUrl);
        }
 
index aaf522e..a1e276d 100644 (file)
@@ -51,7 +51,12 @@ public class AnrXappMockConfiguration {
 
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-       private final NeighborCellRelationTable ncrt, ncrtNodeB1, ncrtNodeB2, ncrtNodeB3;
+       // Sonar wants separate declarations
+       private final NeighborCellRelationTable ncrt;
+       private final NeighborCellRelationTable ncrtNodeB1;
+       private final NeighborCellRelationTable ncrtNodeB2;
+       private final NeighborCellRelationTable ncrtNodeB3;
+
        private final GgNodeBTable gNodebTable;
 
        private static final String GNODEB1 = "001EF5:0045FE50";
@@ -102,12 +107,8 @@ public class AnrXappMockConfiguration {
                ApiClient apiClient = apiClient();
                HealthApi mockApi = mock(HealthApi.class);
                when(mockApi.getApiClient()).thenReturn(apiClient);
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).getHealthAlive();
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).getHealthReady();
+               doAnswer(i -> null).when(mockApi).getHealthAlive();
+               doAnswer(i -> null).when(mockApi).getHealthReady();
                return mockApi;
        }
 
@@ -124,12 +125,9 @@ public class AnrXappMockConfiguration {
                when(mockApi.getNcrt(eq(GNODEB1), any(String.class), any(String.class))).thenReturn(ncrtNodeB1);
                when(mockApi.getNcrt(eq(GNODEB2), any(String.class), any(String.class))).thenReturn(ncrtNodeB2);
                when(mockApi.getNcrt(eq(GNODEB3), any(String.class), any(String.class))).thenReturn(ncrtNodeB3);
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).deleteNcrt(any(String.class), any(String.class));
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).modifyNcrt(any(String.class), any(String.class), any(NeighborCellRelationMod.class));
+               doAnswer(i -> null).when(mockApi).deleteNcrt(any(String.class), any(String.class));
+               doAnswer(i -> null).when(mockApi).modifyNcrt(any(String.class), any(String.class),
+                               any(NeighborCellRelationMod.class));
                return mockApi;
        }
 
index 889a07a..93aadf6 100644 (file)
@@ -20,8 +20,6 @@
 package org.oransc.ric.portal.dashboard.config;
 
 import java.lang.invoke.MethodHandles;
-import java.net.URI;
-import java.net.URISyntaxException;
 
 import org.oransc.ric.plt.appmgr.client.api.HealthApi;
 import org.oransc.ric.plt.appmgr.client.api.XappApi;
@@ -34,6 +32,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
 import org.springframework.web.client.RestTemplate;
+import org.springframework.web.util.DefaultUriBuilderFactory;
 
 /**
  * Creates an xApp manager client as a bean to be managed by the Spring
@@ -50,10 +49,10 @@ public class AppManagerConfiguration {
 
        @Autowired
        public AppManagerConfiguration(@Value("${appmgr.url.prefix}") final String urlPrefix,
-                       @Value("${appmgr.url.suffix}") final String urlSuffix) throws URISyntaxException {
+                       @Value("${appmgr.url.suffix}") final String urlSuffix) {
                logger.debug("ctor prefix '{}' suffix '{}'", urlPrefix, urlSuffix);
-               URI uri = new URI(urlPrefix.trim() + "/" + urlSuffix.trim()).normalize();
-               xappMgrUrl = uri.toString();
+               xappMgrUrl = new DefaultUriBuilderFactory(urlPrefix.trim()).builder().path(urlSuffix.trim()).build().normalize()
+                               .toString();
                logger.info("Configuring App Manager at URL {}", xappMgrUrl);
        }
 
index 2dfb814..d97884d 100644 (file)
@@ -75,7 +75,7 @@ public class AppManagerMockConfiguration {
                        allXappConfigs.add(config);
                        availXapps.add(n);
                        Xapp xapp = new Xapp().name(n).version("version").status(StatusEnum.UNKNOWN);
-                       xapp.addInstancesItem(new XappInstance().name("abcd-1234").ip("1.2.3.4").port(200)
+                       xapp.addInstancesItem(new XappInstance().name("abcd-1234").ip("127.0.0.1").port(200)
                                        .status(XappInstance.StatusEnum.RUNNING));
                        deployedXapps.add(xapp);
                }
@@ -88,12 +88,8 @@ public class AppManagerMockConfiguration {
                when(mockClient.getStatusCode()).thenReturn(HttpStatus.OK);
                HealthApi mockApi = mock(HealthApi.class);
                when(mockApi.getApiClient()).thenReturn(mockClient);
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).getHealthAlive();
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).getHealthReady();
+               doAnswer(i -> null).when(mockApi).getHealthAlive();
+               doAnswer(i -> null).when(mockApi).getHealthReady();
                return mockApi;
        }
 
@@ -102,40 +98,21 @@ public class AppManagerMockConfiguration {
        public XappApi xappMgrXappApi() {
                ApiClient mockClient = mock(ApiClient.class);
                when(mockClient.getStatusCode()).thenReturn(HttpStatus.OK);
-
                XappApi mockApi = mock(XappApi.class);
                when(mockApi.getApiClient()).thenReturn(mockClient);
-
                when(mockApi.getAllXappConfig()).thenReturn(allXappConfigs);
-
                when(mockApi.createXappConfig(any(XAppConfig.class))).thenReturn(allXappConfigs.get(0));
-
                when(mockApi.modifyXappConfig(any(XAppConfig.class))).thenReturn(allXappConfigs.get(0));
-
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).deleteXappConfig(any(ConfigMetadata.class));
-
+               doAnswer(i -> null).when(mockApi).deleteXappConfig(any(ConfigMetadata.class));
                when(mockApi.deployXapp(any(XAppInfo.class))).thenReturn(deployedXapps.get(0));
-
                when(mockApi.listAllXapps()).thenReturn(availXapps);
-
                when(mockApi.getAllXapps()).thenReturn(deployedXapps);
-
                when(mockApi.getXappByName(any(String.class))).thenReturn(deployedXapps.get(0));
-
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).undeployXapp(any(String.class));
-
+               doAnswer(i -> null).when(mockApi).undeployXapp(any(String.class));
                SubscriptionResponse subRes = new SubscriptionResponse().eventType(SubscriptionResponse.EventTypeEnum.ALL)
                                .id("subid").version(1);
                when(mockApi.addSubscription(any(SubscriptionRequest.class))).thenReturn(subRes);
-
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).deleteSubscription(any(String.class));
-
+               doAnswer(i -> null).when(mockApi).deleteSubscription(any(String.class));
                return mockApi;
        }
 
index 4ea8bff..4289a88 100644 (file)
@@ -20,7 +20,6 @@
 package org.oransc.ric.portal.dashboard.config;
 
 import java.lang.invoke.MethodHandles;
-import java.net.URI;
 
 import org.oransc.ric.e2mgr.client.api.HealthCheckApi;
 import org.oransc.ric.e2mgr.client.api.NodebApi;
@@ -33,6 +32,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
 import org.springframework.web.client.RestTemplate;
+import org.springframework.web.util.DefaultUriBuilderFactory;
 
 /**
  * Creates an E2 manager client as a bean to be managed by the Spring container.
@@ -48,10 +48,10 @@ public class E2ManagerConfiguration {
 
        @Autowired
        public E2ManagerConfiguration(@Value("${e2mgr.url.prefix}") final String urlPrefix,
-                       @Value("${e2mgr.url.suffix}") final String urlSuffix) throws Exception {
+                       @Value("${e2mgr.url.suffix}") final String urlSuffix) {
                logger.debug("ctor prefix '{}' suffix '{}'", urlPrefix, urlSuffix);
-               URI uri = new URI(urlPrefix.trim() + "/" + urlSuffix.trim()).normalize();
-               e2mgrUrl = uri.toString();
+               e2mgrUrl = new DefaultUriBuilderFactory(urlPrefix.trim()).builder().path(urlSuffix.trim()).build().normalize()
+                               .toString();
                logger.info("Configuring E2 Manager at URL {}", e2mgrUrl);
        }
 
index ddec4ae..875d01b 100644 (file)
@@ -61,7 +61,7 @@ public class E2ManagerMockConfiguration {
                nodebIdList = new ArrayList<>();
                nodebIdList.add(nbid);
                nodebResponse = new GetNodebResponse().connectionStatus("mockConnectionStatus").failureType("mockFailureType")
-                               .ip("1.2.3.4").nodeType("mockNodeType").port(123).ranName("mockRanName");
+                               .ip("127.0.0.1").nodeType("mockNodeType").port(123).ranName("mockRanName");
        }
 
        private ApiClient apiClient() {
@@ -76,11 +76,7 @@ public class E2ManagerMockConfiguration {
                ApiClient apiClient = apiClient();
                HealthCheckApi mockApi = mock(HealthCheckApi.class);
                when(mockApi.getApiClient()).thenReturn(apiClient);
-
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).healthGet();
-
+               doAnswer(i -> null).when(mockApi).healthGet();
                return mockApi;
        }
 
@@ -90,27 +86,11 @@ public class E2ManagerMockConfiguration {
                ApiClient apiClient = apiClient();
                NodebApi mockApi = mock(NodebApi.class);
                when(mockApi.getApiClient()).thenReturn(apiClient);
-
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).nodebDelete();
-
-               doAnswer(i -> {
-                       return nodebResponse;
-               }).when(mockApi).getNb(any(String.class));
-
-               doAnswer(i -> {
-                       return nodebIdList;
-               }).when(mockApi).getNodebIdList();
-
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).endcSetup(any(SetupRequest.class));
-
-               doAnswer(i -> {
-                       return null;
-               }).when(mockApi).x2Setup(any(SetupRequest.class));
-
+               doAnswer(i -> null).when(mockApi).nodebDelete();
+               doAnswer(i -> nodebResponse).when(mockApi).getNb(any(String.class));
+               doAnswer(i -> nodebIdList).when(mockApi).getNodebIdList();
+               doAnswer(i -> null).when(mockApi).endcSetup(any(SetupRequest.class));
+               doAnswer(i -> null).when(mockApi).x2Setup(any(SetupRequest.class));
                return mockApi;
        }
 
index a23dc9d..cdb99b0 100644 (file)
@@ -32,9 +32,10 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
 import org.springframework.util.Assert;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.fasterxml.jackson.databind.JsonNode;
@@ -75,7 +76,7 @@ public class AcXappController {
        }
 
        @ApiOperation(value = "Gets the A1 client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class)
-       @RequestMapping(value = VERSION_METHOD, method = RequestMethod.GET)
+       @GetMapping(VERSION_METHOD)
        public SuccessTransport getA1MediatorClientVersion() {
                return new SuccessTransport(200, DashboardApplication.getImplementationVersion(A1MediatorApi.class));
        }
@@ -84,7 +85,7 @@ public class AcXappController {
         * GET policy is not supported at present by A1 Mediator! Always returns 501.
         */
        @ApiOperation(value = "Gets the admission control policy for AC xApp via the A1 Mediator")
-       @RequestMapping(value = ADMCTRL_METHOD, method = RequestMethod.GET)
+       @GetMapping(ADMCTRL_METHOD)
        public Object getAdmissionControlPolicy(HttpServletResponse response) {
                logger.debug("getAdmissionControlPolicy");
                response.setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED);
@@ -96,7 +97,7 @@ public class AcXappController {
         * fields are defined in the ACAdmissionIntervalControl Typescript interface.
         */
        @ApiOperation(value = "Sets the admission control policy for AC xApp via the A1 Mediator")
-       @RequestMapping(value = ADMCTRL_METHOD, method = RequestMethod.PUT)
+       @PutMapping(ADMCTRL_METHOD)
        public void setAdmissionControlPolicy(@ApiParam(value = "Admission control policy") @RequestBody JsonNode acPolicy, //
                        HttpServletResponse response) {
                logger.debug("setAdmissionControlPolicy {}", acPolicy);
index 9a785e8..86a7700 100644 (file)
@@ -28,8 +28,8 @@ import org.oransc.ric.portal.dashboard.model.SuccessTransport;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import io.swagger.annotations.ApiOperation;
@@ -65,7 +65,7 @@ public class AdminController {
        }
 
        @ApiOperation(value = "Gets the Dashboard MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class)
-       @RequestMapping(value = VERSION_METHOD, method = RequestMethod.GET)
+       @GetMapping(VERSION_METHOD)
        public SuccessTransport getVersion() {
                logger.debug("getVersion");
                return new SuccessTransport(200,
@@ -73,14 +73,14 @@ public class AdminController {
        }
 
        @ApiOperation(value = "Checks the health of the application.", response = SuccessTransport.class)
-       @RequestMapping(value = HEALTH_METHOD, method = RequestMethod.GET)
+       @GetMapping(HEALTH_METHOD)
        public SuccessTransport getHealth() {
                logger.debug("getHealth");
                return new SuccessTransport(200, "Dashboard is healthy!");
        }
 
        @ApiOperation(value = "Gets the list of application users.", response = DashboardUser.class, responseContainer = "List")
-       @RequestMapping(value = USER_METHOD, method = RequestMethod.GET)
+       @GetMapping(USER_METHOD)
        public DashboardUser[] getUsers() {
                logger.debug("getUsers");
                return users;
index dbaa5bc..c6a6b90 100644 (file)
@@ -37,10 +37,12 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.http.MediaType;
 import org.springframework.util.Assert;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -90,13 +92,13 @@ public class AnrXappController {
        }
 
        @ApiOperation(value = "Gets the ANR client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class)
-       @RequestMapping(value = VERSION_METHOD, method = RequestMethod.GET)
+       @GetMapping(VERSION_METHOD)
        public SuccessTransport getClientVersion() {
                return new SuccessTransport(200, DashboardApplication.getImplementationVersion(HealthApi.class));
        }
 
        @ApiOperation(value = "Performs a liveness probe on the ANR xApp, result expressed as the response code.")
-       @RequestMapping(value = HEALTH_ALIVE_METHOD, method = RequestMethod.GET)
+       @GetMapping(HEALTH_ALIVE_METHOD)
        public void getHealthAlive(HttpServletResponse response) {
                logger.debug("getHealthAlive");
                healthApi.getHealthAlive();
@@ -104,7 +106,7 @@ public class AnrXappController {
        }
 
        @ApiOperation(value = "Performs a readiness probe on the ANR xApp, result expressed as the response code.")
-       @RequestMapping(value = HEALTH_READY_METHOD, method = RequestMethod.GET)
+       @GetMapping(HEALTH_READY_METHOD)
        public void getHealthReady(HttpServletResponse response) {
                logger.debug("getHealthReady");
                healthApi.getHealthReady();
@@ -112,14 +114,14 @@ public class AnrXappController {
        }
 
        @ApiOperation(value = "Returns list of gNodeB IDs based on NCRT in ANR", response = GgNodeBTable.class)
-       @RequestMapping(value = GNODEBS_METHOD, method = RequestMethod.GET)
+       @GetMapping(GNODEBS_METHOD)
        public GgNodeBTable getGnodebs() {
                logger.debug("getGnodebs");
                return ncrtApi.getgNodeB();
        }
 
        @ApiOperation(value = "Returns neighbor cell relation table for all gNodeBs or based on query parameters", response = NeighborCellRelationTable.class)
-       @RequestMapping(value = NCRT_METHOD, method = RequestMethod.GET)
+       @GetMapping(NCRT_METHOD)
        public NeighborCellRelationTable getNcrt( //
                        @RequestParam(name = QP_NODEB, required = false) String ggnbId, //
                        @RequestParam(name = QP_SERVING, required = false) String servingCellNrcgi, //
@@ -131,8 +133,7 @@ public class AnrXappController {
 
        // /ncrt/servingcells/{servCellNrcgi}/neighborcells/{neighCellNrpci} :
        @ApiOperation(value = "Modify neighbor cell relation based on Serving Cell NRCGI and Neighbor Cell NRPCI")
-       @RequestMapping(value = NCRT_METHOD + "/" + PP_SERVING + "/{" + PP_SERVING + "}/" + PP_NEIGHBOR + "/{" + PP_NEIGHBOR
-                       + "}", method = RequestMethod.PUT)
+       @PutMapping(NCRT_METHOD + "/" + PP_SERVING + "/{" + PP_SERVING + "}/" + PP_NEIGHBOR + "/{" + PP_NEIGHBOR + "}")
        public void modifyNcrt(@PathVariable(PP_SERVING) String servingCellNrcgi, //
                        @PathVariable(PP_NEIGHBOR) String neighborCellNrpci, //
                        @RequestBody NeighborCellRelationMod ncrMod, HttpServletResponse response) {
@@ -143,8 +144,7 @@ public class AnrXappController {
        }
 
        @ApiOperation(value = "Delete neighbor cell relation based on Serving Cell NRCGI and Neighbor Cell NRPCI")
-       @RequestMapping(value = NCRT_METHOD + "/" + PP_SERVING + "/{" + PP_SERVING + "}/" + PP_NEIGHBOR + "/{" + PP_NEIGHBOR
-                       + "}", method = RequestMethod.DELETE)
+       @DeleteMapping(NCRT_METHOD + "/" + PP_SERVING + "/{" + PP_SERVING + "}/" + PP_NEIGHBOR + "/{" + PP_NEIGHBOR + "}")
        public void deleteNcrt(@PathVariable(PP_SERVING) String servingCellNrcgi, //
                        @PathVariable(PP_NEIGHBOR) String neighborCellNrpci, //
                        HttpServletResponse response) {
index 579866d..40e03db 100644 (file)
@@ -43,10 +43,13 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.http.MediaType;
 import org.springframework.util.Assert;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import io.swagger.annotations.ApiOperation;
@@ -91,13 +94,13 @@ public class AppManagerController {
        }
 
        @ApiOperation(value = "Gets the XApp manager client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class)
-       @RequestMapping(value = VERSION_METHOD, method = RequestMethod.GET)
+       @GetMapping(VERSION_METHOD)
        public SuccessTransport getClientVersion() {
                return new SuccessTransport(200, DashboardApplication.getImplementationVersion(HealthApi.class));
        }
 
        @ApiOperation(value = "Health check of xApp Manager - Liveness probe.")
-       @RequestMapping(value = HEALTH_ALIVE_METHOD, method = RequestMethod.GET)
+       @GetMapping(HEALTH_ALIVE_METHOD)
        public void getHealth(HttpServletResponse response) {
                logger.debug("getHealthAlive");
                healthApi.getHealthAlive();
@@ -105,7 +108,7 @@ public class AppManagerController {
        }
 
        @ApiOperation(value = "Readiness check of xApp Manager - Readiness probe.")
-       @RequestMapping(value = HEALTH_READY_METHOD, method = RequestMethod.GET)
+       @GetMapping(HEALTH_READY_METHOD)
        public void getHealthReady(HttpServletResponse response) {
                logger.debug("getHealthReady");
                healthApi.getHealthReady();
@@ -113,28 +116,28 @@ public class AppManagerController {
        }
 
        @ApiOperation(value = "Returns the configuration of all xapps.", response = AllXappConfig.class)
-       @RequestMapping(value = CONFIG_METHOD, method = RequestMethod.GET)
+       @GetMapping(CONFIG_METHOD)
        public AllXappConfig getAllXappConfig() {
                logger.debug("getAllXappConfig");
                return xappApi.getAllXappConfig();
        }
 
        @ApiOperation(value = "Create xApp config.", response = XAppConfig.class)
-       @RequestMapping(value = CONFIG_METHOD, method = RequestMethod.POST)
+       @PostMapping(CONFIG_METHOD)
        public XAppConfig createXappConfig(@RequestBody XAppConfig xAppConfig) {
                logger.debug("createXappConfig {}", xAppConfig);
                return xappApi.createXappConfig(xAppConfig);
        }
 
        @ApiOperation(value = "Modify xApp config.", response = XAppConfig.class)
-       @RequestMapping(value = CONFIG_METHOD, method = RequestMethod.PUT)
+       @PutMapping(CONFIG_METHOD)
        public XAppConfig modifyXappConfig(@RequestBody XAppConfig xAppConfig) {
                logger.debug("modifyXappConfig {}", xAppConfig);
                return xappApi.modifyXappConfig(xAppConfig);
        }
 
        @ApiOperation(value = "Delete xApp configuration.")
-       @RequestMapping(value = CONFIG_METHOD + "/{" + PP_XAPP_NAME + "}", method = RequestMethod.DELETE)
+       @DeleteMapping(CONFIG_METHOD + "/{" + PP_XAPP_NAME + "}")
        public void deleteXappConfig(@RequestBody ConfigMetadata configMetadata, HttpServletResponse response) {
                logger.debug("deleteXappConfig {}", configMetadata);
                xappApi.deleteXappConfig(configMetadata);
@@ -142,7 +145,7 @@ public class AppManagerController {
        }
 
        @ApiOperation(value = "Returns a list of deployable xapps.", response = DashboardDeployableXapps.class)
-       @RequestMapping(value = XAPPS_LIST_METHOD, method = RequestMethod.GET)
+       @GetMapping(XAPPS_LIST_METHOD)
        public Object getAvailableXapps() {
                logger.debug("getAvailableXapps");
                AllDeployableXapps appNames = xappApi.listAllXapps();
@@ -156,28 +159,28 @@ public class AppManagerController {
        }
 
        @ApiOperation(value = "Returns the status of all deployed xapps.", response = AllDeployedXapps.class)
-       @RequestMapping(value = XAPPS_METHOD, method = RequestMethod.GET)
+       @GetMapping(XAPPS_METHOD)
        public AllDeployedXapps getDeployedXapps() {
                logger.debug("getDeployedXapps");
                return xappApi.getAllXapps();
        }
 
        @ApiOperation(value = "Returns the status of a given xapp.", response = Xapp.class)
-       @RequestMapping(value = XAPPS_METHOD + "/{" + PP_XAPP_NAME + "}", method = RequestMethod.GET)
+       @GetMapping(XAPPS_METHOD + "/{" + PP_XAPP_NAME + "}")
        public Xapp getXapp(@PathVariable("xAppName") String xAppName) {
                logger.debug("getXapp {}", xAppName);
                return xappApi.getXappByName(xAppName);
        }
 
        @ApiOperation(value = "Deploy a xapp.", response = Xapp.class)
-       @RequestMapping(value = XAPPS_METHOD, method = RequestMethod.POST)
+       @PostMapping(XAPPS_METHOD)
        public Xapp deployXapp(@RequestBody XAppInfo xAppInfo) {
                logger.debug("deployXapp {}", xAppInfo);
                return xappApi.deployXapp(xAppInfo);
        }
 
        @ApiOperation(value = "Undeploy an existing xapp.")
-       @RequestMapping(value = XAPPS_METHOD + "/{" + PP_XAPP_NAME + "}", method = RequestMethod.DELETE)
+       @DeleteMapping(XAPPS_METHOD + "/{" + PP_XAPP_NAME + "}")
        public void undeployXapp(@PathVariable("xAppName") String xAppName, HttpServletResponse response) {
                logger.debug("undeployXapp {}", xAppName);
                xappApi.undeployXapp(xAppName);
@@ -50,9 +50,10 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExcep
  * https://www.springboottutorial.com/spring-boot-exception-handling-for-rest-services
  */
 @ControllerAdvice
-public class CustomizedResponseEntityExceptionHandler extends ResponseEntityExceptionHandler {
+public class CustomResponseEntityExceptionHandler extends ResponseEntityExceptionHandler {
 
-       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+       // Superclass has "logger" that is exposed here, so use a different name
+       private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
        /**
         * Generates the response when a REST controller method takes an
@@ -68,10 +69,11 @@ public class CustomizedResponseEntityExceptionHandler extends ResponseEntityExce
         * @return A response entity with status code 502 plus some details in the body.
         */
        @ExceptionHandler(HttpStatusCodeException.class)
-       public final ResponseEntity<?> handleHttpStatusCodeException(HttpStatusCodeException ex, WebRequest request) {
-               logger.warn("Request {} failed, status code {}", request.getDescription(false), ex.getStatusCode());
-               return new ResponseEntity<ErrorTransport>(
-                               new ErrorTransport(ex.getRawStatusCode(), ex.getResponseBodyAsString(), ex), HttpStatus.BAD_GATEWAY);
+       public final ResponseEntity<ErrorTransport> handleHttpStatusCodeException(HttpStatusCodeException ex,
+                       WebRequest request) {
+               log.warn("Request {} failed, status code {}", request.getDescription(false), ex.getStatusCode());
+               return new ResponseEntity<>(new ErrorTransport(ex.getRawStatusCode(), ex.getResponseBodyAsString(), ex),
+                               HttpStatus.BAD_GATEWAY);
        }
 
 }
index 506911a..ad75c88 100644 (file)
@@ -42,10 +42,12 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.http.MediaType;
 import org.springframework.util.Assert;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.client.HttpStatusCodeException;
 
@@ -105,13 +107,13 @@ public class E2ManagerController {
        }
 
        @ApiOperation(value = "Gets the E2 manager client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class)
-       @RequestMapping(value = VERSION_METHOD, method = RequestMethod.GET)
+       @GetMapping(VERSION_METHOD)
        public SuccessTransport getClientVersion() {
                return new SuccessTransport(200, DashboardApplication.getImplementationVersion(HealthCheckApi.class));
        }
 
        @ApiOperation(value = "Gets the health from the E2 manager, expressed as the response code.")
-       @RequestMapping(value = HEALTH_METHOD, method = RequestMethod.GET)
+       @GetMapping(HEALTH_METHOD)
        public void healthGet(HttpServletResponse response) {
                logger.debug("healthGet");
                e2HealthCheckApi.healthGet();
@@ -120,7 +122,7 @@ public class E2ManagerController {
 
        // This calls other methods to simplify the task of the front-end.
        @ApiOperation(value = "Gets all RAN identities and statuses from the E2 manager.", response = RanDetailsTransport.class, responseContainer = "List")
-       @RequestMapping(value = RAN_METHOD, method = RequestMethod.GET)
+       @GetMapping(RAN_METHOD)
        public List<RanDetailsTransport> getRanDetails() {
                logger.debug("getRanDetails");
                // TODO: remove mock when e2mgr delivers the getNodebIdList() method
@@ -142,21 +144,21 @@ public class E2ManagerController {
        }
 
        @ApiOperation(value = "Get RAN identities list.", response = NodebIdentity.class, responseContainer = "List")
-       @RequestMapping(value = NODEB_LIST_METHOD, method = RequestMethod.GET)
+       @GetMapping(NODEB_LIST_METHOD)
        public List<NodebIdentity> getNodebIdList() {
                logger.debug("getNodebIdList");
                return e2NodebApi.getNodebIdList();
        }
 
        @ApiOperation(value = "Get RAN by name.", response = GetNodebResponse.class)
-       @RequestMapping(value = NODEB_METHOD + "/{" + PP_RANNAME + "}", method = RequestMethod.GET)
+       @GetMapping(NODEB_METHOD + "/{" + PP_RANNAME + "}")
        public GetNodebResponse getNb(@PathVariable(PP_RANNAME) String ranName) {
                logger.debug("getNb {}", ranName);
                return e2NodebApi.getNb(ranName);
        }
 
        @ApiOperation(value = "Close all connections to the RANs and delete the data from the nodeb-rnib DB.")
-       @RequestMapping(value = NODEB_METHOD, method = RequestMethod.DELETE)
+       @DeleteMapping(NODEB_METHOD)
        public void nodebDelete(HttpServletResponse response) {
                logger.debug("nodebDelete");
                e2NodebApi.nodebDelete();
@@ -164,7 +166,7 @@ public class E2ManagerController {
        }
 
        @ApiOperation(value = "Sets up an EN-DC RAN connection via the E2 manager.")
-       @RequestMapping(value = ENDC_SETUP_METHOD, method = RequestMethod.POST)
+       @PostMapping(ENDC_SETUP_METHOD)
        public void endcSetup(@RequestBody SetupRequest setupRequest, HttpServletResponse response) {
                logger.debug("endcSetup {}", setupRequest);
                e2NodebApi.endcSetup(setupRequest);
@@ -172,7 +174,7 @@ public class E2ManagerController {
        }
 
        @ApiOperation(value = "Sets up an X2 RAN connection via the E2 manager.")
-       @RequestMapping(value = X2_SETUP_METHOD, method = RequestMethod.POST)
+       @PostMapping(X2_SETUP_METHOD)
        public void x2Setup(@RequestBody SetupRequest setupRequest, HttpServletResponse response) {
                logger.debug("x2Setup {}", setupRequest);
                e2NodebApi.x2Setup(setupRequest);
index cd1b304..531ea17 100644 (file)
@@ -30,7 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.web.servlet.error.ErrorAttributes;
 import org.springframework.boot.web.servlet.error.ErrorController;
 import org.springframework.util.Assert;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.context.request.ServletWebRequest;
 import org.springframework.web.context.request.WebRequest;
@@ -84,7 +84,7 @@ public class SimpleErrorController implements ErrorController {
         *                     HttpServletRequest
         * @return Map of String to Object
         */
-       @RequestMapping(ERROR_PATH)
+       @GetMapping(ERROR_PATH)
        public Map<String, Object> error(HttpServletRequest aRequest) {
                Map<String, Object> body = getErrorAttributes(aRequest, getTraceParameter(aRequest));
                logger.warn("Failed in request for {}", body.get("path"));
index 3162056..1053cfc 100644 (file)
@@ -83,13 +83,15 @@ public class RanDetailsTransport {
                if (nodebIdentity == null) {
                        if (other.nodebIdentity != null)
                                return false;
-               } else if (!nodebIdentity.equals(other.nodebIdentity))
+               } else if (!nodebIdentity.equals(other.nodebIdentity)) {
                        return false;
+               }
                if (nodebStatus == null) {
                        if (other.nodebStatus != null)
                                return false;
-               } else if (!nodebStatus.equals(other.nodebStatus))
+               } else if (!nodebStatus.equals(other.nodebStatus)) {
                        return false;
+               }
                return true;
        }
 
index 7a0d422..69ce3ef 100644 (file)
@@ -31,15 +31,6 @@ limitations under the License.
        <name>RIC Dashboard Webapp frontend</name>
        <build>
                <plugins>
-                       <!-- do not deploy anything -->
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-deploy-plugin</artifactId>
-                               <!-- spring sets the <version>2.8</version> -->
-                               <configuration>
-                                       <skip>true</skip>
-                               </configuration>
-                       </plugin>
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>license-maven-plugin</artifactId>