svn commit: r1817572 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/OrderManagerEvents.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1817572 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/OrderManagerEvents.java

mbrohl
Author: mbrohl
Date: Fri Dec  8 21:21:55 2017
New Revision: 1817572

URL: http://svn.apache.org/viewvc?rev=1817572&view=rev
Log:
Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.order.
(OFBIZ-9729)

Thanks Julian Leichert for reporting and providing the patch.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/OrderManagerEvents.java

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/OrderManagerEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/OrderManagerEvents.java?rev=1817572&r1=1817571&r2=1817572&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/OrderManagerEvents.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/OrderManagerEvents.java Fri Dec  8 21:21:55 2017
@@ -97,7 +97,7 @@ public class OrderManagerEvents {
                         return "error";
                     }
 
-                    if ((results == null) || (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR))) {
+                    if (ModelService.RESPOND_ERROR.equals(results.get(ModelService.RESPONSE_MESSAGE))) {
                         Debug.logError((String) results.get(ModelService.ERROR_MESSAGE), module);
                         request.setAttribute("_ERROR_MESSAGE_", results.get(ModelService.ERROR_MESSAGE));
                         return "error";
@@ -208,7 +208,7 @@ public class OrderManagerEvents {
                         return "error";
                     }
 
-                    if ((results == null) || (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR))) {
+                    if (ModelService.RESPOND_ERROR.equals(results.get(ModelService.RESPONSE_MESSAGE))) {
                         Debug.logError((String) results.get(ModelService.ERROR_MESSAGE), module);
                         request.setAttribute("_ERROR_MESSAGE_", results.get(ModelService.ERROR_MESSAGE));
                         return "error";
@@ -266,7 +266,7 @@ public class OrderManagerEvents {
                         return "error";
                     }
 
-                    if ((results == null) || (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR))) {
+                    if (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR)) {
                         Debug.logError((String) results.get(ModelService.ERROR_MESSAGE), module);
                         request.setAttribute("_ERROR_MESSAGE_", results.get(ModelService.ERROR_MESSAGE));
                         return "error";