From 690be338e2b7d9f5e4fd375639c3a4c0f453a854 Mon Sep 17 00:00:00 2001 From: Andrea Aime Date: Sun, 23 Apr 2023 12:06:33 +0200 Subject: [PATCH] Upgrading to spotbugs 4.7.3.4 --- .../src/main/java/org/geowebcache/proxy/ProxyDispatcher.java | 3 ++- geowebcache/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/geowebcache/core/src/main/java/org/geowebcache/proxy/ProxyDispatcher.java b/geowebcache/core/src/main/java/org/geowebcache/proxy/ProxyDispatcher.java index 09b4a608a..d21a86dba 100644 --- a/geowebcache/core/src/main/java/org/geowebcache/proxy/ProxyDispatcher.java +++ b/geowebcache/core/src/main/java/org/geowebcache/proxy/ProxyDispatcher.java @@ -43,7 +43,8 @@ protected ModelAndView handleRequestInternal( throw new ServletException("Expected url parameter."); } - synchronized (this) { + // lastRequest is static, static synchronization needed + synchronized (ProxyDispatcher.class) { long time = System.currentTimeMillis(); if (time - lastRequest < 1000) { throw new ServletException("Only one request per second please."); diff --git a/geowebcache/pom.xml b/geowebcache/pom.xml index b33df7650..f599f64e4 100644 --- a/geowebcache/pom.xml +++ b/geowebcache/pom.xml @@ -885,7 +885,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.0.0 + 4.7.3.4 @@ -894,12 +894,12 @@ + false More true 15 ${geowebcacheBaseDir}/spotbugs-exclude.xml - -XX:+TieredCompilation -XX:TieredStopAtLevel=1