aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java4
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebSecurityConfigImpl.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java2
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java11
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java4
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java6
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java4
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java6
8 files changed, 28 insertions, 13 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java
index c1c8258a6a..8dee54701d 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -58,7 +60,7 @@ public class UpdateNetworkRequest extends NetworkRequestCommon {
private Boolean backout = true;
private Map<String,String> networkParams = new HashMap<>();
private MsoRequest msoRequest = new MsoRequest();
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, UpdateNetworkRequest.class);
+
@JsonProperty
private boolean contrailRequest;
public UpdateNetworkRequest() {
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebSecurityConfigImpl.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebSecurityConfigImpl.java
index 144df5fe6a..2eb4858803 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebSecurityConfigImpl.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebSecurityConfigImpl.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -36,7 +38,7 @@ public class WebSecurityConfigImpl extends WebSecurityConfig {
http.csrf().disable()
.authorizeRequests()
.antMatchers("/manage/health","/manage/info").permitAll()
- .antMatchers("/**").hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),",").toString())
+ .antMatchers("/**").hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),","))
.and()
.httpBasic();
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java b/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java
index 6530b7ba7c..6398d413d0 100644
--- a/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java
+++ b/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java
@@ -7,6 +7,6 @@ import java.sql.Connection;
public class V4_2__DummyMigration implements JdbcMigration {
@Override
public void migrate(Connection connection) throws Exception {
-
+ //does nothing
}
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
index e5a8d3faa1..c8df1fdac2 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -465,7 +467,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
Map <String, Object> outputs = heatStack.getOutputs ();
Map <String, String> sMap = new HashMap <> ();
if (outputs != null) {
- for (String key : outputs.keySet ()) {
+ for (Map.Entry<String, Object> entry : outputs.entrySet()) {
+ String key=entry.getKey();
if (key != null && key.startsWith ("subnet")) {
if (aic3template) //one subnet_id output
{
@@ -619,7 +622,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
Map <String, Object> outputs = heatStack.getOutputs ();
Map <String, String> sMap = new HashMap <> ();
if (outputs != null) {
- for (String key : outputs.keySet ()) {
+ for (Map.Entry<String, Object> entry : outputs.entrySet()) {
+ String key = entry.getKey();
if (key != null && key.startsWith ("subnet")) {
if (aic3template) //one subnet output expected
{
@@ -1067,7 +1071,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
Map<String, Object> outputs = heatStack.getOutputs();
Map<String, String> sMap = new HashMap<>();
if (outputs != null) {
- for (String key : outputs.keySet()) {
+ for (Map.Entry<String, Object> entry : outputs.entrySet()) {
+ String key=entry.getKey();
if (key != null && key.startsWith("subnet")) {
if (aic3template) //one subnet output expected
{
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java
index 4bab988e3c..2b21381041 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -58,8 +60,6 @@ import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
@Configuration
public class CXFConfiguration {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, CXFConfiguration.class);
-
@Autowired
private NetworkAdapterRest networkAdapterRest;
@Autowired
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java
index 9a7382f200..28c56b32cd 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -76,14 +78,14 @@ public class ArchiveInfraRequestsScheduler {
requestsByEndTime = infraActiveRepo.findByEndTimeLessThan(archivingDate, pageRequest);
logger.debug(requestsByEndTime.size() + " requests to be archived based on End Time" );
archiveInfraRequests(requestsByEndTime);
- } while(requestsByEndTime.size() > 0);
+ } while(!requestsByEndTime.isEmpty());
List<InfraActiveRequests> requestsByStartTime = new ArrayList<>();
do {
requestsByStartTime = infraActiveRepo.findByStartTimeLessThanAndEndTime(archivingDate, null, pageRequest);
logger.debug(requestsByEndTime.size() + " requests to be archived based on Start Time" );
archiveInfraRequests(requestsByStartTime);
- } while(requestsByStartTime.size() > 0);
+ } while(!requestsByStartTime.isEmpty());
logger.debug("End of archiveInfraRequestsScheduler");
}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java
index b456fb2336..a5800fc73d 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -87,7 +89,7 @@ public class MapRequestTunables {
}
}
- if (reqTunable.getSdncUrl() == null || reqTunable.getSdncUrl().equals("")) {
+ if (reqTunable.getSdncUrl() == null || ("").equals(reqTunable.getSdncUrl())) {
error = "Invalid configuration, sdncUrl required for:" + key + " value:" + value;
}
} else {
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
index 2fd39df4e9..8ca14501e5 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -149,7 +151,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector {
ackFinalIndicator = "Y";
}
- if (!ackFinalIndicator.equals("Y") && !"N".equals(ackFinalIndicator)) {
+ if (!"Y".equals(ackFinalIndicator) && !"N".equals(ackFinalIndicator)) {
throw new ParseException("Invalid ack-final-indicator in SDNC response: '" + ackFinalIndicator + "'", 0);
}
@@ -161,7 +163,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector {
// If the response code in the message from SDNC was not 2XX, return SDNCServiceError.
- if (!responseCode.matches("2[0-9][0-9]") && !responseCode.equals("0")) {
+ if (!responseCode.matches("2[0-9][0-9]") && !("0").equals(responseCode)) {
// Not a 2XX response. Return SDNCServiceError.
return new SDNCServiceError(svcRequestId, responseCode, responseMessage, ackFinalIndicator);
}