diff options
author | Manoop Talasila <talasila@research.att.com> | 2019-08-13 18:25:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-13 18:25:25 +0000 |
commit | 467622a15cc3dd8d4b529e70e7870eeb7bb01cbd (patch) | |
tree | 0554356601c4517f26064b1acb3a93d2b85a8fe2 /ecomp-sdk/epsdk-analytics/src/main | |
parent | ee7109350ce80e838be35503bda7e0c56f527869 (diff) | |
parent | f1fc3e02f6b723eb9588d4da73fb90d3a2bb4c39 (diff) |
Merge "Fix sonar issues in WizardProcessor"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java | 20 |
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); |