aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/main
diff options
context:
space:
mode:
authorshashikanth <shashikanth.vh@huawei.com>2017-09-26 19:02:24 +0530
committershashikanth <shashikanth.vh@huawei.com>2017-09-26 19:02:24 +0530
commit7869c1c81cdb575f1d3e59f21951226b38f02418 (patch)
tree5204e32e5d6ba5ea967f6414b393afadad8c14e4 /adapters/mso-adapter-utils/src/main
parent00f6a9c613096e3d4623b8e8486992be727d92da (diff)
Fixed major sonar issues
Fix major sonar issues in so module https://sonar.onap.org/component_issues?id=org.openecomp.so%3Aso#resolved=false|severities=MAJOR|rules=squid%3AS1132 Move the "vlan" string literal on the left side of this string comparison. Issue-Id: APPC-186 Change-Id: If8f330c4a4f053bbee1064b325dc1cbe6bcd70ae Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src/main')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java
index 11cd5dfbd5..9f2c275670 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java
@@ -42,13 +42,13 @@ public class NetworkInfo {
private String id = "";
private NetworkStatus status = NetworkStatus.UNKNOWN;
private String provider = "";
- private List<Integer> vlans = new ArrayList<Integer>();
- private List<String> subnets = new ArrayList<String>();
+ private List<Integer> vlans = new ArrayList<>();
+ private List<String> subnets = new ArrayList<>();
private String shared = "";
static Map<String,NetworkStatus> NetworkStatusMap;
static {
- NetworkStatusMap = new HashMap<String,NetworkStatus>();
+ NetworkStatusMap = new HashMap<>();
NetworkStatusMap.put("ACTIVE", NetworkStatus.ACTIVE);
NetworkStatusMap.put("DOWN", NetworkStatus.DOWN);
NetworkStatusMap.put("BUILD", NetworkStatus.BUILD);
@@ -96,14 +96,14 @@ public class NetworkInfo {
if (network.getProviderPhysicalNetwork() != null) {
this.provider = network.getProviderPhysicalNetwork();
- if (network.getProviderNetworkType().equals("vlan")) {
+ if ("vlan".equals(network.getProviderNetworkType())) {
this.vlans.add(network.getProviderSegmentationId());
}
}
- else if (network.getSegments() != null && network.getSegments().size() > 0) {
+ else if (network.getSegments() != null && !network.getSegments().isEmpty()) {
Segment s = network.getSegments().get(0);
this.provider = s.getProviderPhysicalNetwork();
- if (s.getProviderNetworkType().equals("vlan")) {
+ if ("vlan".equals(s.getProviderNetworkType())) {
for (Segment s1 : network.getSegments()) {
this.vlans.add(s1.getProviderSegmentationId());
}
b { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#-------------------------------------------------------------------------------
# ============LICENSE_START==================================================
# * org.onap.dmaap
# * ===========================================================================
# * Copyright � 2017 AT&T Intellectual Property. All rights reserved.
# * ===========================================================================
# * 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
# * 
#  *      http://www.apache.org/licenses/LICENSE-2.0
# * 
#  * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# * ============LICENSE_END====================================================
# *
# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
# *
#-------------------------------------------------------------------------------


log4j.rootLogger=info

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %5p [%t] - %m%n

#
# Logger used for provisioning events
#
log4j.logger.com.att.research.datarouter.provisioning.events=info, eventlog
log4j.additivity.com.att.research.datarouter.provisioning.events=false

log4j.appender.eventlog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.eventlog.file=/root/dr2/logs/provevent.log
log4j.appender.eventlog.datePattern='.'yyyyMMdd
log4j.appender.eventlog.append=true
log4j.appender.eventlog.layout=org.apache.log4j.PatternLayout
log4j.appender.eventlog.layout.ConversionPattern=%d %-5p [%t] - %m%n

#
# Logger used for internal provisioning server events
#
log4j.logger.com.att.research.datarouter.provisioning.internal=debug, intlog
log4j.additivity.com.att.research.datarouter.provisioning.internal=false

log4j.appender.intlog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.intlog.file=/root/dr2/logs/provint.log
log4j.appender.intlog.datePattern='.'yyyyMMdd
log4j.appender.intlog.append=true
log4j.appender.intlog.layout=org.apache.log4j.PatternLayout
log4j.appender.intlog.layout.ConversionPattern=%d %-5p [%t] - %m%n

#
# Logger used for policy engine
#
log4j.logger.com.att.research.datarouter.authz.impl.ProvAuthorizer=debug, pelog
log4j.additivity.com.att.research.datarouter.authz.impl.ProvAuthorizer=false

log4j.appender.pelog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.pelog.file=/root/dr2/logs/policyengine.log
log4j.appender.pelog.datePattern='.'yyyyMMdd
log4j.appender.pelog.append=true
log4j.appender.pelog.layout=org.apache.log4j.PatternLayout
log4j.appender.pelog.layout.ConversionPattern=%d %-5p [%t] - %m%n