From c3c435eb583ca80e3626a6811a0dce3ac7bd7411 Mon Sep 17 00:00:00 2001 From: Rupinder Date: Thu, 2 Apr 2020 12:51:23 +0530 Subject: removed code smells Reduced the code smells Issue-ID: CCSDK-2232 Change-Id: I30eec021ba50f28dc1df2fd554c4e349c4a76dd6 Signed-off-by: Rupinder --- .../main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/Resource.java | 4 +++- .../org/onap/ccsdk/sli/adaptors/util/expr/ExpressionEvaluator.java | 3 ++- .../src/main/java/org/onap/ccsdk/sli/adaptors/util/str/StrUtil.java | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'resource-assignment/provider/src/main/java/org') diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/Resource.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/Resource.java index 4b0c82f92..6b764a7e1 100644 --- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/Resource.java +++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/Resource.java @@ -24,7 +24,9 @@ package org.onap.ccsdk.sli.adaptors.rm.dao.jdbc; public class Resource { public long id; - public String assetId, name, type; + public String assetId; + public String name; + public String type; public long ltUsed; public String llLabel; public int llReferenceCount; diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/util/expr/ExpressionEvaluator.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/util/expr/ExpressionEvaluator.java index 8ba454bf4..8092a7515 100644 --- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/util/expr/ExpressionEvaluator.java +++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/util/expr/ExpressionEvaluator.java @@ -193,7 +193,8 @@ public class ExpressionEvaluator { int opl = op.length(); int sl = s.length(); String delimiters = " \0\t\r\n()"; - int pcount = 0, qcount = 0; + int pcount = 0; + int qcount = 0; for (int i = 0; i < sl; i++) { char c = s.charAt(i); if (c == '(' && qcount == 0) { diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/util/str/StrUtil.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/util/str/StrUtil.java index ef889f0d5..126ec94e5 100644 --- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/util/str/StrUtil.java +++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/util/str/StrUtil.java @@ -215,7 +215,8 @@ public class StrUtil { for (String s : str) { try { int i1 = s.indexOf('-'); - int start, end; + int start; + int end; if (i1 > 0) { String s1 = s.substring(0, i1); String s2 = s.substring(i1 + 1); -- cgit 1.2.3-korg