You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2021/11/17 07:16:08 UTC
[ofbiz-plugins] branch trunk updated: Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git
The following commit(s) were added to refs/heads/trunk by this push:
new 002bb61 Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
002bb61 is described below
commit 002bb61b6ec3d1193fe99be8af169f167a4085f6
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Wed Nov 17 08:16:02 2021 +0100
Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
Return with post increment does not work, pre increment does
Thanks: Spotbugs
---
solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java b/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java
index 92a8628..893c704 100644
--- a/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java
+++ b/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java
@@ -158,7 +158,7 @@ public final class CategoryUtil {
if (productCategoryId.contains("/")) {
String[] productCategories = productCategoryId.split("/");
int level = Integer.parseInt(productCategories[0]);
- return level++;
+ return ++level;
} else {
return 0;
}