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:
Aditya Sharma
2018-12-24 07:10:19 +00:00
parent 356984ce4f
commit 71988f71ca
@@ -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);