diff options
author | 2020-04-10 15:00:31 +0000 | |
---|---|---|
committer | 2020-04-10 15:00:31 +0000 | |
commit | b4564ee20618a04a0dfcde2ad314173267fcae4c (patch) | |
tree | 58ad96a342f299db68d4a3044ea7c2e02879dd6d /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java | |
parent | 200d61e4d44593aa453d82c74c7fcd61a99c93e0 (diff) | |
parent | 7936d677ef09a4101b0c1f9557b0e40eff31919f (diff) |
Merge "reduced code smells"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java index 6718e427..6f55037b 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java @@ -1140,7 +1140,8 @@ return sheetName; StringTokenizer st = new StringTokenizer(vals, "|"); if(st.countTokens()>0) { while(st.hasMoreTokens()) { - if(isMultiValue) value.append("'"); + if(isMultiValue) + value.append("'"); String token = st.nextToken(); try { if(token !=null && token.length() > 0) @@ -1149,7 +1150,8 @@ return sheetName; catch (IllegalArgumentException ex1){} catch (Exception ex2){} value.append(token); - if(isMultiValue) value.append("'"); + if(isMultiValue) + value.append("'"); if(st.hasMoreTokens()) { value.append(","); } @@ -1163,7 +1165,8 @@ return sheetName; valuesMap.put(fieldNameMap.get(formField), valueStr); valueStr = ""; } - if(isMultiValue) value.append(")"); + if(isMultiValue) + value.append(")"); valuesMap.put(fieldNameMap.get(formField), value.toString()); if(ff.getValidationType().equals(FormField.VT_TIMESTAMP_HR) || ff.getValidationType().equals(FormField.VT_TIMESTAMP_MIN) || ff.getValidationType().equals(FormField.VT_TIMESTAMP_SEC)) { @@ -1209,7 +1212,8 @@ return sheetName; StringTokenizer st = new StringTokenizer(vals, "|"); if(st.countTokens()>0) { while(st.hasMoreTokens()) { - if(isMultiValue) value.append("'"); + if(isMultiValue) + value.append("'"); String token = st.nextToken(); try { if(token !=null && token.length() > 0) @@ -1218,7 +1222,8 @@ return sheetName; catch (IllegalArgumentException ex1){} catch (Exception ex2){} value.append(token); - if(isMultiValue) value.append("'"); + if(isMultiValue) + value.append("'"); if(st.hasMoreTokens()) { value.append(","); } @@ -1231,7 +1236,8 @@ return sheetName; valuesMap.put(fieldNameMap.get(formField), valueStr); valueStr = ""; } - if(isMultiValue) value.append(")"); + if(isMultiValue) + value.append(")"); valuesMap.put(fieldNameMap.get(formField), value.toString()); @@ -1405,7 +1411,8 @@ return sheetName; value.append("("); } for(int j = 0 ; j < vals.length; j++) { - if(isMultiValue) value.append("'"); + if(isMultiValue) + value.append("'"); try { if(vals[j] !=null && vals[j].length() > 0) { vals[j] = Utils.oracleSafe(vals[j]); @@ -1420,7 +1427,8 @@ return sheetName; } - if(isMultiValue) value.append("'"); + if(isMultiValue) + value.append("'"); if(j != vals.length -1) { value.append(","); @@ -1542,7 +1550,8 @@ return sheetName; public static int getMemoryThreshold() { int threshold = Integer.parseInt(nvls(raptorProperties.getProperty("memory_threshold_percentage"),"0").trim()); - if(threshold <= 0) threshold = 0; + if(threshold <= 0) + threshold = 0; return threshold; } |