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-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e10a66f9d3 Improved: Upgrade to gradle 7.6 - support jdk 8 -> 17 
(OFBIZ-12400)
e10a66f9d3 is described below

commit e10a66f9d3abfb1315c91bb066016c70e52f2ae2
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Wed Nov 30 13:23:14 2022 +0100

    Improved: Upgrade to gradle 7.6 - support jdk 8 -> 17 (OFBIZ-12400)
    
    Only non functional Java changes, unrelated to Gradle and JDK upgrades
    
    Thanks: Ioan Eugen Stan
---
 .../apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java | 5 +++--
 .../src/main/java/org/apache/ofbiz/order/order/OrderServices.java    | 5 +++--
 .../datafile/src/main/java/org/apache/ofbiz/datafile/Record.java     | 5 +++--
 .../security/src/main/java/org/apache/ofbiz/security/CsrfUtil.java   | 4 ++++
 4 files changed, 13 insertions(+), 6 deletions(-)

diff --git 
a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
 
b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
index ba2a14501e..9f250741ee 100644
--- 
a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
+++ 
b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
@@ -846,8 +846,9 @@ public class ProductionRunServices {
             if (oneTask.getString("workEffortId").equals(taskId)) {
                 theTask = oneTask;
             } else {
-                if (theTask == null && allPrecTaskCompletedOrRunning && 
(!"PRUN_COMPLETED".equals(oneTask.getString("currentStatusId")) && !
-                        
"PRUN_RUNNING".equals(oneTask.getString("currentStatusId")))) {
+                if (theTask == null && allPrecTaskCompletedOrRunning
+                        && 
(!"PRUN_COMPLETED".equals(oneTask.getString("currentStatusId"))
+                        && 
!"PRUN_RUNNING".equals(oneTask.getString("currentStatusId")))) {
                     allPrecTaskCompletedOrRunning = false;
                 }
                 if (allTaskCompleted && 
!"PRUN_COMPLETED".equals(oneTask.getString("currentStatusId"))) {
diff --git 
a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
 
b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
index 2e167226a7..347f6ab1e5 100644
--- 
a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
+++ 
b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
@@ -1270,8 +1270,9 @@ public class OrderServices {
                                     + "] is not in a proper status for 
reservation", MODULE);
                             continue;
                         }
-                        if 
(UtilValidate.isNotEmpty(orderItem.getString("productId")) &&   // only reserve 
product items, ignore non-product items
-                                
!"RENTAL_ORDER_ITEM".equals(orderItem.getString("orderItemTypeId"))) {  // 
ignore for rental
+                        if 
(UtilValidate.isNotEmpty(orderItem.getString("productId"))
+                                // only reserve product items, ignore 
non-product items
+                                && 
!"RENTAL_ORDER_ITEM".equals(orderItem.getString("orderItemTypeId"))) {  // 
ignore for rental
                             try {
                                 // get the product of the order item
                                 GenericValue product = 
orderItem.getRelatedOne("Product", false);
diff --git 
a/framework/datafile/src/main/java/org/apache/ofbiz/datafile/Record.java 
b/framework/datafile/src/main/java/org/apache/ofbiz/datafile/Record.java
index 1f74cccd06..20bbba49ec 100644
--- a/framework/datafile/src/main/java/org/apache/ofbiz/datafile/Record.java
+++ b/framework/datafile/src/main/java/org/apache/ofbiz/datafile/Record.java
@@ -246,8 +246,9 @@ public class Record implements Serializable {
      * little endian reader for 8 byte long.
      */
     private static long readLELong(byte[] byteArray) {
-        return (long) (byteArray[7]) << 56 | /* long cast needed or shift done 
modulo 32 */
-               (long) (byteArray[6] & 0xff) << 48 | (long) (byteArray[5] & 
0xff) << 40 | (long) (byteArray[4] & 0xff) << 32 | (long) (byteArray[3]
+        return (long) (byteArray[7]) << 56
+                /* long cast needed or shift done modulo 32 */
+                | (long) (byteArray[6] & 0xff) << 48 | (long) (byteArray[5] & 
0xff) << 40 | (long) (byteArray[4] & 0xff) << 32 | (long) (byteArray[3]
                 & 0xff) << 24 | (long) (byteArray[2] & 0xff) << 16 | (long) 
(byteArray[1] & 0xff) << 8 | (byteArray[0] & 0xff);
     }
 
diff --git 
a/framework/security/src/main/java/org/apache/ofbiz/security/CsrfUtil.java 
b/framework/security/src/main/java/org/apache/ofbiz/security/CsrfUtil.java
index 438f8f2411..294f01de0e 100644
--- a/framework/security/src/main/java/org/apache/ofbiz/security/CsrfUtil.java
+++ b/framework/security/src/main/java/org/apache/ofbiz/security/CsrfUtil.java
@@ -24,6 +24,7 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 import javax.ws.rs.core.MultivaluedHashMap;
@@ -55,6 +56,7 @@ public final class CsrfUtil {
             new LinkedHashMap<String, Map<String, Map<String, String>>>() {
         private static final long serialVersionUID = 1L;
 
+        @Override
         protected boolean removeEldestEntry(Map.Entry<String, Map<String, 
Map<String, String>>> eldest) {
             return size() > cacheSize; // TODO use also csrf.cache.size here?
         }
@@ -100,6 +102,7 @@ public final class CsrfUtil {
                 tokenMap = new LinkedHashMap<String, String>() {
                     private static final long serialVersionUID = 1L;
 
+                    @Override
                     protected boolean removeEldestEntry(Map.Entry<String, 
String> eldest) {
                         return size() > cacheSize;
                     }
@@ -112,6 +115,7 @@ public final class CsrfUtil {
                 tokenMap = new LinkedHashMap<String, String>() {
                     private static final long serialVersionUID = 1L;
 
+                    @Override
                     protected boolean removeEldestEntry(Map.Entry<String, 
String> eldest) {
                         return size() > cacheSize;
                     }

Reply via email to