summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorburdziak <olaf.burdziakowski@nokia.com>2019-08-06 12:51:29 +0200
committerManoop Talasila <talasila@research.att.com>2019-08-13 18:25:30 +0000
commit4c7829600ee0750d0f813177595e02290b9127bc (patch)
tree0554356601c4517f26064b1acb3a93d2b85a8fe2
parent2b7da0c7aae3bf625b593e693f960487136ef2c2 (diff)
Fix sonar issues in WizardProcessor
Change-Id: I0a26ae37ce1ba9c44e83c5a72087fbfc44f3d0d7 Issue-ID: PORTAL-523 Signed-off-by: burdziak <olaf.burdziakowski@nokia.com> (cherry picked from commit f1fc3e02f6b723eb9588d4da73fb90d3a2bb4c39)
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java
index bd8d778e..8605f208 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java
@@ -109,6 +109,9 @@ import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WizardProcessor.class);
+ public WizardProcessor() {
+ }
+
public static Calendar getCalendar(XMLGregorianCalendar xmlCalendar){
TimeZone timeZone = xmlCalendar.getTimeZone(xmlCalendar.getTimezone());
Calendar calendar = Calendar.getInstance(timeZone);
@@ -121,9 +124,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
return calendar;
}
- public WizardProcessor() {
- }
-
private String adjustDataType(String oracleDataType) {
return "VARCHAR2".equals(oracleDataType) ? AppConstants.CT_CHAR : oracleDataType;
// Probably should be expanded to convert any CHAR or VARCHAR type to
@@ -428,8 +428,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
try {
ds = DbUtils.executeQuery(schemaSql);
- String prefix = "", desc = "";
-
for (int i = 0; i < ds.getRowCount(); i++) {
dbType = ds.getItem(i, 2);
}
@@ -448,7 +446,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
for (int i = 0; i < menuIDs.length; i++)
menuID += (menuID.length() == 0 ? "" : "|") + menuIDs[i];
- boolean rRCSDisabled = AppUtils.getRequestNvlValue(request, "runtimeColSortDisabled").equals("Y");
+ boolean rRCSDisabled = "Y".equals(AppUtils.getRequestNvlValue(request, "runtimeColSortDisabled"));
String reportDefType = AppUtils.getRequestNvlValue(request, "reportDefType");
String dataContainerHeight = nvl(AppUtils.getRequestValue(request, "heightContainer"), "auto");
String dataContainerWidth = nvl(AppUtils.getRequestValue(request, "widthContainer"), "auto");
@@ -489,7 +487,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.setTopDown(isTopDown?"Y":"N");
rdef.setSizedByContent(isSizedByContent?"Y":"N");
rdef.setMenuID(menuID);
- rdef.setMenuApproved(rApproved.equals("Y"));
+ rdef.setMenuApproved("Y".equals(rApproved));
if (reportDefType.length() > 0)
rdef.setReportDefType(reportDefType);
@@ -511,20 +509,18 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
} // if
- if (rdef.getWizardSequence() instanceof WizardSequence)
- rdef.generateWizardSequence(request);
-
+ rdef.generateWizardSequence(request);
reportUpdated = true;
- if (rdef.getReportID().equals("-1"))
+ if ("-1".equals(rdef.getReportID()))
// Always need to persist new report - in case it is a copy
reportUpdated = true;
return reportUpdated;
} // processDefinition
- private boolean processTableAdd(HttpServletRequest request) throws Exception {
+ private boolean processTableAdd(HttpServletRequest request) throws RaptorException {
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(
AppConstants.SI_REPORT_DEFINITION);