This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release22.01
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release22.01 by this push:
new 2712a75ec2 Improved: Upgrade to gradle 7.6 - support jdk 11 -> 17
(OFBIZ-12400)
2712a75ec2 is described below
commit 2712a75ec25e8e6452232cc0e1377309ce6f9bba
Author: Jacques Le Roux <[email protected]>
AuthorDate: Thu Jan 12 16:17:36 2023 +0100
Improved: Upgrade to gradle 7.6 - support jdk 11 -> 17 (OFBIZ-12400)
Eugen made some changes for checkstyle in his PR. I did not apply those
because
they did not appear with Java 11. Now that I'm using Java 17 I got some
checkstyle issues, I guess the same than Eugen fixed. Here they are fixed
with
some other formatting changes
Conflicts handled by hand
---
.../src/main/java/org/apache/ofbiz/security/CsrfUtil.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
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 c834fb4901..411d56b154 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;
@@ -53,12 +54,13 @@ public final class CsrfUtil {
.parseLong(UtilProperties.getPropertyValue("security",
"csrf.cache.size", "5000"));
private static LinkedHashMap<String, Map<String, Map<String, String>>>
csrfTokenCache =
new LinkedHashMap<String, Map<String, Map<String, String>>>() {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
- protected boolean removeEldestEntry(Map.Entry<String, Map<String,
Map<String, String>>> eldest) {
- return size() > cacheSize; // TODO use also csrf.cache.size here?
- }
- };
+ @Override
+ protected boolean removeEldestEntry(Map.Entry<String,
Map<String, Map<String, String>>> eldest) {
+ return size() > cacheSize; // TODO use also
csrf.cache.size here?
+ }
+ };
private CsrfUtil() {
}
@@ -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;
}