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
commit 6c70dbe6ea7aff517271daa27b9b08b5ece2c6e2 Author: Jacques Le Roux <[email protected]> AuthorDate: Sat Dec 3 19:01:06 2022 +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 --- .../main/java/org/apache/ofbiz/security/CsrfUtil.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 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 294f01de0e..25b2157afa 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 @@ -46,21 +46,18 @@ import org.apache.ofbiz.webapp.control.WebAppConfigurationException; public final class CsrfUtil { private static final String MODULE = CsrfUtil.class.getName(); - private static String tokenNameNonAjax = UtilProperties.getPropertyValue("security", "csrf.tokenName.nonAjax", - "csrf"); + private static String tokenNameNonAjax = UtilProperties.getPropertyValue("security", "csrf.tokenName.nonAjax", "csrf"); private static ICsrfDefenseStrategy strategy; private static String strategyCanonicalName; - private static int cacheSize = (int) Long - .parseLong(UtilProperties.getPropertyValue("security", "csrf.cache.size", "5000")); + private static int cacheSize = (int) Long.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; - - @Override - protected boolean removeEldestEntry(Map.Entry<String, Map<String, Map<String, String>>> eldest) { - return size() > cacheSize; // TODO use also csrf.cache.size here? - } - }; + 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? + } + }; private CsrfUtil() { }

