diff options
author | burdziak <olaf.burdziakowski@nokia.com> | 2019-08-06 12:51:29 +0200 |
---|---|---|
committer | burdziak <olaf.burdziakowski@nokia.com> | 2019-08-06 12:51:29 +0200 |
commit | f1fc3e02f6b723eb9588d4da73fb90d3a2bb4c39 (patch) | |
tree | 463f355534fb58a297a7647365e1da01a2eee96d | |
parent | 8b1abe6b2267047d26e0e6cee1c8c086dae95663 (diff) |
Fix sonar issues in WizardProcessor
Change-Id: I0a26ae37ce1ba9c44e83c5a72087fbfc44f3d0d7
Issue-ID: PORTAL-523
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
-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); |