You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2026/04/13 10:12:17 UTC

(ofbiz-framework) branch release24.09 updated (ed6e0f9f00 -> 528ed7e13c)

This is an automated email from the ASF dual-hosted git repository.

jacopoc pushed a change to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


    from ed6e0f9f00 Bump docker/login-action from 4.0.0 to 4.1.0
     new 4b9526cbe2 Fixed: Update Gradle wrapper to version 8.14.4
     new 2199981bbd Backported: Refactor boolean assignments to comply with codestyle rules
     new 528ed7e13c Fixed: Increase memory for checkstyleMain to support Gradle 8+

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../payment/GiftCertificateServices.java           |  4 +-
 .../thirdparty/gosoftware/RitaServices.java        |  2 +-
 .../thirdparty/valuelink/ValueLinkServices.java    |  4 +-
 .../ofbiz/content/ContentManagementServices.java   |  2 +-
 .../content/webapp/ftl/RenderContentAsText.java    |  2 +-
 .../content/webapp/ftl/RenderSubContentAsText.java |  2 +-
 .../webapp/ftl/RenderSubContentCacheTransform.java |  2 +-
 .../manufacturing/techdata/TechDataServices.java   |  2 +-
 .../ofbiz/order/shoppingcart/CheckOutEvents.java   |  2 +-
 .../order/shoppinglist/ShoppingListEvents.java     |  2 +-
 .../ofbiz/party/contact/ContactMechServices.java   |  2 +-
 .../apache/ofbiz/party/party/PartyServices.java    |  4 +-
 .../ofbiz/product/product/ProductServices.java     |  4 +-
 build.gradle                                       |  2 +
 .../ofbiz/base/conversion/BooleanConverters.java   |  2 +-
 .../apache/ofbiz/common/email/EmailServices.java   |  3 +-
 .../org/apache/ofbiz/entity/GenericEntity.java     |  2 +-
 .../apache/ofbiz/widget/model/ModelFormField.java  |  4 +-
 gradle/wrapper/gradle-wrapper.properties           |  3 +-
 gradlew                                            | 39 +++++++++------
 gradlew.bat                                        | 58 +++++++++-------------
 21 files changed, 73 insertions(+), 74 deletions(-)


(ofbiz-framework) 02/03: Backported: Refactor boolean assignments to comply with codestyle rules

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jacopoc pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 2199981bbd668a56df299db4115433c340fb879e
Author: Jacopo Cappellato <ja...@gmail.com>
AuthorDate: Thu Apr 9 14:07:07 2026 +0200

    Backported: Refactor boolean assignments to comply with codestyle rules
---
 .../org/apache/ofbiz/accounting/payment/GiftCertificateServices.java  | 4 ++--
 .../apache/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java   | 2 +-
 .../ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java      | 4 ++--
 .../main/java/org/apache/ofbiz/content/ContentManagementServices.java | 2 +-
 .../java/org/apache/ofbiz/content/webapp/ftl/RenderContentAsText.java | 2 +-
 .../org/apache/ofbiz/content/webapp/ftl/RenderSubContentAsText.java   | 2 +-
 .../ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java      | 2 +-
 .../org/apache/ofbiz/manufacturing/techdata/TechDataServices.java     | 2 +-
 .../main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java | 2 +-
 .../java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java  | 2 +-
 .../main/java/org/apache/ofbiz/party/contact/ContactMechServices.java | 2 +-
 .../src/main/java/org/apache/ofbiz/party/party/PartyServices.java     | 4 ++--
 .../main/java/org/apache/ofbiz/product/product/ProductServices.java   | 4 ++--
 .../main/java/org/apache/ofbiz/base/conversion/BooleanConverters.java | 2 +-
 .../src/main/java/org/apache/ofbiz/common/email/EmailServices.java    | 3 +--
 .../entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java   | 2 +-
 .../src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java   | 4 ++--
 17 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/GiftCertificateServices.java b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/GiftCertificateServices.java
index 81050d6f45..fd8f775426 100644
--- a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/GiftCertificateServices.java
+++ b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/GiftCertificateServices.java
@@ -827,8 +827,8 @@ public class GiftCertificateServices {
         String orderEmails = orh.getOrderEmailString();
         String copyMeField = giftCertSettings.getString("purchSurveyCopyMe");
         String copyMeResp = copyMeField != null ? (String) answerMap.get(copyMeField) : null;
-        boolean copyMe = (UtilValidate.isNotEmpty(copyMeField)
-                && UtilValidate.isNotEmpty(copyMeResp) && "true".equalsIgnoreCase(copyMeResp)) ? true : false;
+        boolean copyMe = UtilValidate.isNotEmpty(copyMeField)
+                && UtilValidate.isNotEmpty(copyMeResp) && "true".equalsIgnoreCase(copyMeResp);
 
         int qtyLoop = quantity.intValue();
         for (int i = 0; i < qtyLoop; i++) {
diff --git a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java
index a6ae5278e6..c49475d78b 100644
--- a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java
+++ b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java
@@ -454,7 +454,7 @@ public class RitaServices {
         } catch (RuntimeException e) {
             Debug.logError(e, MODULE);
         }
-        boolean ssl = "Y".equals(props.getProperty("ssl", "N")) ? true : false;
+        boolean ssl = "Y".equals(props.getProperty("ssl", "N"));
 
         RitaApi api = null;
         if (port > 0 && host != null) {
diff --git a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
index 1bf44d749d..7d33fc5702 100644
--- a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
+++ b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
@@ -1111,8 +1111,8 @@ public class ValueLinkServices {
         String orderEmails = orh.getOrderEmailString();
         String copyMeField = EntityUtilProperties.getPropertyValue(paymentConfig, "payment.giftcert.purchase.survey.copyMe", delegator);
         String copyMeResp = copyMeField != null ? (String) answerMap.get(copyMeField) : null;
-        boolean copyMe = (UtilValidate.isNotEmpty(copyMeField)
-                && UtilValidate.isNotEmpty(copyMeResp) && "true".equalsIgnoreCase(copyMeResp)) ? true : false;
+        boolean copyMe = UtilValidate.isNotEmpty(copyMeField)
+                && UtilValidate.isNotEmpty(copyMeResp) && "true".equalsIgnoreCase(copyMeResp);
 
         int qtyLoop = quantity.intValue();
         for (int i = 0; i < qtyLoop; i++) {
diff --git a/applications/content/src/main/java/org/apache/ofbiz/content/ContentManagementServices.java b/applications/content/src/main/java/org/apache/ofbiz/content/ContentManagementServices.java
index 7fdaac8529..b4796e70cd 100644
--- a/applications/content/src/main/java/org/apache/ofbiz/content/ContentManagementServices.java
+++ b/applications/content/src/main/java/org/apache/ofbiz/content/ContentManagementServices.java
@@ -816,7 +816,7 @@ public class ContentManagementServices {
             }
             pkFields.put(fieldName, fieldValue);
         }
-        boolean doLink = (action != null && "Y".equalsIgnoreCase(action)) ? true : false;
+        boolean doLink = "Y".equalsIgnoreCase(action);
         if (Debug.infoOn()) {
             Debug.logInfo("in updateOrRemove, context:" + context, MODULE);
         }
diff --git a/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderContentAsText.java b/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderContentAsText.java
index 27ad2a37d2..6671698995 100644
--- a/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderContentAsText.java
+++ b/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderContentAsText.java
@@ -76,7 +76,7 @@ public class RenderContentAsText implements TemplateTransformModel {
         }
         final String thisContentId = (String) templateRoot.get("contentId");
         final String xmlEscape = (String) templateRoot.get("xmlEscape");
-        final boolean directAssocMode = UtilValidate.isNotEmpty(thisContentId) ? true : false;
+        final boolean directAssocMode = UtilValidate.isNotEmpty(thisContentId);
         if (Debug.verboseOn()) {
             Debug.logVerbose("in Render(0), directAssocMode ." + directAssocMode, MODULE);
         }
diff --git a/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentAsText.java b/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentAsText.java
index 9b72309245..879192e498 100644
--- a/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentAsText.java
+++ b/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentAsText.java
@@ -75,7 +75,7 @@ public class RenderSubContentAsText implements TemplateTransformModel {
         if (Debug.infoOn()) {
             Debug.logInfo("in Render(0), thisSubContentId ." + thisContentId, MODULE);
         }
-        final boolean directAssocMode = UtilValidate.isNotEmpty(thisContentId) ? true : false;
+        final boolean directAssocMode = UtilValidate.isNotEmpty(thisContentId);
         if (Debug.infoOn()) {
             Debug.logInfo("in Render(0), directAssocMode ." + directAssocMode, MODULE);
         }
diff --git a/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java b/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
index 4d1d2f57db..b4fd54e336 100644
--- a/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
+++ b/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
@@ -73,7 +73,7 @@ public class RenderSubContentCacheTransform implements TemplateTransformModel {
         String strNullThruDatesOnly = (String) templateRoot.get("nullThruDatesOnly");
         Boolean nullThruDatesOnly = (strNullThruDatesOnly != null && "true".equalsIgnoreCase(strNullThruDatesOnly)) ? Boolean.TRUE : Boolean.FALSE;
         String thisSubContentId = (String) templateRoot.get("subContentId");
-        final boolean directAssocMode = UtilValidate.isNotEmpty(thisSubContentId) ? true : false;
+        final boolean directAssocMode = UtilValidate.isNotEmpty(thisSubContentId);
         GenericValue val = null;
         try {
             val = ContentWorker.getCurrentContent(delegator, trail, userLogin, templateRoot, nullThruDatesOnly, contentAssocPredicateId);
diff --git a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/techdata/TechDataServices.java b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/techdata/TechDataServices.java
index a6cf80503a..3525b12fa3 100644
--- a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/techdata/TechDataServices.java
+++ b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/techdata/TechDataServices.java
@@ -119,7 +119,7 @@ public class TechDataServices {
         Timestamp thruDate = (Timestamp) context.get("thruDate");
         String create = (String) context.get("create");
 
-        boolean createProcess = (create != null && "Y".equals(create)) ? true : false;
+        boolean createProcess = "Y".equals(create);
         List<GenericValue> listRoutingTaskAssoc = null;
 
         try {
diff --git a/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java b/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java
index d51273f19a..b7a0864b6f 100644
--- a/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java
+++ b/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java
@@ -1050,7 +1050,7 @@ public class CheckOutEvents {
                 requireTerm = requireTermStr == null || "true".equalsIgnoreCase(requireTermStr);
             }
             requireAdditionalParty = requireAdditionalPartyStr == null || "true".equalsIgnoreCase(requireAdditionalPartyStr);
-            isSingleUsePayment = singleUsePaymentStr != null && "Y".equalsIgnoreCase(singleUsePaymentStr) ? true : false;
+            isSingleUsePayment = "Y".equalsIgnoreCase(singleUsePaymentStr);
         }
 
         boolean shippingAddressSet = true;
diff --git a/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java b/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java
index dbc98caa17..94cdc374c3 100644
--- a/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java
+++ b/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java
@@ -535,7 +535,7 @@ public class ShoppingListEvents {
 
         // check to see if we are okay to load this list
         java.sql.Timestamp lastLoad = cart.getLastListRestore();
-        boolean okayToLoad = autoSaveListId == null ? false : (lastLoad == null ? true : false);
+        boolean okayToLoad = autoSaveListId != null && lastLoad == null;
         if (!okayToLoad && lastLoad != null) {
             GenericValue shoppingList = null;
             try {
diff --git a/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechServices.java b/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechServices.java
index 836ed25cf6..6ca63efdf6 100644
--- a/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechServices.java
+++ b/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechServices.java
@@ -903,7 +903,7 @@ public class ContactMechServices {
             }
         }
         Boolean bShowOld = (Boolean) context.get("showOld");
-        boolean showOld = (bShowOld != null && bShowOld) ? true : false;
+        boolean showOld = Boolean.TRUE.equals(bShowOld);
         String contactMechTypeId = (String) context.get("contactMechTypeId");
         List<Map<String, Object>> valueMaps = ContactMechWorker.getPartyContactMechValueMaps(delegator, partyId, showOld, contactMechTypeId);
         result.put("valueMaps", valueMaps);
diff --git a/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java b/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
index 929a41368f..5b2ea3147e 100644
--- a/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
+++ b/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
@@ -2262,8 +2262,8 @@ public class PartyServices {
         String searchPartyFirstContext = (String) context.get("searchPartyFirst");
         String searchAllIdContext = (String) context.get("searchAllId");
 
-        boolean searchPartyFirst = UtilValidate.isNotEmpty(searchPartyFirstContext) && "N".equals(searchPartyFirstContext) ? false : true;
-        boolean searchAllId = UtilValidate.isNotEmpty(searchAllIdContext) && "Y".equals(searchAllIdContext) ? true : false;
+        boolean searchPartyFirst = !UtilValidate.isNotEmpty(searchPartyFirstContext) || !"N".equals(searchPartyFirstContext);
+        boolean searchAllId = UtilValidate.isNotEmpty(searchAllIdContext) && "Y".equals(searchAllIdContext);
 
         GenericValue party = null;
         List<GenericValue> partiesFound = null;
diff --git a/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java b/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java
index 47c9f596f7..3a93419928 100644
--- a/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java
+++ b/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java
@@ -1319,8 +1319,8 @@ public class ProductServices {
         String searchProductFirstContext = (String) context.get("searchProductFirst");
         String searchAllIdContext = (String) context.get("searchAllId");
 
-        boolean searchProductFirst = UtilValidate.isNotEmpty(searchProductFirstContext) && "N".equals(searchProductFirstContext) ? false : true;
-        boolean searchAllId = UtilValidate.isNotEmpty(searchAllIdContext) && "Y".equals(searchAllIdContext) ? true : false;
+        boolean searchProductFirst = !UtilValidate.isNotEmpty(searchProductFirstContext) || !"N".equals(searchProductFirstContext);
+        boolean searchAllId = UtilValidate.isNotEmpty(searchAllIdContext) && "Y".equals(searchAllIdContext);
 
         GenericValue product = null;
         List<GenericValue> productsFound = null;
diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/conversion/BooleanConverters.java b/framework/base/src/main/java/org/apache/ofbiz/base/conversion/BooleanConverters.java
index 163d7b7a3e..16568997e3 100644
--- a/framework/base/src/main/java/org/apache/ofbiz/base/conversion/BooleanConverters.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/conversion/BooleanConverters.java
@@ -63,7 +63,7 @@ public class BooleanConverters implements ConverterLoader {
 
         @Override
         public Boolean convert(Integer obj) throws ConversionException {
-            return obj == 0 ? false : true;
+            return obj != 0;
         }
     }
 
diff --git a/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java b/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java
index 7b92eb9710..3f01063faa 100644
--- a/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java
@@ -206,8 +206,7 @@ public class EmailServices {
                 socketFactoryFallback = EntityUtilProperties.getPropertyValue("general", "mail.smtp.socketFactory.fallback", "false", delegator);
             }
             if (sendPartial == null) {
-                sendPartial = EntityUtilProperties.propertyValueEqualsIgnoreCase("general", "mail.smtp.sendpartial", "true", delegator)
-                        ? true : false;
+                sendPartial = EntityUtilProperties.propertyValueEqualsIgnoreCase("general", "mail.smtp.sendpartial", "true", delegator);
             }
             if (isStartTLSEnabled == null) {
                 isStartTLSEnabled = EntityUtilProperties.propertyValueEqualsIgnoreCase("general", "mail.smtp.starttls.enable", "true", delegator);
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java
index e2b94edaf5..50a5ed227d 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java
@@ -1772,7 +1772,7 @@ public class GenericEntity implements Map<String, Object>, LocalizedMap<Object>,
      * @return the boolean
      */
     public boolean originalDbValuesAvailable() {
-        return this.originalDbValues != null ? true : false;
+        return this.originalDbValues != null;
     }
 
     /**
diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
index 1907d2f016..5936049381 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
@@ -5485,9 +5485,9 @@ public final class ModelFormField {
                 this.defaultOption = UtilProperties.getPropertyValue("widget", "widget.form.defaultTextFindOption", "contains");
             }
             this.hideIgnoreCase = "true".equals(element.getAttribute("hide-options"))
-                    || "ignore-case".equals(element.getAttribute("hide-options")) ? true : false;
+                    || "ignore-case".equals(element.getAttribute("hide-options"));
             this.hideOptions = "true".equals(element.getAttribute("hide-options"))
-                    || "options".equals(element.getAttribute("hide-options")) ? true : false;
+                    || "options".equals(element.getAttribute("hide-options"));
             this.ignoreCase = "true".equals(element.getAttribute("ignore-case"));
         }
 


(ofbiz-framework) 01/03: Fixed: Update Gradle wrapper to version 8.14.4

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jacopoc pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 4b9526cbe248d69a409ad035fb73d6b1cb5b2811
Author: Jacopo Cappellato <ja...@gmail.com>
AuthorDate: Thu Apr 9 11:54:32 2026 +0200

    Fixed: Update Gradle wrapper to version 8.14.4
---
 gradle/wrapper/gradle-wrapper.properties |  3 +-
 gradlew                                  | 39 ++++++++++++---------
 gradlew.bat                              | 58 +++++++++++++-------------------
 3 files changed, 49 insertions(+), 51 deletions(-)

diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index b3715553af..aaaabb3cb9 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.6-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
 networkTimeout=10000
+validateDistributionUrl=true
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index 3b31112c3f..23d15a9367 100755
--- a/gradlew
+++ b/gradlew
@@ -15,6 +15,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+# SPDX-License-Identifier: Apache-2.0
+#
 
 ##############################################################################
 #
@@ -55,7 +57,7 @@
 #       Darwin, MinGW, and NonStop.
 #
 #   (3) This script is generated from the Groovy template
-#       https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
 #       within the Gradle project.
 #
 #       You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,10 +85,8 @@ done
 # This is normally unused
 # shellcheck disable=SC2034
 APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"'
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
 
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD=maximum
@@ -114,7 +114,7 @@ case "$( uname )" in                #(
   NONSTOP* )        nonstop=true ;;
 esac
 
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+CLASSPATH="\\\"\\\""
 
 
 # Determine the Java command to use to start the JVM.
@@ -133,10 +133,13 @@ location of your Java installation."
     fi
 else
     JAVACMD=java
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+    if ! command -v java >/dev/null 2>&1
+    then
+        die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 
 Please set the JAVA_HOME variable in your environment to match the
 location of your Java installation."
+    fi
 fi
 
 # Increase the maximum file descriptors if we can.
@@ -144,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
     case $MAX_FD in #(
       max*)
         # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
-        # shellcheck disable=SC3045 
+        # shellcheck disable=SC2039,SC3045
         MAX_FD=$( ulimit -H -n ) ||
             warn "Could not query maximum file descriptor limit"
     esac
@@ -152,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
       '' | soft) :;; #(
       *)
         # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
-        # shellcheck disable=SC3045 
+        # shellcheck disable=SC2039,SC3045
         ulimit -n "$MAX_FD" ||
             warn "Could not set maximum file descriptor limit to $MAX_FD"
     esac
@@ -197,16 +200,20 @@ if "$cygwin" || "$msys" ; then
     done
 fi
 
-# Collect all arguments for the java command;
-#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-#     shell script including quotes and variable substitutions, so put them in
-#     double quotes to make sure that they get re-expanded; and
-#   * put everything else in single quotes, so that it's not re-expanded.
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+#     and any embedded shellness will be escaped.
+#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+#     treated as '${Hostname}' itself on the command line.
 
 set -- \
         "-Dorg.gradle.appname=$APP_BASE_NAME" \
         -classpath "$CLASSPATH" \
-        org.gradle.wrapper.GradleWrapperMain \
+        -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
         "$@"
 
 # Stop when "xargs" is not available.
@@ -241,4 +248,4 @@ eval "set -- $(
         tr '\n' ' '
     )" '"$@"'
 
-exec "$JAVACMD" "$@"
\ No newline at end of file
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
index 5093609d51..db3a6ac207 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -13,8 +13,10 @@
 @rem See the License for the specific language governing permissions and
 @rem limitations under the License.
 @rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
 
-@if "%DEBUG%" == "" @echo off
+@if "%DEBUG%"=="" @echo off
 @rem ##########################################################################
 @rem
 @rem  Gradle startup script for Windows
@@ -25,7 +27,8 @@
 if "%OS%"=="Windows_NT" setlocal
 
 set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
 set APP_BASE_NAME=%~n0
 set APP_HOME=%DIRNAME%
 
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
 
 set JAVA_EXE=java.exe
 %JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
+if %ERRORLEVEL% equ 0 goto execute
 
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
 
 goto fail
 
@@ -54,49 +57,36 @@ goto fail
 set JAVA_HOME=%JAVA_HOME:"=%
 set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 
-if exist "%JAVA_EXE%" goto init
+if exist "%JAVA_EXE%" goto execute
 
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
 
 goto fail
 
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
 :execute
 @rem Setup the command line
 
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+set CLASSPATH=
 
 
 @rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
 
 :end
 @rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
+if %ERRORLEVEL% equ 0 goto mainEnd
 
 :fail
 rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
 rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
 
 :mainEnd
 if "%OS%"=="Windows_NT" endlocal


(ofbiz-framework) 03/03: Fixed: Increase memory for checkstyleMain to support Gradle 8+

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jacopoc pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 528ed7e13ce3c7822f3f868142b3c800cf5e43a0
Author: Jacopo Cappellato <ja...@gmail.com>
AuthorDate: Thu Apr 9 14:08:29 2026 +0200

    Fixed: Increase memory for checkstyleMain to support Gradle 8+
---
 build.gradle | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/build.gradle b/build.gradle
index 7a4447594b..78a20460af 100644
--- a/build.gradle
+++ b/build.gradle
@@ -268,6 +268,8 @@ checkstyle {
     // 'checkstyle' tool present in the framework and in the official
     // plugins.
     tasks.checkstyleMain.maxErrors = 0
+    // Increase memory for checkstyleMain required for Gradle 8+.
+    tasks.checkstyleMain.maxHeapSize = '1g'
     // Currently there are no errors so we can show new one when they appear
     showViolations = true
 }