Inconsistent String Comparisons, Applied patch for plugins classes.
Thanks Devanshu Vyas for your contribution (OFBIZ-9254) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1812282 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -73,9 +73,9 @@ public abstract class AbstractHtmlReport extends HtmlReport {
|
||||
|
||||
String action = getParamAction(request);
|
||||
if (action == null) action = "";
|
||||
if (action.equals("reportend") || action.equals("cancel")) {
|
||||
if ("reportend".equals(action) || "cancel".equals(action)) {
|
||||
setParamAction("reportend");
|
||||
} else if (action.equals("reportupdate")) {
|
||||
} else if ("reportupdate".equals(action)) {
|
||||
setParamAction("reportupdate");
|
||||
} else {
|
||||
InterfaceReportThread thread = initializeThread(request, response, name);
|
||||
@@ -104,11 +104,11 @@ public abstract class AbstractHtmlReport extends HtmlReport {
|
||||
public static String checkButton(HttpServletRequest request, HttpServletResponse response) {
|
||||
String action = request.getParameter("action");
|
||||
if (ReportStringUtil.isNotEmpty(action)) {
|
||||
if (action.equalsIgnoreCase("ok")) {
|
||||
if ("ok".equalsIgnoreCase(action)) {
|
||||
request.removeAttribute(SESSION_REPORT_CLASS);
|
||||
request.removeAttribute(DIALOG_URI);
|
||||
return "ok";
|
||||
} else if (action.equalsIgnoreCase("cancel")) {
|
||||
} else if ("cancel".equalsIgnoreCase(action)) {
|
||||
request.removeAttribute(SESSION_REPORT_CLASS);
|
||||
request.removeAttribute(DIALOG_URI);
|
||||
return "cancel";
|
||||
@@ -116,7 +116,7 @@ public abstract class AbstractHtmlReport extends HtmlReport {
|
||||
}
|
||||
action = request.getParameter("ok");
|
||||
if (ReportStringUtil.isNotEmpty(action)) {
|
||||
if (action.equalsIgnoreCase("ok")) {
|
||||
if ("ok".equalsIgnoreCase(action)) {
|
||||
request.removeAttribute(SESSION_REPORT_CLASS);
|
||||
request.removeAttribute(DIALOG_URI);
|
||||
return "ok";
|
||||
@@ -124,7 +124,7 @@ public abstract class AbstractHtmlReport extends HtmlReport {
|
||||
}
|
||||
action = request.getParameter("cancel");
|
||||
if (ReportStringUtil.isNotEmpty(action)) {
|
||||
if (action.equalsIgnoreCase("cancel")) {
|
||||
if ("cancel".equalsIgnoreCase(action)) {
|
||||
request.removeAttribute(SESSION_REPORT_CLASS);
|
||||
request.removeAttribute(DIALOG_URI);
|
||||
return "cancel";
|
||||
|
||||
@@ -82,11 +82,11 @@ public class PricatParseExcelHtmlReport extends AbstractHtmlReport {
|
||||
public static String checkButton(HttpServletRequest request, HttpServletResponse response) {
|
||||
String action = request.getParameter("action");
|
||||
if (ReportStringUtil.isNotEmpty(action)) {
|
||||
if (action.equalsIgnoreCase("ok")) {
|
||||
if ("ok".equalsIgnoreCase(action)) {
|
||||
request.removeAttribute(PRICAT_REPORT_CLASS);
|
||||
request.removeAttribute(DIALOG_URI);
|
||||
return "ok";
|
||||
} else if (action.equalsIgnoreCase("cancel")) {
|
||||
} else if ("cancel".equalsIgnoreCase(action)) {
|
||||
request.removeAttribute(PRICAT_REPORT_CLASS);
|
||||
request.removeAttribute(DIALOG_URI);
|
||||
return "cancel";
|
||||
@@ -94,7 +94,7 @@ public class PricatParseExcelHtmlReport extends AbstractHtmlReport {
|
||||
}
|
||||
action = request.getParameter("ok");
|
||||
if (ReportStringUtil.isNotEmpty(action)) {
|
||||
if (action.equalsIgnoreCase("ok")) {
|
||||
if ("ok".equalsIgnoreCase(action)) {
|
||||
request.removeAttribute(PRICAT_REPORT_CLASS);
|
||||
request.removeAttribute(DIALOG_URI);
|
||||
return "ok";
|
||||
@@ -102,7 +102,7 @@ public class PricatParseExcelHtmlReport extends AbstractHtmlReport {
|
||||
}
|
||||
action = request.getParameter("cancel");
|
||||
if (ReportStringUtil.isNotEmpty(action)) {
|
||||
if (action.equalsIgnoreCase("cancel")) {
|
||||
if ("cancel".equalsIgnoreCase(action)) {
|
||||
request.removeAttribute(PRICAT_REPORT_CLASS);
|
||||
request.removeAttribute(DIALOG_URI);
|
||||
return "cancel";
|
||||
@@ -125,10 +125,10 @@ public class PricatParseExcelHtmlReport extends AbstractHtmlReport {
|
||||
|
||||
String action = getParamAction(request);
|
||||
if (action == null) action = "";
|
||||
if (action.equals("reportend") || action.equals("cancel")) {
|
||||
if ("reportend".equals(action) || "cancel".equals(action)) {
|
||||
setParamAction("reportend");
|
||||
setDialogRealUri(request, dialogUri);
|
||||
} else if (action.equals("reportupdate")) {
|
||||
} else if ("reportupdate".equals(action)) {
|
||||
setParamAction("reportupdate");
|
||||
} else {
|
||||
InterfaceReportThread thread = initializeThread(request, response, name);
|
||||
|
||||
@@ -211,7 +211,7 @@ public class PricatParseExcelHtmlThread extends AbstractReportThread {
|
||||
getReport().getReportUpdate();
|
||||
String logFileName = getReport().closeLogFile();
|
||||
if (UtilValidate.isNotEmpty(pricatParser)) {
|
||||
if (thruReasonId.equals("EXCEL_IMPORT_SUCCESS") && pricatParser.hasErrorMessages()) {
|
||||
if ("EXCEL_IMPORT_SUCCESS".equals(thruReasonId) && pricatParser.hasErrorMessages()) {
|
||||
thruReasonId = "EXCEL_IMPORT_QUEST";
|
||||
}
|
||||
pricatParser.endExcelImportHistory(logFileName, thruReasonId);
|
||||
@@ -264,7 +264,7 @@ public class PricatParseExcelHtmlThread extends AbstractReportThread {
|
||||
for (int i = 0; i < fileItems.size(); i++) {
|
||||
fi = fileItems.get(i);
|
||||
String fieldName = fi.getFieldName();
|
||||
if (fieldName.equals("filename")) {
|
||||
if ("filename".equals(fieldName)) {
|
||||
pricatFi = fi;
|
||||
pricatBytes = pricatFi.get();
|
||||
Path path = Paths.get(fi.getName());
|
||||
|
||||
Reference in New Issue
Block a user