From 0dcdcc7bafcc7c4a9cdcb66edb0407103983098c Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 6 Dec 2018 09:09:06 +1000 Subject: [PATCH 1/2] Jetty 10.0.x fix surefire arg line (to avoid locale dependent build) (#3183) * surefire.argLine replaced by jetty.surefire.argLine Signed-off-by: olivier lamy --- jetty-alpn/jetty-alpn-java-server/pom.xml | 2 +- jetty-annotations/pom.xml | 2 +- jetty-client/pom.xml | 2 +- jetty-deploy/pom.xml | 2 +- jetty-http/pom.xml | 5 ++++- jetty-http2/http2-client/pom.xml | 2 +- jetty-http2/http2-http-client-transport/pom.xml | 2 +- jetty-http2/http2-server/pom.xml | 2 +- jetty-jmx/pom.xml | 2 +- jetty-quickstart/pom.xml | 2 +- jetty-servlets/pom.xml | 2 +- jetty-util/pom.xml | 5 ++++- jetty-webapp/pom.xml | 2 +- jetty-websocket/javax-websocket-server/pom.xml | 2 +- pom.xml | 6 +++++- 15 files changed, 25 insertions(+), 15 deletions(-) diff --git a/jetty-alpn/jetty-alpn-java-server/pom.xml b/jetty-alpn/jetty-alpn-java-server/pom.xml index a30e98470d6..617e180865b 100644 --- a/jetty-alpn/jetty-alpn-java-server/pom.xml +++ b/jetty-alpn/jetty-alpn-java-server/pom.xml @@ -22,7 +22,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.alpn.java.server=org.eclipse.jetty.server diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml index 9e79d3c21c8..e170e5caf11 100644 --- a/jetty-annotations/pom.xml +++ b/jetty-annotations/pom.xml @@ -21,7 +21,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-opens org.eclipse.jetty.annotations/org.eclipse.jetty.annotations.resources=org.eclipse.jetty.plus diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml index 0fc0d39090a..72380ef0522 100644 --- a/jetty-client/pom.xml +++ b/jetty-client/pom.xml @@ -19,7 +19,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.client=javax.servlet.api --add-modules java.security.jgss --add-modules javax.servlet.api diff --git a/jetty-deploy/pom.xml b/jetty-deploy/pom.xml index 3b09c59186a..ef6e71f0326 100644 --- a/jetty-deploy/pom.xml +++ b/jetty-deploy/pom.xml @@ -21,7 +21,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-modules org.eclipse.jetty.jmx --add-reads org.eclipse.jetty.deploy=org.eclipse.jetty.http diff --git a/jetty-http/pom.xml b/jetty-http/pom.xml index d18cafe4a8f..d0e010ab5ae 100644 --- a/jetty-http/pom.xml +++ b/jetty-http/pom.xml @@ -44,7 +44,10 @@ maven-surefire-plugin - @{argLine} --add-modules javax.servlet.api + + @{argLine} ${jetty.surefire.argLine} + --add-modules javax.servlet.api + diff --git a/jetty-http2/http2-client/pom.xml b/jetty-http2/http2-client/pom.xml index 733ae5a100d..ec7d55f9743 100644 --- a/jetty-http2/http2-client/pom.xml +++ b/jetty-http2/http2-client/pom.xml @@ -21,7 +21,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.http2.client=javax.servlet.api --add-modules javax.servlet.api diff --git a/jetty-http2/http2-http-client-transport/pom.xml b/jetty-http2/http2-http-client-transport/pom.xml index c0eff88e3be..ac35543260d 100644 --- a/jetty-http2/http2-http-client-transport/pom.xml +++ b/jetty-http2/http2-http-client-transport/pom.xml @@ -21,7 +21,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.http2.http.client.transport=javax.servlet.api --add-modules javax.servlet.api diff --git a/jetty-http2/http2-server/pom.xml b/jetty-http2/http2-server/pom.xml index 98cccc40019..821fdb6daec 100644 --- a/jetty-http2/http2-server/pom.xml +++ b/jetty-http2/http2-server/pom.xml @@ -21,7 +21,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.http2.server=javax.servlet.api --add-modules javax.servlet.api diff --git a/jetty-jmx/pom.xml b/jetty-jmx/pom.xml index 8d156e885e0..ff96655eaae 100644 --- a/jetty-jmx/pom.xml +++ b/jetty-jmx/pom.xml @@ -18,7 +18,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-opens org.eclipse.jetty.jmx/org.eclipse.jetty.jmx=ALL-UNNAMED --add-opens org.eclipse.jetty.jmx/org.eclipse.jetty.util.log.jmx=ALL-UNNAMED diff --git a/jetty-quickstart/pom.xml b/jetty-quickstart/pom.xml index 7c1aa1979ca..443a668b16c 100644 --- a/jetty-quickstart/pom.xml +++ b/jetty-quickstart/pom.xml @@ -22,7 +22,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --patch-module javax.servlet.api=${jetty-schemas-jar} diff --git a/jetty-servlets/pom.xml b/jetty-servlets/pom.xml index d45b9b35d1d..893eb7ded0c 100644 --- a/jetty-servlets/pom.xml +++ b/jetty-servlets/pom.xml @@ -23,7 +23,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-modules javax.servlet.api --add-modules org.eclipse.jetty.util --add-modules org.eclipse.jetty.io diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index 1f0e5bbaebb..d9990ae1306 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -64,7 +64,10 @@ ${settings.localRepository} - @{argLine} --add-modules javax.servlet.api,org.slf4j + + @{argLine} ${jetty.surefire.argLine} + --add-modules javax.servlet.api,org.slf4j + diff --git a/jetty-webapp/pom.xml b/jetty-webapp/pom.xml index 2b020436b91..157d747ccf7 100644 --- a/jetty-webapp/pom.xml +++ b/jetty-webapp/pom.xml @@ -44,7 +44,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-modules org.eclipse.jetty.jmx false diff --git a/jetty-websocket/javax-websocket-server/pom.xml b/jetty-websocket/javax-websocket-server/pom.xml index 181d5efa747..db097880741 100644 --- a/jetty-websocket/javax-websocket-server/pom.xml +++ b/jetty-websocket/javax-websocket-server/pom.xml @@ -49,7 +49,7 @@ maven-surefire-plugin - @{argLine} + @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.websocket.javax.common=org.eclipse.jetty.websocket.javax.server diff --git a/pom.xml b/pom.xml index b398cc6c88f..ed9b82b1fe7 100644 --- a/pom.xml +++ b/pom.xml @@ -67,6 +67,8 @@ false + -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -showversion -Xmx1g -Xms1g -Xlog:gc:stderr:time,level,tags + 2.22.1 3.8.0 @@ -590,7 +592,9 @@ ${maven.surefire.version} 3600 - @{argLine} -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -showversion -Xmx1g -Xms1g -XX:+PrintGCDetails + + @{argLine} ${jetty.surefire.argLine} + false 1 true From e7be37688286de892e1c0b52fe17ae111168c3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B8rn=20Martinsen?= Date: Thu, 6 Dec 2018 08:59:08 +0100 Subject: [PATCH 2/2] Update DoSFilter.java (#3191) Add missing word and remove extra space in comments --- .../src/main/java/org/eclipse/jetty/servlets/DoSFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java index de827433e46..8fb7fab549d 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java @@ -316,10 +316,10 @@ public class DoSFilter implements Filter // Get a rate tracker associated with this request, and record one hit. tracker = getRateTracker(request); - // Calculate the rate and check it is over the allowed limit + // Calculate the rate and check if it is over the allowed limit final boolean overRateLimit = tracker.isRateExceeded(System.currentTimeMillis()); - // Pass it through if we are not currently over the rate limit. + // Pass it through if we are not currently over the rate limit. if (!overRateLimit) { if (LOG.isDebugEnabled())