gilPts commented on code in PR #517:
URL: https://github.com/apache/ofbiz-framework/pull/517#discussion_r1149422868


##########
applications/order/groovyScripts/shoppinglist/ShoppingListServices.groovy:
##########
@@ -131,39 +123,30 @@ def updateShoppingListItem() {
 
 /**
  * Remove a ShoppingListItem
- * @return
  */
-def removeShoppingListItem() {
-    GenericValue shoppingList = 
from("ShoppingList").where(parameters).queryOne()
-    GenericValue shoppingListItem = 
from("ShoppingListItem").where(parameters).queryOne()
+Map removeShoppingListItem() {
+    GenericValue shoppingList = 
from('ShoppingList').where(parameters).queryOne()
+    GenericValue shoppingListItem = 
from('ShoppingListItem').where(parameters).queryOne()
     shoppingListItem.remove()
 
     updateLastAdminModified(shoppingList, userLogin)
     return success()
 }
 

Review Comment:
   oh, indeed i missread, the if was inverted to respect InvertedIfElse rule : 
An inverted if-else statement is one in which there is a single if statement 
with a single else branch and the boolean test of the if is negated. For 
instance if (!x) false else true. It is usually clearer to write this as if (x) 
true else false.
   
   The method was not moved since it is still in the  `if (!shoppingListItems) 
{` block.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to