Improved: Refactor boolean returns for ShoppingCart methods
(OFBIZ-10745) Improved boolean returns with single statement, replacing if blocks with explicit boolean return. Thanks Suraj Khurana and Jacques Le Roux for the review. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849672 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+1
-4
@@ -1965,10 +1965,7 @@ public class ShoppingCart implements Iterable<ShoppingCartItem>, Serializable {
|
||||
try {
|
||||
GenericValue giftCertSettings = getGiftCertSettingFromStore(delegator);
|
||||
if (giftCertSettings != null) {
|
||||
if ("Y".equals(giftCertSettings.getString("requirePinCode"))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return "Y".equals(giftCertSettings.getString("requirePinCode"));
|
||||
}
|
||||
Debug.logWarning("No product store gift certificate settings found for store [" + getProductStoreId() + "]",
|
||||
module);
|
||||
|
||||
Reference in New Issue
Block a user