summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk
diff options
context:
space:
mode:
authorLorraine Welch <lb2391@att.com>2020-05-28 16:41:27 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-28 16:41:27 +0000
commitcc1748b7523e29c24c0644d6302b9fdbde0002df (patch)
tree818011b651bd4691c1f05cadfa63bfffd805d8b5 /ecomp-sdk
parent10f24e3ecbacfb331ad4a58e6ad698637cecdc27 (diff)
parentcf01d506e5a7d34b422da8fb50ad61e24ac51fb5 (diff)
Merge "removed code smells from three components"
Diffstat (limited to 'ecomp-sdk')
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/HtmlStripper.java29
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/RemDbInfo.java2
2 files changed, 4 insertions, 27 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/HtmlStripper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/HtmlStripper.java
index 63a4f5f0..544f65e2 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/HtmlStripper.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/HtmlStripper.java
@@ -33,7 +33,7 @@
*
* ============LICENSE_END============================================
*
- *
+ *
*/
package org.onap.portalsdk.analytics.util;
@@ -55,7 +55,6 @@ public class HtmlStripper extends RaptorObject// this function can be accessed p
for (int i = 0; i < s.length(); i++) {
// while c is not last character
c = s.charAt(i);
- //System.out.println("444 Character " + (char)c + " int " + c);
if ((char) c == TXT_END_TAG) {
// if char == '>' text following
// it and not HTML tag
@@ -64,17 +63,9 @@ public class HtmlStripper extends RaptorObject// this function can be accessed p
// if char == '<' tag is
// following not text
inText = false;
- } /*else if ((char)c == '\n') {
- System.out.println("new line " + (char)c + " int " + c);
- inText = false;
- }*/ /*else if ((char) c == '&') {
- // if char == '&' chars following
- // are not text
- inText = false;
- }*/
+ }
else if (inText) {
// if text write char to "text.txt"
- //System.out.println("444444 Adding " + (char)c + " int " + c);
if (c >= 32 && c <= 122) {
if(c==32 || (c>32 && c<=47) || ( c>=58 && c<=64 )) {
if (c == 45) {
@@ -93,14 +84,10 @@ public class HtmlStripper extends RaptorObject// this function can be accessed p
}
}
}
- //System.out.println("\n\nFinished processing: " + s + "\n\n");
- //System.out.println("\n\nThe processed String : " + sbuf.toString() + "\n\n");
return sbuf.toString();
}
public String stripHtml(String s) {
-
- //System.out.println("Starting to process: " + s + "\n\n"); // prints
s = nvl(s);
StringBuffer sbuf = new StringBuffer();
int c;
@@ -116,14 +103,7 @@ public class HtmlStripper extends RaptorObject// this function can be accessed p
// if char == '<' tag is
// following not text
inText = false;
- } /*else if ((char)c == '\n') {
- System.out.println("new line " + (char)c + " int " + c);
- inText = false;
- }*/ /*else if ((char) c == '&') {
- // if char == '&' chars following
- // are not text
- inText = false;
- }*/
+ }
else if (inText) {
// if text write char to "text.txt"
if (c >= 32 && c <= 122) {
@@ -131,8 +111,6 @@ public class HtmlStripper extends RaptorObject// this function can be accessed p
}
}
}
- //System.out.println("\n\nFinished processing: " + s + "\n\n");
- //System.out.println("\n\nThe processed String : " + sbuf.toString() + "\n\n");
int pos = 0 ;
while(sbuf.indexOf("&nbsp;")!=-1) {
pos = sbuf.indexOf("&nbsp;");
@@ -145,7 +123,6 @@ public class HtmlStripper extends RaptorObject// this function can be accessed p
public String stripCSVHtml (String s) {
String s1 = stripHtml(s);
- //s1 = Utils.replaceInString(s1, "\"", "\"\"");
s1 = s1.replaceAll("\"", "\"\"");
return s1;
}
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/RemDbInfo.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/RemDbInfo.java
index 56e117f3..9d78b39a 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/RemDbInfo.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/RemDbInfo.java
@@ -63,7 +63,7 @@ public class RemDbInfo {
Globals.getDbUtils();
ds = DbUtils.executeQuery(query);
- String dbId = "", desc = "", dbType = "", connectionUrl = "", username = "", password = "", driver_class = "";
+ String dbId = "", desc = "", dbType = "", connectionUrl = "", username = "", password = "", driver_class = "";
if(ds.getRowCount() > 0) {
for (int i = 0; i < ds.getRowCount(); i++) {