Skip to content
Permalink
Browse files

Fixed: CategoryServices returns null when opening Product main page

(OFBIZ-11175)
Increase parsing control to don't realize it on null value for viewSizeString
when call service getProductCategoryAndLimitedMembers.

Thanks Jacques Leroux for raise this issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865924 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
nmalin committed Aug 26, 2019
1 parent 60787a3 commit 1aee343a6939037a58641c1cc2ccba3397df2fc8
@@ -236,17 +236,23 @@ private static String getCategoryFindEntityName(Delegator delegator, List<String

Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
int viewIndex = 0;
try {
viewIndex = Integer.parseInt((String) context.get("viewIndexString"));
} catch (Exception e) {
viewIndex = 0;
if (context.containsKey("viewIndexString")) {
try {
viewIndex = Integer.parseInt((String) context.get("viewIndexString"));
} catch (Exception e) {
viewIndex = 0;
}
}

int viewSize = defaultViewSize;
try {
viewSize = Integer.parseInt((String) context.get("viewSizeString"));
} catch (NumberFormatException e) {
Debug.logError(e.getMessage(), module);
if (context.containsKey("viewSizeString")) {
try {
viewSize = Integer.parseInt((String) context.get("viewSizeString"));
} catch (NumberFormatException e) {
Debug.logWarning("Fail to parse viewSizeString "
+ context.get("viewSizeString")
+ " " + e.getMessage(), module);
}
}

GenericValue productCategory;

0 comments on commit 1aee343

Please sign in to comment.
You can’t perform that action at this time.