[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916

--- Comment #36 from Mark Thomas  ---
That is the right code.

Testing locally on Linux:

java -showversion org.apache.tomcat.Bug63916NioPoller
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)
Selector provider: sun.nio.ch.EPollSelectorProvider@4cd646ad
Default send buffer size is [1313280]
Writing 10MB took [259] milliseconds

And with specific buffer sizes

16k379ms
8k 402ms
4k  56,091ms


On MacOS
s2laptop:classes mthomas$ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)

s2laptop:classes mthomas$ java org.apache.tomcat.Bug63916NioPoller
Selector provider: sun.nio.ch.KQueueSelectorProvider@227974ab
Default send buffer size is [146988]
Writing 10MB took [364] milliseconds

And with specific buffer sizes

16k332ms
8k 309ms
4k 319ms
2k 356ms
1k  20,041ms

Both Oracle Java 7 and OpenJDK 13 give more reasonable results of around 440
ms.

There looks to be an issue with the JVM. Given how bad these figures are I
agree with Michael's suggestion to add something to the docs. I'll also open a
JRE bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[VOTE][CANCELLED] Release Apache Tomcat 9.0.28

2019-11-14 Thread Mark Thomas
On 14/11/2019 11:05, Mark Thomas wrote:
> On 14/11/2019 10:27, Mark Thomas wrote:
> 
> 
> 
>> The proposed 9.0.28 release is:
>> [ ] Broken - do not release
>> [ ] Stable - go ahead and release as 9.0.28
> 
> It isn't broken but I spotted a missing release date in the changelog
> for 9.0.27. It is trivial but the changelog is one of the files that is
> widely read. I don't want the "release in progress" text to confuse people.
> 
> I'm leaning towards re-rolling the release since it isn't that much work.

What with this and the socket.txBufSize weirdness, I am going to re-roll
the release.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in on tomcat-85-trunk

2019-11-14 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-85-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-85-trunk/builds/2028

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' 
triggered this build
Build Source Stamp: [branch 8.5.x] a91d7db4047d372b2f12999d3cf2bc3254c20d00
Blamelist: remm 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat 9.0.28

2019-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 11/14/19 06:05, Mark Thomas wrote:
> On 14/11/2019 10:27, Mark Thomas wrote:
> 
> 
> 
>> The proposed 9.0.28 release is: [ ] Broken - do not release [ ]
>> Stable - go ahead and release as 9.0.28
> 
> It isn't broken but I spotted a missing release date in the
> changelog for 9.0.27. It is trivial but the changelog is one of the
> files that is widely read. I don't want the "release in progress"
> text to confuse people.
> 
> I'm leaning towards re-rolling the release since it isn't that much
> work.

+1

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3NaV0ACgkQHPApP6U8
pFhnBw//dKC0NHaG76pg/RVenwwgbnf3WxsQ135U6Z1WOpLpUUIxlqUpbgYPkC6x
LNUZxxKCIVkat4upLyqJ9qZSY4M+3k9mZwodC+2EolktcMRbBM+8eKFTBG088KtC
abodZD3Ur27tsVe47h97qj6JRbPEoXRd/JqEtzNvW+wCblasetQthHri/ueoz8Fo
UBOhPRBLYU/rNas2IGNV5R9pc3LTD2yKsr7UHYz/NUTDL+aWCvuQdVMJM81O152+
Nk3s9GpFIwGsQFkuIUU1fFL1o8PsnOmkubpvM684j986fyn8v6bvQsMRI84ZKReV
Ozk6K3KOATlKbIltVwKr/6RjWXgjuoSiDrzntKEBiNxoKPU81JFwzAQsi0U/9SE6
feOUztD7Z5ZmLPDgQjTiUZI7dHfamFz5rH5owHvqo1Wpgu8ViTbmqXLDJVvXK6NQ
hFf1Cd4YtGR1x1dis9jxjjFeS7P7wAElJXZdQE34XcYArksZXYzCJwzEV+nGqu+G
i7T0gcGHoKrAw+uR4MJEX+WUFfwsknEM4YdjAaGSfoLEh9bDrWENEikkAQ6cubfp
LfmxnNlNAkWnRsRq+bCuLGRle462PcHxD4xmitcUoxuN0b8lqY5dg0vwM1rWbdBD
jdxiaS4dANEpb8Kda660mNFnHUOVLiWX6vygUXCe5srZgZroFLw=
=EjfN
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Remove failonwarning due to internal API use causing a javadoc warning

2019-11-14 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 1786045  Remove failonwarning due to internal API use causing a 
javadoc warning
1786045 is described below

commit 178604517c4d03217bbd5cd0d20d6cf01c8d469f
Author: remm 
AuthorDate: Thu Nov 14 15:47:00 2019 +0100

Remove failonwarning due to internal API use causing a javadoc warning

Not sure what it doesn't warn with javadoc 8 though.
---
 build.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/build.xml b/build.xml
index ffe78f3..f548f23 100644
--- a/build.xml
+++ b/build.xml
@@ -2006,8 +2006,7 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   additionalparam="-breakiterator -notimestamp ${java9.javadoc.options} 
-J-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2"
   source="${compile.source}"
   maxmemory="512m"
-  failonerror="true"
-  failonwarning="true">
+  failonerror="true">
   
 
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Add warning re small socket.txBufSize values.

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 1c55215  Add warning re small socket.txBufSize values.
1c55215 is described below

commit 1c5521537036313fc658945a27641b280fa8a4ae
Author: Mark Thomas 
AuthorDate: Thu Nov 14 14:09:18 2019 +

Add warning re small socket.txBufSize values.
---
 webapps/docs/changelog.xml   | 9 +
 webapps/docs/config/ajp.xml  | 4 +++-
 webapps/docs/config/http.xml | 4 +++-
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9bbff4c..3b333b5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -52,6 +52,15 @@
   
 
   
+  
+
+  
+Add a warning regarding potential poor performance of the HTTP and AJP
+connectors if socket.txBufSize is configured with an
+explicit value rather than using the JVM default. (markt)
+  
+
+  
 
 
   
diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml
index 70fbfb6..45f4d03 100644
--- a/webapps/docs/config/ajp.xml
+++ b/webapps/docs/config/ajp.xml
@@ -505,7 +505,9 @@
   
   
 (int)The socket send buffer (SO_SNDBUF) size in bytes. JVM default
-used if not set.
+used if not set. Care should be taken if explicitly setting this value.
+Very poor performance has been observed on some JVMs with values less
+than ~8k.
   
   
 (bool)This is equivalent to standard attribute
diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml
index 2c5daa1..6949d36 100644
--- a/webapps/docs/config/http.xml
+++ b/webapps/docs/config/http.xml
@@ -662,7 +662,9 @@
   
   
 (int)The socket send buffer (SO_SNDBUF) size in bytes. JVM default
-used if not set.
+used if not set. Care should be taken if explicitly setting this value.
+Very poor performance has been observed on some JVMs with values less
+than ~8k.
   
   
 (bool)This is equivalent to standard attribute


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916

--- Comment #37 from Mark Thomas  ---
https://bugs.openjdk.java.net/browse/JDK-8234191

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Fix IDE warnings. Get build working with Java 8 through 14

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 35abad9  Fix IDE warnings. Get build working with Java 8 through 14
35abad9 is described below

commit 35abad971594d467fbe3b85ae8c61575d2bd2eb6
Author: Mark Thomas 
AuthorDate: Thu Nov 14 19:26:00 2019 +

Fix IDE warnings. Get build working with Java 8 through 14

"-XDignore.symbol.file" is a hack but it is the only solution I found
that worked cleanly with all Java versions.
---
 build.xml|  7 +--
 .../apache/catalina/mbeans/JmxRemoteLifecycleListener.java   | 12 +++-
 res/findbugs/filter-false-positives.xml  |  6 ++
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/build.xml b/build.xml
index 0499113..014e848 100644
--- a/build.xml
+++ b/build.xml
@@ -93,7 +93,6 @@
   
   
   
-  
   
 
   
@@ -641,7 +640,6 @@
deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
-   release="${compile.release}"
encoding="ISO-8859-1"
includeAntRuntime="true" >
   
+  
   
 
 
@@ -1216,7 +1214,6 @@
  debug="${compile.debug}" deprecation="${compile.deprecation}"
  source="${compile.source}"
  target="${compile.target}"
- release="${compile.release}"
  classpath="${tomcat.classes}"
  encoding="ISO-8859-1"
  includeantruntime="false">
@@ -1228,7 +1225,6 @@
  debug="${compile.debug}" deprecation="${compile.deprecation}"
  source="${compile.source}"
  target="${compile.target}"
- release="${compile.release}"
  classpath="${tomcat.classes}"
  encoding="ISO-8859-1"
  includeantruntime="false">
@@ -1465,7 +1461,6 @@
deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
-   release="${compile.release}"
encoding="ISO-8859-1"
includeantruntime="true">
   
diff --git a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java 
b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
index 77a785d..d01ed8e 100644
--- a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
+++ b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
@@ -441,7 +441,13 @@ public class JmxRemoteLifecycleListener extends 
SSLHostConfig implements Lifecyc
 Remote jmxServer = server.toStub();
 // Create the RMI registry
 try {
-new JmxRegistry(theRmiRegistryPort, registryCsf, registrySsf, 
"jmxrmi", jmxServer);
+/*
+ * JmxRegistry is registered as a side-effect of creation.
+ * This object is here so we can tell the IDE it is OK for it
+ * not to be used.
+ */
+@SuppressWarnings("unused")
+JmxRegistry unused = new JmxRegistry(theRmiRegistryPort, 
registryCsf, registrySsf, "jmxrmi", jmxServer);
 } catch (RemoteException e) {
 log.error(sm.getString(
 "jmxRemoteLifecycleListener.createRegistryFailed",
@@ -589,6 +595,10 @@ public class JmxRemoteLifecycleListener extends 
SSLHostConfig implements Lifecyc
 }
 
 
+/*
+ * Better to use the internal API than re-invent the wheel.
+ */
+@SuppressWarnings("restriction")
 private static class JmxRegistry extends sun.rmi.registry.RegistryImpl {
 private static final long serialVersionUID = -3772054804656428217L;
 private final String jmxName;
diff --git a/res/findbugs/filter-false-positives.xml 
b/res/findbugs/filter-false-positives.xml
index 7fcc6bd..2c8d18b 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -344,6 +344,12 @@
 
   
   
+
+
+
+
+  
+  
 
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 7.0.x updated (bef3f40 -> 873ac1c)

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from bef3f40  Refactor JMX remote RMI registry creation
 new dbfcadd  Fix IDE warnings. Get build working with Java 6 through 14
 new b509006  Use -XDignore.symbol.file to avoid the proprietary API warning
 new 873ac1c  Drop warning until we get these all sorted out for Tomcat 7

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.xml|  6 +++---
 .../apache/catalina/mbeans/JmxRemoteLifecycleListener.java   | 12 +++-
 res/findbugs/filter-false-positives.xml  |  6 ++
 3 files changed, 20 insertions(+), 4 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 03/03: Drop warning until we get these all sorted out for Tomcat 7

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 873ac1c8a9ba434f0b37eb58595cbb5f327f5542
Author: Mark Thomas 
AuthorDate: Thu Nov 14 20:05:28 2019 +

Drop warning until we get these all sorted out for Tomcat 7
---
 build.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/build.xml b/build.xml
index 72566fc..391ba00 100644
--- a/build.xml
+++ b/build.xml
@@ -2059,8 +2059,7 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
   source="${compile.source}"
   maxmemory="512m"
-  failonerror="true"
-  failonwarning="true">
+  failonerror="true">
   
 
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 01/03: Fix IDE warnings. Get build working with Java 6 through 14

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit dbfcadd65ed4057f00fca26f7d9693ce65a4af5e
Author: Mark Thomas 
AuthorDate: Thu Nov 14 19:26:00 2019 +

Fix IDE warnings. Get build working with Java 6 through 14

"-XDignore.symbol.file" is a hack but it is the only solution I found
that worked cleanly with all Java versions.
---
 build.xml|  1 +
 .../apache/catalina/mbeans/JmxRemoteLifecycleListener.java   | 12 +++-
 res/findbugs/filter-false-positives.xml  |  6 ++
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index 4b49a52..39929c5 100644
--- a/build.xml
+++ b/build.xml
@@ -691,6 +691,7 @@
encoding="ISO-8859-1"
includeAntRuntime="true" >
   
+  
   
   
   
diff --git a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java 
b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
index 7d700a3..c81c4a9 100644
--- a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
+++ b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
@@ -324,7 +324,13 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 Remote jmxServer = server.toStub();
 // Create the RMI registry
 try {
-new JmxRegistry(theRmiRegistryPort, registryCsf, registrySsf, 
"jmxrmi", jmxServer);
+/*
+ * JmxRegistry is registered as a side-effect of creation.
+ * This object is here so we can tell the IDE it is OK for it
+ * not to be used.
+ */
+@SuppressWarnings("unused")
+JmxRegistry unused = new JmxRegistry(theRmiRegistryPort, 
registryCsf, registrySsf, "jmxrmi", jmxServer);
 } catch (RemoteException e) {
 log.error(sm.getString(
 "jmxRemoteLifecycleListener.createRegistryFailed",
@@ -492,6 +498,10 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 }
 
 
+/*
+ * Better to use the internal API than re-invent the wheel.
+ */
+@SuppressWarnings("restriction")
 private static class JmxRegistry extends sun.rmi.registry.RegistryImpl {
 private static final long serialVersionUID = -3772054804656428217L;
 private final String jmxName;
diff --git a/res/findbugs/filter-false-positives.xml 
b/res/findbugs/filter-false-positives.xml
index f4341ed..50bca30 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -203,6 +203,12 @@
 
   
   
+
+
+
+
+  
+  
 
 
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 02/03: Use -XDignore.symbol.file to avoid the proprietary API warning

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit b50900618d533aec2307ab1139ae74ef617bf747
Author: Mark Thomas 
AuthorDate: Thu Nov 14 19:52:32 2019 +

Use -XDignore.symbol.file to avoid the proprietary API warning
---
 build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index 39929c5..72566fc 100644
--- a/build.xml
+++ b/build.xml
@@ -2165,7 +2165,7 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   encoding="ISO-8859-1"
   docencoding="ISO-8859-1"
   charset="ISO-8859-1"
-  additionalparam="-breakiterator -notimestamp ${java9.javadoc.options} 
-J-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2"
+  additionalparam="-breakiterator -notimestamp ${java9.javadoc.options} 
-J-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 -XDignore.symbol.file"
   source="${compile.source}"
   maxmemory="512m"
   failonerror="true"


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 02/02: Use -XDignore.symbol.file to avoid the proprietary API warning

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 876fe185db34994acf8956fcc7960fc981c3131f
Author: Mark Thomas 
AuthorDate: Thu Nov 14 19:52:32 2019 +

Use -XDignore.symbol.file to avoid the proprietary API warning
---
 build.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/build.xml b/build.xml
index 2ec230b..ab3c012 100644
--- a/build.xml
+++ b/build.xml
@@ -1998,10 +1998,11 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   encoding="UTF-8"
   docencoding="UTF-8"
   charset="UTF-8"
-  additionalparam="-breakiterator -notimestamp ${java9.javadoc.options} 
-J-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2"
+  additionalparam="-breakiterator -notimestamp ${java9.javadoc.options} 
-J-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 -XDignore.symbol.file"
   source="${compile.source}"
   maxmemory="512m"
-  failonerror="true">
+  failonerror="true"
+  failonwarning="true">
   
 
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 01/02: Fix IDE warnings. Get build working with Java 8 through 14

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 49de92f384a05fc9b58857ce311e0e99705bf6e6
Author: Mark Thomas 
AuthorDate: Thu Nov 14 19:26:00 2019 +

Fix IDE warnings. Get build working with Java 8 through 14

"-XDignore.symbol.file" is a hack but it is the only solution I found
that worked cleanly with all Java versions.
---
 build.xml|  7 +--
 .../apache/catalina/mbeans/JmxRemoteLifecycleListener.java   | 12 +++-
 res/findbugs/filter-false-positives.xml  |  6 ++
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/build.xml b/build.xml
index f548f23..2ec230b 100644
--- a/build.xml
+++ b/build.xml
@@ -87,7 +87,6 @@
   
   
   
-  
   
 
   
@@ -638,7 +637,6 @@
deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
-   release="${compile.release}"
encoding="ISO-8859-1"
includeAntRuntime="true" >
   
+  
   
   
 
@@ -1162,7 +1160,6 @@
  debug="${compile.debug}" deprecation="${compile.deprecation}"
  source="${compile.source}"
  target="${compile.target}"
- release="${compile.release}"
  classpath="${tomcat.classes}"
  encoding="ISO-8859-1"
  includeantruntime="false">
@@ -1174,7 +1171,6 @@
  debug="${compile.debug}" deprecation="${compile.deprecation}"
  source="${compile.source}"
  target="${compile.target}"
- release="${compile.release}"
  classpath="${tomcat.classes}"
  encoding="ISO-8859-1"
  includeantruntime="false">
@@ -1407,7 +1403,6 @@
deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
-   release="${compile.release}"
encoding="ISO-8859-1"
includeantruntime="true">
   
diff --git a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java 
b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
index a4095aa..9bae7fd 100644
--- a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
+++ b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
@@ -324,7 +324,13 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 Remote jmxServer = server.toStub();
 // Create the RMI registry
 try {
-new JmxRegistry(theRmiRegistryPort, registryCsf, registrySsf, 
"jmxrmi", jmxServer);
+/*
+ * JmxRegistry is registered as a side-effect of creation.
+ * This object is here so we can tell the IDE it is OK for it
+ * not to be used.
+ */
+@SuppressWarnings("unused")
+JmxRegistry unused = new JmxRegistry(theRmiRegistryPort, 
registryCsf, registrySsf, "jmxrmi", jmxServer);
 } catch (RemoteException e) {
 log.error(sm.getString(
 "jmxRemoteLifecycleListener.createRegistryFailed",
@@ -492,6 +498,10 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 }
 
 
+/*
+ * Better to use the internal API than re-invent the wheel.
+ */
+@SuppressWarnings("restriction")
 private static class JmxRegistry extends sun.rmi.registry.RegistryImpl {
 private static final long serialVersionUID = -3772054804656428217L;
 private final String jmxName;
diff --git a/res/findbugs/filter-false-positives.xml 
b/res/findbugs/filter-false-positives.xml
index a4596d0..dff3613 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -332,6 +332,12 @@
 
   
   
+
+
+
+
+  
+  
 
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated (1786045 -> 876fe18)

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 1786045  Remove failonwarning due to internal API use causing a 
javadoc warning
 new 49de92f  Fix IDE warnings. Get build working with Java 8 through 14
 new 876fe18  Use -XDignore.symbol.file to avoid the proprietary API warning

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.xml| 12 
 .../apache/catalina/mbeans/JmxRemoteLifecycleListener.java   | 12 +++-
 res/findbugs/filter-false-positives.xml  |  6 ++
 3 files changed, 21 insertions(+), 9 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [tomcat] branch 8.5.x updated: Remove failonwarning due to internal API use causing a javadoc warning

2019-11-14 Thread Mark Thomas
On 14/11/2019 14:47, r...@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> remm pushed a commit to branch 8.5.x
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
> 
> The following commit(s) were added to refs/heads/8.5.x by this push:
>  new 1786045  Remove failonwarning due to internal API use causing a 
> javadoc warning
> 1786045 is described below
> 
> commit 178604517c4d03217bbd5cd0d20d6cf01c8d469f
> Author: remm 
> AuthorDate: Thu Nov 14 15:47:00 2019 +0100
> 
> Remove failonwarning due to internal API use causing a javadoc warning
> 
> Not sure what it doesn't warn with javadoc 8 though.

Indeed. That is strange.

I'd rather keep the warnings. I think I have found a hack that will get
this working...

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Polish. Align with 8.5.x/7/0/x

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 95e9261  Polish. Align with 8.5.x/7/0/x
95e9261 is described below

commit 95e926159f4d85da1064ca0c936937b10364d114
Author: Mark Thomas 
AuthorDate: Thu Nov 14 21:07:42 2019 +

Polish. Align with 8.5.x/7/0/x
---
 java/org/apache/tomcat/util/modeler/Registry.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/modeler/Registry.java 
b/java/org/apache/tomcat/util/modeler/Registry.java
index fbf44e7..89abd43 100644
--- a/java/org/apache/tomcat/util/modeler/Registry.java
+++ b/java/org/apache/tomcat/util/modeler/Registry.java
@@ -233,8 +233,8 @@ public class Registry implements RegistryMBean, 
MBeanRegistration {
  * lifecycle operations.
  *
  * @param mbeans list of ObjectName on which we'll invoke the operations
- * @param operation Name of the operation ( init, start, stop, etc)
- * @param failFirst If false, exceptions will be ignored
+ * @param operation  Name of the operation ( init, start, stop, etc)
+ * @param failFirst  If false, exceptions will be ignored
  * @throws Exception Error invoking operation
  * @since 1.1
  */


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix SpotBugs warnings. Align with 9.0.x/7.0.x.

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 443f5ee  Fix SpotBugs warnings. Align with 9.0.x/7.0.x.
443f5ee is described below

commit 443f5ee0fd00e1412b69a7c8628055794d512b9f
Author: Mark Thomas 
AuthorDate: Thu Nov 14 21:08:12 2019 +

Fix SpotBugs warnings. Align with 9.0.x/7.0.x.
---
 java/org/apache/tomcat/util/modeler/Registry.java | 476 ++
 1 file changed, 226 insertions(+), 250 deletions(-)

diff --git a/java/org/apache/tomcat/util/modeler/Registry.java 
b/java/org/apache/tomcat/util/modeler/Registry.java
index 0be0aff..f90d3ed 100644
--- a/java/org/apache/tomcat/util/modeler/Registry.java
+++ b/java/org/apache/tomcat/util/modeler/Registry.java
@@ -14,11 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.tomcat.util.modeler;
 
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
@@ -48,15 +45,15 @@ import org.apache.tomcat.util.modeler.modules.ModelerSource;
- double check the interfaces
- start removing the use of the experimental methods in tomcat, then remove
  the methods ( before 1.1 final )
-   - is the security enough to prevent Registry being used to avoid the 
permission
-checks in the mbean server ?
+   - is the security enough to prevent Registry being used to avoid the
+ permission checks in the mbean server ?
 */
 
 /**
  * Registry for modeler MBeans.
  *
- * This is the main entry point into modeler. It provides methods to create
- * and manipulate model mbeans and simplify their use.
+ * This is the main entry point into modeler. It provides methods to create and
+ * manipulate model mbeans and simplify their use.
  *
  * This class is itself an mbean.
  *
@@ -66,7 +63,8 @@ import org.apache.tomcat.util.modeler.modules.ModelerSource;
  * @author Craig R. McClanahan
  * @author Costin Manolache
  */
-public class Registry implements RegistryMBean, MBeanRegistration  {
+public class Registry implements RegistryMBean, MBeanRegistration {
+
 /**
  * The Log instance to which we will write our log messages.
  */
@@ -74,13 +72,9 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
 
 // Support for the factory methods
 
-/** Will be used to isolate different apps and enhance security.
- */
-private static final HashMap perLoaderRegistries = null;
-
 /**
- * The registry instance created by our factory method the first time
- * it is called.
+ * The registry instance created by our factory method the first time it is
+ * called.
  */
 private static Registry registry = null;
 
@@ -90,11 +84,12 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
  * The MBeanServer instance that we will use to register
  * management beans.
  */
-private MBeanServer server = null;
+private volatile MBeanServer server = null;
+private final Object serverLock = new Object();
 
 /**
- * The set of ManagedBean instances for the beans this registry
- * knows about, keyed by name.
+ * The set of ManagedBean instances for the beans this registry knows 
about,
+ * keyed by name.
  */
 private HashMap descriptors = new HashMap<>();
 
@@ -116,8 +111,6 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
 
 // --- Constructors
 
-/**
- */
  public Registry() {
 super();
 }
@@ -129,50 +122,22 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
  * Factory method to create (if necessary) and return our
  * Registry instance.
  *
- * The current version uses a static - future versions could use
- * the thread class loader.
- *
- * @param key Support for application isolation. If null, the context class
- * loader will be used ( if setUseContextClassLoader is called ) or the
- * default registry is returned.
+ * @param key Unused
  * @param guard Prevent access to the registry by untrusted components
+ *
  * @return the registry
  * @since 1.1
  */
 public static synchronized Registry getRegistry(Object key, Object guard) {
-Registry localRegistry;
-if( perLoaderRegistries!=null ) {
-if( key==null )
-key=Thread.currentThread().getContextClassLoader();
-if( key != null ) {
-localRegistry = perLoaderRegistries.get(key);
-if( localRegistry == null ) {
-localRegistry=new Registry();
-//localRegistry.key=key;
-localRegistry.guard=guard;
-

[tomcat] branch 7.0.x updated: Align with 8.5.x/9.0.x

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
 new f9a5b0d  Align with 8.5.x/9.0.x
f9a5b0d is described below

commit f9a5b0d41a25fc3ac454634049c7d7350c4e92d4
Author: Mark Thomas 
AuthorDate: Thu Nov 14 21:09:13 2019 +

Align with 8.5.x/9.0.x
---
 java/org/apache/tomcat/util/modeler/Registry.java | 509 +++---
 1 file changed, 256 insertions(+), 253 deletions(-)

diff --git a/java/org/apache/tomcat/util/modeler/Registry.java 
b/java/org/apache/tomcat/util/modeler/Registry.java
index 829bc03..9b92a0c 100644
--- a/java/org/apache/tomcat/util/modeler/Registry.java
+++ b/java/org/apache/tomcat/util/modeler/Registry.java
@@ -14,11 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.tomcat.util.modeler;
 
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
@@ -50,19 +47,15 @@ import org.apache.tomcat.util.modeler.modules.ModelerSource;
- double check the interfaces
- start removing the use of the experimental methods in tomcat, then remove
  the methods ( before 1.1 final )
-   - is the security enough to prevent Registry being used to avoid the 
permission
-checks in the mbean server ?
+   - is the security enough to prevent Registry being used to avoid the
+ permission checks in the mbean server ?
 */
 
 /**
  * Registry for modeler MBeans.
  *
- * This is the main entry point into modeler. It provides methods to create
- * and manipulate model mbeans and simplify their use.
- *
- * Starting with version 1.1, this is no longer a singleton and the static
- * methods are strongly deprecated. In a container environment we can expect
- * different applications to use different registries.
+ * This is the main entry point into modeler. It provides methods to create and
+ * manipulate model mbeans and simplify their use.
  *
  * This class is itself an mbean.
  *
@@ -72,7 +65,8 @@ import org.apache.tomcat.util.modeler.modules.ModelerSource;
  * @author Craig R. McClanahan
  * @author Costin Manolache
  */
-public class Registry implements RegistryMBean, MBeanRegistration  {
+public class Registry implements RegistryMBean, MBeanRegistration {
+
 /**
  * The Log instance to which we will write our log messages.
  */
@@ -85,8 +79,8 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
 private static HashMap perLoaderRegistries = null;
 
 /**
- * The registry instance created by our factory method the first time
- * it is called.
+ * The registry instance created by our factory method the first time it is
+ * called.
  */
 private static Registry registry = null;
 
@@ -99,11 +93,11 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
 private MBeanServer server = null;
 
 /**
- * The set of ManagedBean instances for the beans this registry
- * knows about, keyed by name.
+ * The set of ManagedBean instances for the beans this registry knows 
about,
+ * keyed by name.
  */
 private HashMap descriptors =
-new HashMap();
+   new HashMap();
 
 /** List of managed beans, keyed by class name
  */
@@ -124,8 +118,6 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
 
 // --- Constructors
 
-/**
- */
  public Registry() {
 super();
 }
@@ -176,11 +168,10 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
 if (registry == null) {
 registry = new Registry();
 }
-if( registry.guard != null &&
-registry.guard != guard ) {
+if (registry.guard != null && registry.guard != guard) {
 return null;
 }
-return (registry);
+return registry;
 }
 
 /**
@@ -197,8 +188,6 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
 }
 }
 
-//  Generic methods  
-
 /** Lifecycle method - clean up the registry metadata.
  *  Called from resetMetadata().
  *
@@ -208,9 +197,10 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
 public void stop() {
 descriptorsByClass = new HashMap();
 descriptors = new HashMap();
-searchedPaths=new HashMap();
+searchedPaths = new HashMap();
 }
 
+
 /**
  * Load an extended mlet file. The source can be an URL, File or
  * InputStream.
@@ -256,8 +246,9 @@ public class Registry implements RegistryMBean, 
MBeanRegistration  {
  * "mbeans-descriptors.ser" or "mbeans-descriptors.xml" in the same package
  * or parent.
  *
- * If 

buildbot success in on tomcat-85-trunk

2019-11-14 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-85-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-85-trunk/builds/2030

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' 
triggered this build
Build Source Stamp: [branch 8.5.x] 876fe185db34994acf8956fcc7960fc981c3131f
Blamelist: Mark Thomas 

Build succeeded!

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [tomcat] branch master updated: Fix IDE warnings. Get build working with Java 8 through 14

2019-11-14 Thread Mark Thomas
On 14/11/2019 20:13, Rémy Maucherat wrote:
> On Thu, Nov 14, 2019 at 8:26 PM  > wrote:
> 
> +      
> 
> 
> The possible downside is that it's global so other unintended use won't
> be flagged. I had read this hidden feature was the only way too, they
> filtered out the annotation use for this.

The IDEs should pick it up. Eclipse does anyway.

None of this is perfect. It is rather a balancing act. I'll add talking
to the OpenJDK folks about a better interface for this to my TODO list.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [tomcat] branch master updated: Fix IDE warnings. Get build working with Java 8 through 14

2019-11-14 Thread Rémy Maucherat
On Thu, Nov 14, 2019 at 8:26 PM  wrote:

> +  
>

The possible downside is that it's global so other unintended use won't be
flagged. I had read this hidden feature was the only way too, they filtered
out the annotation use for this.

Rémy


[GitHub] [tomcat] habuzahra opened a new pull request #223: Log compression

2019-11-14 Thread GitBox
habuzahra opened a new pull request #223: Log compression
URL: https://github.com/apache/tomcat/pull/223
 
 
   This modification has been done based on the below bugzilla
   
   https://bz.apache.org/bugzilla/show_bug.cgi?id=62611
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] michael-o closed pull request #218: WIP: BZ 63835: Add support for Keep-Alive header

2019-11-14 Thread GitBox
michael-o closed pull request #218: WIP: BZ 63835: Add support for Keep-Alive 
header
URL: https://github.com/apache/tomcat/pull/218
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63835] Add support for Keep-Alive header

2019-11-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63835

Michael Osipov  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #7 from Michael Osipov  ---
Fixed in:
- master for 9.0.29 onwards
- 8.5.x for 8.5.48 onwards

I have opted not to port back to 7.0.x because a cherry-pick requires
significant merge effort. If explicitly requested this can be done later.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 01/02: Back-port SpotBugs fixes and/or clean-up

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 4160df2b15a9af62cf9bb91069a1adb7613cf4db
Author: Mark Thomas 
AuthorDate: Thu Nov 14 21:59:04 2019 +

Back-port SpotBugs fixes and/or clean-up
---
 .../apache/tomcat/util/net/NioBlockingSelector.java |  4 ++--
 java/org/apache/tomcat/util/threads/TaskQueue.java  | 21 ++---
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/NioBlockingSelector.java 
b/java/org/apache/tomcat/util/net/NioBlockingSelector.java
index 1c467e8..080e4cc 100644
--- a/java/org/apache/tomcat/util/net/NioBlockingSelector.java
+++ b/java/org/apache/tomcat/util/net/NioBlockingSelector.java
@@ -41,7 +41,7 @@ public class NioBlockingSelector {
 
 private static final Log log = 
LogFactory.getLog(NioBlockingSelector.class);
 
-private static int threadCounter = 0;
+private static AtomicInteger threadCounter = new AtomicInteger(0);
 
 private Queue keyReferenceQueue =
 new ConcurrentLinkedQueue();
@@ -58,7 +58,7 @@ public class NioBlockingSelector {
 poller = new BlockPoller();
 poller.selector = sharedSelector;
 poller.setDaemon(true);
-poller.setName("NioBlockingSelector.BlockPoller-"+(++threadCounter));
+
poller.setName("NioBlockingSelector.BlockPoller-"+(threadCounter.getAndIncrement()));
 poller.start();
 }
 
diff --git a/java/org/apache/tomcat/util/threads/TaskQueue.java 
b/java/org/apache/tomcat/util/threads/TaskQueue.java
index 0221295..600fe5b 100644
--- a/java/org/apache/tomcat/util/threads/TaskQueue.java
+++ b/java/org/apache/tomcat/util/threads/TaskQueue.java
@@ -22,21 +22,20 @@ import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.TimeUnit;
 
 /**
- * As task queue specifically designed to run with a thread pool executor.
- * The task queue is optimised to properly utilize threads within
- * a thread pool executor. If you use a normal queue, the executor will spawn 
threads
- * when there are idle threads and you wont be able to force items unto the 
queue itself
- * @author fhanik
- *
+ * As task queue specifically designed to run with a thread pool executor. The
+ * task queue is optimised to properly utilize threads within a thread pool
+ * executor. If you use a normal queue, the executor will spawn threads when
+ * there are idle threads and you wont be able to force items onto the queue
+ * itself.
  */
 public class TaskQueue extends LinkedBlockingQueue {
 
 private static final long serialVersionUID = 1L;
 
-private ThreadPoolExecutor parent = null;
+private transient volatile ThreadPoolExecutor parent = null;
 
-// no need to be volatile, the one times when we change and read it occur 
in
-// a single thread (the one that did stop a context and fired listeners)
+// No need to be volatile. This is written and read in a single thread
+// (when stopping a context and firing the  listeners)
 private Integer forcedRemainingCapacity = null;
 
 public TaskQueue() {
@@ -56,12 +55,12 @@ public class TaskQueue extends 
LinkedBlockingQueue {
 }
 
 public boolean force(Runnable o) {
-if ( parent.isShutdown() ) throw new 
RejectedExecutionException("Executor not running, can't force a command into 
the queue");
+if (parent == null || parent.isShutdown()) throw new 
RejectedExecutionException("Executor not running, can't force a command into 
the queue");
 return super.offer(o); //forces the item onto the queue, to be used if 
the task is rejected
 }
 
 public boolean force(Runnable o, long timeout, TimeUnit unit) throws 
InterruptedException {
-if ( parent.isShutdown() ) throw new 
RejectedExecutionException("Executor not running, can't force a command into 
the queue");
+if (parent == null || parent.isShutdown()) throw new 
RejectedExecutionException("Executor not running, can't force a command into 
the queue");
 return super.offer(o,timeout,unit); //forces the item onto the queue, 
to be used if the task is rejected
 }
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Polish. Align with 8.5.x/7.0.x

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new bed0e02  Polish. Align with 8.5.x/7.0.x
bed0e02 is described below

commit bed0e0297c863e39d29fc0a523013b8f0fd65bfa
Author: Mark Thomas 
AuthorDate: Thu Nov 14 21:58:10 2019 +

Polish. Align with 8.5.x/7.0.x
---
 java/org/apache/tomcat/util/threads/TaskQueue.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/threads/TaskQueue.java 
b/java/org/apache/tomcat/util/threads/TaskQueue.java
index 63274dc..87c93a9 100644
--- a/java/org/apache/tomcat/util/threads/TaskQueue.java
+++ b/java/org/apache/tomcat/util/threads/TaskQueue.java
@@ -59,12 +59,12 @@ public class TaskQueue extends 
LinkedBlockingQueue {
 }
 
 public boolean force(Runnable o) {
-if ( parent==null || parent.isShutdown() ) throw new 
RejectedExecutionException(sm.getString("taskQueue.notRunning"));
+if (parent == null || parent.isShutdown()) throw new 
RejectedExecutionException(sm.getString("taskQueue.notRunning"));
 return super.offer(o); //forces the item onto the queue, to be used if 
the task is rejected
 }
 
 public boolean force(Runnable o, long timeout, TimeUnit unit) throws 
InterruptedException {
-if ( parent==null || parent.isShutdown() ) throw new 
RejectedExecutionException(sm.getString("taskQueue.notRunning"));
+if (parent == null || parent.isShutdown()) throw new 
RejectedExecutionException(sm.getString("taskQueue.notRunning"));
 return super.offer(o,timeout,unit); //forces the item onto the queue, 
to be used if the task is rejected
 }
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix remaining SpotBugs warnings in main code tree

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 065f64c  Fix remaining SpotBugs warnings in main code tree
065f64c is described below

commit 065f64c7ee3762b5df191ababc72c3d50e523ab3
Author: Mark Thomas 
AuthorDate: Thu Nov 14 21:58:43 2019 +

Fix remaining SpotBugs warnings in main code tree
---
 .../tomcat/util/net/NioBlockingSelector.java   |  4 +-
 java/org/apache/tomcat/util/threads/TaskQueue.java |  6 +-
 res/findbugs/filter-false-positives.xml| 83 ++
 3 files changed, 88 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/NioBlockingSelector.java 
b/java/org/apache/tomcat/util/net/NioBlockingSelector.java
index fe193bc..286c06f 100644
--- a/java/org/apache/tomcat/util/net/NioBlockingSelector.java
+++ b/java/org/apache/tomcat/util/net/NioBlockingSelector.java
@@ -41,7 +41,7 @@ public class NioBlockingSelector {
 
 private static final Log log = 
LogFactory.getLog(NioBlockingSelector.class);
 
-private static int threadCounter = 0;
+private static AtomicInteger threadCounter = new AtomicInteger(0);
 
 private final SynchronizedStack keyReferenceStack =
 new SynchronizedStack<>();
@@ -58,7 +58,7 @@ public class NioBlockingSelector {
 poller = new BlockPoller();
 poller.selector = sharedSelector;
 poller.setDaemon(true);
-poller.setName("NioBlockingSelector.BlockPoller-"+(++threadCounter));
+
poller.setName("NioBlockingSelector.BlockPoller-"+(threadCounter.getAndIncrement()));
 poller.start();
 }
 
diff --git a/java/org/apache/tomcat/util/threads/TaskQueue.java 
b/java/org/apache/tomcat/util/threads/TaskQueue.java
index 03e738c..600fe5b 100644
--- a/java/org/apache/tomcat/util/threads/TaskQueue.java
+++ b/java/org/apache/tomcat/util/threads/TaskQueue.java
@@ -32,7 +32,7 @@ public class TaskQueue extends LinkedBlockingQueue {
 
 private static final long serialVersionUID = 1L;
 
-private volatile ThreadPoolExecutor parent = null;
+private transient volatile ThreadPoolExecutor parent = null;
 
 // No need to be volatile. This is written and read in a single thread
 // (when stopping a context and firing the  listeners)
@@ -55,12 +55,12 @@ public class TaskQueue extends 
LinkedBlockingQueue {
 }
 
 public boolean force(Runnable o) {
-if ( parent==null || parent.isShutdown() ) throw new 
RejectedExecutionException("Executor not running, can't force a command into 
the queue");
+if (parent == null || parent.isShutdown()) throw new 
RejectedExecutionException("Executor not running, can't force a command into 
the queue");
 return super.offer(o); //forces the item onto the queue, to be used if 
the task is rejected
 }
 
 public boolean force(Runnable o, long timeout, TimeUnit unit) throws 
InterruptedException {
-if ( parent==null || parent.isShutdown() ) throw new 
RejectedExecutionException("Executor not running, can't force a command into 
the queue");
+if (parent == null || parent.isShutdown()) throw new 
RejectedExecutionException("Executor not running, can't force a command into 
the queue");
 return super.offer(o,timeout,unit); //forces the item onto the queue, 
to be used if the task is rejected
 }
 
diff --git a/res/findbugs/filter-false-positives.xml 
b/res/findbugs/filter-false-positives.xml
index dff3613..4578e0b 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -1147,6 +1147,11 @@
 
   
   
+
+
+
+  
+  
 
 
 
@@ -1312,6 +1317,25 @@
 
   
   
+
+
+
+  
+  
+  
+
+
+  
+  
+
+
+  
+  
+
+
+
+  
+  
 
 
 
@@ -1322,6 +1346,21 @@
 
   
   
+
+
+
+  
+  
+
+
+  
+  
+
+
+
+
+  
+  
 
 
 
@@ -1365,6 +1404,24 @@
 
   
   
+
+
+
+  
+  
+
+
+  
+  
+
+
+
+  
+  
+
+
+  
+  
 
 
 
@@ -1382,6 +1439,26 @@
 
   
   
+
+
+
+
+  
+  
+
+
+
+  
+  
+
+
+  
+  
+
+
+
+  
+  
 
 
 
@@ -1398,6 +1475,12 @@
 
 
   
+  
+
+
+
+
+  
 
   
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 7.0.x updated (f9a5b0d -> 55944c2)

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from f9a5b0d  Align with 8.5.x/9.0.x
 new 4160df2  Back-port SpotBugs fixes and/or clean-up
 new 55944c2  Clean-up

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/tomcat/util/net/NioBlockingSelector.java |  4 ++--
 java/org/apache/tomcat/util/threads/TaskQueue.java  | 21 ++---
 res/findbugs/filter-false-positives.xml |  6 --
 3 files changed, 16 insertions(+), 15 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 02/02: Clean-up

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 55944c22724f5688cf32dd5b7befb1b084866e3b
Author: Mark Thomas 
AuthorDate: Thu Nov 14 21:59:21 2019 +

Clean-up
---
 res/findbugs/filter-false-positives.xml | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/res/findbugs/filter-false-positives.xml 
b/res/findbugs/filter-false-positives.xml
index 50bca30..21ed1b0 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -701,7 +701,9 @@
 
 
   
-  
+
+
+  
   
 
   
@@ -914,4 +916,4 @@
 
 
   
-
\ No newline at end of file
+


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: BZ 63835: Add support for Keep-Alive header

2019-11-14 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 1c5bf7a  BZ 63835: Add support for Keep-Alive header
1c5bf7a is described below

commit 1c5bf7a904cffa438eb9b979f3bd32e1579e9666
Author: Michael Osipov 
AuthorDate: Wed Oct 23 15:37:42 2019 +0200

BZ 63835: Add support for Keep-Alive header

This implementation slightly varies from HTTPd in way that it responds with
'Connection: keep-alive' if and only if additionally to the required request
header the keepAliveTimeout has to be greater than 0.

Also modified existing tests because HttpUrlConnection always sends
'Connection: keep-alive' where the tests are not aware of this -- thus fail.
---
 java/org/apache/coyote/http11/Constants.java   |   1 +
 java/org/apache/coyote/http11/Http11Processor.java |  22 +++-
 .../apache/catalina/startup/SimpleHttpClient.java  |   7 +-
 .../apache/coyote/http11/TestHttp11Processor.java  | 141 ++---
 webapps/docs/changelog.xml |   7 +
 5 files changed, 160 insertions(+), 18 deletions(-)

diff --git a/java/org/apache/coyote/http11/Constants.java 
b/java/org/apache/coyote/http11/Constants.java
index 2ca4dc4..55045d4 100644
--- a/java/org/apache/coyote/http11/Constants.java
+++ b/java/org/apache/coyote/http11/Constants.java
@@ -117,6 +117,7 @@ public final class Constants {
 public static final String CHUNKED = "chunked";
 public static final byte[] ACK_BYTES = ByteChunk.convertToBytes("HTTP/1.1 
100 " + CRLF + CRLF);
 public static final String TRANSFERENCODING = "Transfer-Encoding";
+public static final String KEEP_ALIVE = "Keep-Alive";
 public static final byte[] _200_BYTES = ByteChunk.convertToBytes("200");
 public static final byte[] _400_BYTES = ByteChunk.convertToBytes("400");
 public static final byte[] _404_BYTES = ByteChunk.convertToBytes("404");
diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index 6ffcd16..4698174 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -907,8 +907,26 @@ public class Http11Processor extends AbstractProcessor {
 headers.addValue(Constants.CONNECTION).setString(
 Constants.CLOSE);
 }
-} else if (!http11 && !getErrorState().isError()) {
-
headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE);
+} else if (!getErrorState().isError()) {
+if (!http11) {
+
headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE);
+}
+
+boolean connectionKeepAlivePresent =
+isConnectionToken(request.getMimeHeaders(), 
Constants.KEEPALIVE);
+
+if (connectionKeepAlivePresent) {
+int keepAliveTimeout = protocol.getKeepAliveTimeout();
+
+if (keepAliveTimeout > 0) {
+String value = "timeout=" + keepAliveTimeout / 1000L;
+headers.setValue(Constants.KEEP_ALIVE).setString(value);
+
+if (http11) {
+
headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE);
+}
+}
+}
 }
 
 // Add server header
diff --git a/test/org/apache/catalina/startup/SimpleHttpClient.java 
b/test/org/apache/catalina/startup/SimpleHttpClient.java
index b53bb1a..6ff2050 100644
--- a/test/org/apache/catalina/startup/SimpleHttpClient.java
+++ b/test/org/apache/catalina/startup/SimpleHttpClient.java
@@ -56,6 +56,7 @@ public abstract class SimpleHttpClient {
 public static final String REDIRECT_302 = "HTTP/1.1 302 ";
 public static final String REDIRECT_303 = "HTTP/1.1 303 ";
 public static final String FAIL_400 = "HTTP/1.1 400 ";
+public static final String FORBIDDEN_403 = "HTTP/1.1 403 ";
 public static final String FAIL_404 = "HTTP/1.1 404 ";
 public static final String FAIL_405 = "HTTP/1.1 405 ";
 public static final String TIMEOUT_408 = "HTTP/1.1 408 ";
@@ -444,6 +445,10 @@ public abstract class SimpleHttpClient {
 return responseLineStartsWith(FAIL_400);
 }
 
+public boolean isResponse403() {
+return responseLineStartsWith(FORBIDDEN_403);
+}
+
 public boolean isResponse404() {
 return responseLineStartsWith(FAIL_404);
 }
@@ -481,4 +486,4 @@ public abstract class SimpleHttpClient {
 }
 
 public abstract boolean isResponseBodyOK();
-}
\ No newline at end of file
+}
diff --git a/test/org/apache/coyote/http11/TestHttp11Processor.java 
b/test/org/apache/coyote/http11/TestHttp11Processor.java
index 8d8c777..20b6c90 100644
--- 

[tomcat] branch 8.5.x updated: BZ 63835: Add support for Keep-Alive header

2019-11-14 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 1412fc5  BZ 63835: Add support for Keep-Alive header
1412fc5 is described below

commit 1412fc5c2db85afa195dc81f97e93b99b8cd1cae
Author: Michael Osipov 
AuthorDate: Wed Oct 23 15:37:42 2019 +0200

BZ 63835: Add support for Keep-Alive header

This implementation slightly varies from HTTPd in way that it responds with
'Connection: keep-alive' if and only if additionally to the required request
header the keepAliveTimeout has to be greater than 0.

Also modified existing tests because HttpUrlConnection always sends
'Connection: keep-alive' where the tests are not aware of this -- thus fail.
---
 java/org/apache/coyote/http11/Constants.java   |   1 +
 java/org/apache/coyote/http11/Http11Processor.java |  22 +++-
 .../apache/catalina/startup/SimpleHttpClient.java  |   5 +
 .../apache/coyote/http11/TestHttp11Processor.java  | 141 ++---
 webapps/docs/changelog.xml |   3 +
 5 files changed, 155 insertions(+), 17 deletions(-)

diff --git a/java/org/apache/coyote/http11/Constants.java 
b/java/org/apache/coyote/http11/Constants.java
index 1383454..2b840ff 100644
--- a/java/org/apache/coyote/http11/Constants.java
+++ b/java/org/apache/coyote/http11/Constants.java
@@ -124,6 +124,7 @@ public final class Constants {
 ByteChunk.convertToBytes("HTTP/1.1 100 Continue" + CRLF + CRLF);
 public static final byte[] ACK_BYTES = ByteChunk.convertToBytes("HTTP/1.1 
100 " + CRLF + CRLF);
 public static final String TRANSFERENCODING = "Transfer-Encoding";
+public static final String KEEP_ALIVE = "Keep-Alive";
 public static final byte[] _200_BYTES = ByteChunk.convertToBytes("200");
 public static final byte[] _400_BYTES = ByteChunk.convertToBytes("400");
 public static final byte[] _404_BYTES = ByteChunk.convertToBytes("404");
diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index fe3487f..c4210fb 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1145,8 +1145,26 @@ public class Http11Processor extends AbstractProcessor {
 headers.addValue(Constants.CONNECTION).setString(
 Constants.CLOSE);
 }
-} else if (!http11 && !getErrorState().isError()) {
-
headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE);
+} else if (!getErrorState().isError()) {
+if (!http11) {
+
headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE);
+}
+
+boolean connectionKeepAlivePresent =
+isConnectionToken(request.getMimeHeaders(), 
Constants.KEEPALIVE);
+
+if (connectionKeepAlivePresent) {
+int keepAliveTimeout = protocol.getKeepAliveTimeout();
+
+if (keepAliveTimeout > 0) {
+String value = "timeout=" + keepAliveTimeout / 1000L;
+headers.setValue(Constants.KEEP_ALIVE).setString(value);
+
+if (http11) {
+
headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE);
+}
+}
+}
 }
 
 // Add server header
diff --git a/test/org/apache/catalina/startup/SimpleHttpClient.java 
b/test/org/apache/catalina/startup/SimpleHttpClient.java
index 1020985..6ff2050 100644
--- a/test/org/apache/catalina/startup/SimpleHttpClient.java
+++ b/test/org/apache/catalina/startup/SimpleHttpClient.java
@@ -56,6 +56,7 @@ public abstract class SimpleHttpClient {
 public static final String REDIRECT_302 = "HTTP/1.1 302 ";
 public static final String REDIRECT_303 = "HTTP/1.1 303 ";
 public static final String FAIL_400 = "HTTP/1.1 400 ";
+public static final String FORBIDDEN_403 = "HTTP/1.1 403 ";
 public static final String FAIL_404 = "HTTP/1.1 404 ";
 public static final String FAIL_405 = "HTTP/1.1 405 ";
 public static final String TIMEOUT_408 = "HTTP/1.1 408 ";
@@ -444,6 +445,10 @@ public abstract class SimpleHttpClient {
 return responseLineStartsWith(FAIL_400);
 }
 
+public boolean isResponse403() {
+return responseLineStartsWith(FORBIDDEN_403);
+}
+
 public boolean isResponse404() {
 return responseLineStartsWith(FAIL_404);
 }
diff --git a/test/org/apache/coyote/http11/TestHttp11Processor.java 
b/test/org/apache/coyote/http11/TestHttp11Processor.java
index 7759df6..f3d7d8f 100644
--- a/test/org/apache/coyote/http11/TestHttp11Processor.java
+++ b/test/org/apache/coyote/http11/TestHttp11Processor.java
@@ -24,6 +24,7 @@ import java.io.OutputStream;
 

[Bug 63835] Add support for Keep-Alive header

2019-11-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63835

--- Comment #8 from Konstantin Kolinko  ---
Reviewing the commit implementing this feature in Tomcat 9,
https://github.com/apache/tomcat/commit/1c5bf7a904cffa438eb9b979f3bd32e1579e9666

1. I think that if you are rolling out an experimental feature, there must be a
flag controlling it.

2. You must not send this header to a HTTP/1.0 client. (You can skip a lot of
code if the client is HTTP/1.0).

3. The code sets a new "Keep-Alive" header unconditionally, regardless of
whether one is already present in the response.

(It is unlikely that there is one, but it is one more reason for a flag
controlling this feature).

4.
>  if (http11) {
> headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE);
>  }

Looking at example in [03] page 7, a Connection header in response may already
have other connection options, e.g. "Upgrade".

[03] https://tools.ietf.org/html/draft-thomson-hybi-http-timeout-03#page-7

Smoke-testing a Tomcat WebSocket examples with a build from master, I see that
Tomcat sends two "Connection" headers:

Connection: upgrade
Connection: keep-alive

Smoke-testing HTTP/2.0, it works (at least in Firefox). Thus it is not a
showstopper.

According to RFC 7230 3.2.2. I think it is allowed to generate multiple
"Connection" headers.

5.
In Constants.java this commit adds the following constant:

> + public static final String KEEP_ALIVE = "Keep-Alive";

There already exists Constants.KEEPALIVE constant (without an underscore in the
name) in the same class. Adding a second constant with a similar name is
confusing.

(As an example:

> isConnectionToken(request.getMimeHeaders(), Constants.KEEPALIVE);

It uses the old lowercase "keep-alive" constant, instead of the new mixed-case
one. The isConnectionToken() method expects a lowercase value, thus one missed
a chance to create a bug here.
)

6.
>  if (keepAliveTimeout > 0) {
> String value = "timeout=" + keepAliveTimeout / 1000L;

Can the value be less than 1 second? I think it may be confusing to send back a
"timeout=0" value.

7. changelog:

> 63835: Add support for Keep-Alive header. (michaelo)

*response* header

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [tomcat] branch master updated: Fix IDE warnings. Get build working with Java 8 through 14

2019-11-14 Thread Konstantin Kolinko
чт, 14 нояб. 2019 г. в 23:39, Mark Thomas :
>
> On 14/11/2019 20:13, Rémy Maucherat wrote:
> > On Thu, Nov 14, 2019 at 8:26 PM  > > wrote:
> >
> > +  
> >

Was it necessary to remove "release=" everywhere in this commit, when
only one  invocation is concerned? What is your version of
Apache Ant?

http://ant.apache.org/manual-1.9.x/Tasks/javac.html
says that "release" option is since Ant 1.9.8.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 01/01: Tag 9.0.28

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to tag 9.0.28
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 7c14efedba0cc81319efacb0e7f5129804e7b6f9
Author: Mark Thomas 
AuthorDate: Thu Nov 14 09:31:48 2019 +

Tag 9.0.28
---
 build.properties.default   | 2 +-
 webapps/docs/changelog.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 233c6a2..9787b56 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -27,7 +27,7 @@ version.major=9
 version.minor=0
 version.build=28
 version.patch=0
-version.suffix=-dev
+version.suffix=
 
 # - Source control flags -
 git.branch=master
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index bf9dacc..45ebfa1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -44,7 +44,7 @@
   They eventually become mixed with the numbered issues (i.e., numbered
   issues do not "pop up" wrt. others).
 -->
-
+
   
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] tag 9.0.28 created (now 7c14efe)

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to tag 9.0.28
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


  at 7c14efe  (commit)
This tag includes the following new commits:

 new 7c14efe  Tag 9.0.28

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Polish. Javadoc in expected order

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 92a198d  Polish. Javadoc in expected order
92a198d is described below

commit 92a198dc494f1b14e7519522efee76ab3a610e72
Author: Mark Thomas 
AuthorDate: Wed Nov 13 22:48:23 2019 +

Polish. Javadoc in expected order
---
 java/org/apache/jasper/compiler/Compiler.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Compiler.java 
b/java/org/apache/jasper/compiler/Compiler.java
index 748bb89..81c9fc1 100644
--- a/java/org/apache/jasper/compiler/Compiler.java
+++ b/java/org/apache/jasper/compiler/Compiler.java
@@ -101,9 +101,9 @@ public abstract class Compiler {
 /**
  * Compile the jsp file into equivalent servlet in .java file
  *
- * @throws Exception Error generating Java source
- *
  * @return A map of class names to JSR 045 source maps
+ *
+ * @throws Exception Error generating Java source
  */
 protected Map generateJava() throws Exception {
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 04/05: Fix SportBugs warnings for Coyote and EL

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit fce6e651665ab2ca72c3d9fe2420db2ac14c0d2c
Author: Mark Thomas 
AuthorDate: Wed Nov 13 22:36:56 2019 +

Fix SportBugs warnings for Coyote and EL
---
 .../apache/coyote/http2/Http2UpgradeHandler.java   | 12 ---
 java/org/apache/el/util/ReflectionUtil.java| 24 ++
 res/findbugs/filter-false-positives.xml| 18 
 3 files changed, 42 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 159e5d4..40a379b 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -160,18 +160,6 @@ public class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpU
 private volatile int lastWindowUpdate;
 
 
-/**
- * @param adapter   The adapter to use to process the upgrade
- * @param coyoteRequest The request to use to process the upgrade
- *
- * @deprecated This will be removed in Tomcat 9 onwards.
- * Use {@link #Http2UpgradeHandler(Http2Protocol, Adapter, 
Request)}
- */
-@Deprecated
-public Http2UpgradeHandler(Adapter adapter, Request coyoteRequest) {
-this(null, adapter, coyoteRequest);
-}
-
 public Http2UpgradeHandler(Http2Protocol protocol, Adapter adapter, 
Request coyoteRequest) {
 super (STREAM_ID_ZERO);
 this.protocol = protocol;
diff --git a/java/org/apache/el/util/ReflectionUtil.java 
b/java/org/apache/el/util/ReflectionUtil.java
index f59a61c..acf2271 100644
--- a/java/org/apache/el/util/ReflectionUtil.java
+++ b/java/org/apache/el/util/ReflectionUtil.java
@@ -557,5 +557,29 @@ public class ReflectionUtil {
 }
 return cmp;
 }
+
+@Override
+public boolean equals(Object o)
+{
+return o == this
+|| (null != o
+&& this.getClass().equals(o.getClass())
+&& ((MatchResult)o).getExact() == this.getExact()
+&& ((MatchResult)o).getAssignable() == this.getAssignable()
+&& ((MatchResult)o).getCoercible() == this.getCoercible()
+&& ((MatchResult)o).isBridge() == this.isBridge()
+)
+;
+}
+
+@Override
+public int hashCode()
+{
+return (this.isBridge() ? 1 << 24 : 0)
+^ this.getExact() << 16
+^ this.getAssignable() << 8
+^ this.getCoercible()
+;
+}
 }
 }
diff --git a/res/findbugs/filter-false-positives.xml 
b/res/findbugs/filter-false-positives.xml
index f8b59f8..eb037f8 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -823,12 +823,30 @@
 
   
   
+
+
+
+
+  
+  
+
+
+
+
+  
+  
 
 
 
 
   
   
+
+
+
+
+  
+  
 
 
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 05/05: SpotBugs fixes (incomplete) for Jasper

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 36291e6af5629a4bb019f74fd0be829e3287b7fa
Author: Mark Thomas 
AuthorDate: Wed Nov 13 22:48:44 2019 +

SpotBugs fixes (incomplete) for Jasper
---
 java/org/apache/jasper/compiler/AntCompiler.java | 5 -
 java/org/apache/jasper/compiler/Compiler.java| 3 ++-
 java/org/apache/jasper/compiler/JDTCompiler.java | 5 -
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/jasper/compiler/AntCompiler.java 
b/java/org/apache/jasper/compiler/AntCompiler.java
index bf2a2f8..0d0bcb4 100644
--- a/java/org/apache/jasper/compiler/AntCompiler.java
+++ b/java/org/apache/jasper/compiler/AntCompiler.java
@@ -249,7 +249,10 @@ public class AntCompiler extends Compiler {
 
 if (!ctxt.keepGenerated()) {
 File javaFile = new File(javaFileName);
-javaFile.delete();
+if (!javaFile.delete()) {
+throw new JasperException(Localizer.getMessage(
+"jsp.warning.compiler.javafile.delete.fail", 
javaFile));
+}
 }
 
 if (be != null) {
diff --git a/java/org/apache/jasper/compiler/Compiler.java 
b/java/org/apache/jasper/compiler/Compiler.java
index 9cf955a..02278b5 100644
--- a/java/org/apache/jasper/compiler/Compiler.java
+++ b/java/org/apache/jasper/compiler/Compiler.java
@@ -77,6 +77,7 @@ public abstract class Compiler {
 this.options = ctxt.getOptions();
 }
 
+
 // - Public Methods
 
 /**
@@ -264,7 +265,7 @@ public abstract class Compiler {
 + " generate=" + (t4 - t3) + " validate=" + (t2 - t1));
 }
 
-} catch (Exception e) {
+} catch (RuntimeException e) {
 // Remove the generated .java file
 File file = new File(javaFileName);
 if (file.exists()) {
diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java 
b/java/org/apache/jasper/compiler/JDTCompiler.java
index 4950f3f..1d0f0b7 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -540,7 +540,10 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 
 if (!ctxt.keepGenerated()) {
 File javaFile = new File(ctxt.getServletJavaFileName());
-javaFile.delete();
+if (!javaFile.delete()) {
+throw new JasperException(Localizer.getMessage(
+"jsp.warning.compiler.javafile.delete.fail", 
javaFile));
+}
 }
 
 if (!problemList.isEmpty()) {


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 03/05: Fix SpotBugs warnings in o.a.catalina

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit b46f44cb028e456f6b9c6a2f5dde33c71a040e00
Author: Mark Thomas 
AuthorDate: Wed Nov 13 22:06:45 2019 +

Fix SpotBugs warnings in o.a.catalina

Additional clean-up / alignment spotted while reviewing
9.0.x/8.5.x/7.0.x diff
---
 java/org/apache/catalina/ha/ClusterListener.java   |  10 --
 .../catalina/loader/WebappClassLoaderBase.java |  10 +-
 java/org/apache/catalina/realm/JAASRealm.java  |   9 +-
 java/org/apache/catalina/realm/LockOutRealm.java   |   2 +-
 .../apache/catalina/security/SecurityConfig.java   |  12 +-
 java/org/apache/catalina/session/FileStore.java|  10 +-
 .../catalina/session/LocalStrings.properties   |   2 +
 .../catalina/session/LocalStrings_es.properties|   1 +
 .../catalina/session/LocalStrings_fr.properties|   2 +
 .../catalina/session/LocalStrings_ja.properties|   2 +
 .../catalina/session/LocalStrings_ko.properties|   2 +
 .../catalina/session/LocalStrings_zh_CN.properties |   2 +
 .../apache/catalina/session/StandardManager.java   |   7 +-
 java/org/apache/catalina/startup/Bootstrap.java| 104 ++---
 .../org/apache/catalina/startup/ContextConfig.java |   6 +-
 .../catalina/startup/LocalStrings.properties   |   2 +
 .../catalina/startup/LocalStrings_fr.properties|   2 +
 .../catalina/startup/LocalStrings_ja.properties|   2 +
 .../catalina/startup/LocalStrings_ko.properties|   2 +
 .../catalina/startup/LocalStrings_zh_CN.properties |   1 +
 java/org/apache/catalina/startup/Tomcat.java   |  22 ++-
 .../catalina/storeconfig/LocalStrings.properties   |   3 +
 .../storeconfig/LocalStrings_fr.properties |   3 +
 .../storeconfig/LocalStrings_ja.properties |   3 +
 .../storeconfig/LocalStrings_ko.properties |   3 +
 ...gs.properties => LocalStrings_zh_CN.properties} |   9 +-
 .../catalina/storeconfig/StoreFileMover.java   |  23 +--
 .../catalina/tribes/group/ChannelCoordinator.java  |   1 -
 .../apache/catalina/tribes/group/GroupChannel.java |   6 +-
 .../group/interceptors/TcpPingInterceptor.java |   4 +-
 .../group/interceptors/ThroughputInterceptor.java  |  14 +-
 .../org/apache/catalina/tribes/io/ChannelData.java |  21 +--
 .../org/apache/catalina/tribes/io/XByteBuffer.java |   6 +-
 .../tribes/membership/McastServiceImpl.java|   2 +-
 .../catalina/tribes/membership/Membership.java |  23 ++-
 .../tribes/tipis/AbstractReplicatedMap.java|  16 +-
 .../catalina/tribes/tipis/LazyReplicatedMap.java   |  16 +-
 .../catalina/tribes/tipis/ReplicatedMap.java   |  25 +++-
 .../catalina/tribes/transport/AbstractRxTask.java  |   4 +-
 .../catalina/tribes/transport/PooledSender.java|   8 +-
 .../catalina/tribes/transport/RxTaskPool.java  |   8 +-
 .../tribes/transport/bio/MultipointBioSender.java  |  16 +-
 .../tribes/transport/nio/ParallelNioSender.java|  16 +-
 .../catalina/tribes/util/ExecutorFactory.java  |   2 +-
 res/findbugs/filter-false-positives.xml| 161 -
 45 files changed, 422 insertions(+), 183 deletions(-)

diff --git a/java/org/apache/catalina/ha/ClusterListener.java 
b/java/org/apache/catalina/ha/ClusterListener.java
index 5ab903e..348b136 100644
--- a/java/org/apache/catalina/ha/ClusterListener.java
+++ b/java/org/apache/catalina/ha/ClusterListener.java
@@ -67,16 +67,6 @@ public abstract class ClusterListener implements 
ChannelListener {
 this.cluster = cluster;
 }
 
-@Override
-public boolean equals(Object listener) {
-return super.equals(listener);
-}
-
-@Override
-public int hashCode() {
-return super.hashCode();
-}
-
 //--Logic---
 
 @Override
diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java 
b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index ee79208..9d1e0de 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -699,9 +699,7 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 if (this.transformers.remove(transformer)) {
 log.info(sm.getString("webappClassLoader.removeTransformer",
 transformer, getContextName()));
-return;
 }
-
 }
 
 protected void copyStateWithoutTransformers(WebappClassLoaderBase base) {
@@ -1741,7 +1739,7 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 getContextName(), threadName, 
getStackTrace(thread)));
 }
 
-// Don't try an stop the threads unless explicitly
+// Don't try and stop the threads unless explicitly
 // configured to do so

[tomcat] 01/05: Align with 9.0.x, improve i18n

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit f001c56662adee32631699a19e544ea748986b0f
Author: Mark Thomas 
AuthorDate: Wed Nov 13 18:22:06 2019 +

Align with 9.0.x, improve i18n
---
 .../catalina/ha/deploy/FileMessageFactory.java | 50 --
 .../catalina/ha/deploy/LocalStrings.properties |  6 +++
 .../catalina/ha/deploy/LocalStrings_de.properties  |  2 +
 .../catalina/ha/deploy/LocalStrings_es.properties  |  2 +
 .../catalina/ha/deploy/LocalStrings_fr.properties  |  6 +++
 .../catalina/ha/deploy/LocalStrings_ja.properties  |  6 +++
 .../catalina/ha/deploy/LocalStrings_ko.properties  |  6 +++
 .../ha/deploy/LocalStrings_zh_CN.properties|  2 +
 8 files changed, 49 insertions(+), 31 deletions(-)

diff --git a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java 
b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
index 5c8c47e..4c4ab70 100644
--- a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
+++ b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
@@ -235,36 +235,26 @@ public class FileMessageFactory {
  */
 public boolean writeMessage(FileMessage msg)
 throws IllegalArgumentException, IOException {
-if (!openForWrite)
-throw new IllegalArgumentException(
-"Can't write message, this factory is reading.");
+if (!openForWrite) {
+throw new 
IllegalArgumentException(sm.getString("fileMessageFactory.cannotWrite"));
+}
 if (log.isDebugEnabled())
 log.debug("Message " + msg + " data " + 
HexUtils.toHexString(msg.getData())
 + " data length " + msg.getDataLength() + " out " + out);
 
 if (msg.getMessageNumber() <= lastMessageProcessed.get()) {
 // Duplicate of message already processed
-log.warn("Receive Message again -- Sender ActTimeout too short [ 
name: "
-+ msg.getContextName()
-+ " war: "
-+ msg.getFileName()
-+ " data: "
-+ HexUtils.toHexString(msg.getData())
-+ " data length: " + msg.getDataLength() + " ]");
+log.warn(sm.getString("fileMessageFactory.duplicateMessage", 
msg.getContextName(), msg.getFileName(),
+HexUtils.toHexString(msg.getData()), 
Integer.valueOf(msg.getDataLength(;
 return false;
 }
 
 FileMessage previous =
 msgBuffer.put(Long.valueOf(msg.getMessageNumber()), msg);
-if (previous !=null) {
+if (previous != null) {
 // Duplicate of message not yet processed
-log.warn("Receive Message again -- Sender ActTimeout too short [ 
name: "
-+ msg.getContextName()
-+ " war: "
-+ msg.getFileName()
-+ " data: "
-+ HexUtils.toHexString(msg.getData())
-+ " data length: " + msg.getDataLength() + " ]");
+log.warn(sm.getString("fileMessageFactory.duplicateMessage", 
msg.getContextName(), msg.getFileName(),
+HexUtils.toHexString(msg.getData()), 
Integer.valueOf(msg.getDataLength(;
 return false;
 }
 
@@ -340,16 +330,15 @@ public class FileMessageFactory {
 throws IllegalArgumentException {
 if (this.openForWrite != openForWrite) {
 cleanup();
-if (openForWrite)
-throw new IllegalArgumentException(
-"Can't write message, this factory is reading.");
-else
-throw new IllegalArgumentException(
-"Can't read message, this factory is writing.");
+if (openForWrite) {
+throw new 
IllegalArgumentException(sm.getString("fileMessageFactory.cannotWrite"));
+} else {
+throw new 
IllegalArgumentException(sm.getString("fileMessageFactory.cannotRead"));
+}
 }
 if (this.closed) {
 cleanup();
-throw new IllegalArgumentException("Factory has been closed.");
+throw new 
IllegalArgumentException(sm.getString("fileMessageFactory.closed"));
 }
 }
 
@@ -362,11 +351,8 @@ public class FileMessageFactory {
  * @throws Exception An error occurred
  */
 public static void main(String[] args) throws Exception {
-
-System.out
-.println("Usage: FileMessageFactory fileToBeRead 
fileToBeWritten");
-System.out
-.println("Usage: This will make a copy of the file on the 
local file system");
+System.out.println("Usage: FileMessageFactory fileToBeRead 
fileToBeWritten");
+System.out.println("Usage: This will make a copy of the file on the 

[tomcat] 02/05: Back-port FindBugs fixes from 9.0.x

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 3fe5742da6d2b803b4f71242982ce34045d5f396
Author: Mark Thomas 
AuthorDate: Wed Nov 13 19:22:42 2019 +

Back-port FindBugs fixes from 9.0.x

(and a few obvious alignment fixes spotted along the way)
---
 .../catalina/core/ApplicationFilterConfig.java |   2 +-
 .../apache/catalina/ha/tcp/ReplicationValve.java   |  46 +
 .../catalina/manager/LocalStrings.properties   |   1 +
 .../catalina/manager/LocalStrings_fr.properties|   1 +
 .../catalina/manager/LocalStrings_ja.properties|   1 +
 .../catalina/manager/LocalStrings_ko.properties|   1 +
 .../catalina/manager/LocalStrings_ru.properties|   1 +
 .../catalina/manager/LocalStrings_zh_CN.properties |   1 +
 .../apache/catalina/manager/ManagerServlet.java|   8 +-
 .../catalina/manager/StatusManagerServlet.java |   7 --
 .../mbeans/JmxRemoteLifecycleListener.java |  27 +
 java/org/apache/catalina/tribes/Member.java|   4 +-
 res/findbugs/filter-false-positives.xml| 115 +++--
 13 files changed, 176 insertions(+), 39 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationFilterConfig.java 
b/java/org/apache/catalina/core/ApplicationFilterConfig.java
index a8f960c..dc146fc 100644
--- a/java/org/apache/catalina/core/ApplicationFilterConfig.java
+++ b/java/org/apache/catalina/core/ApplicationFilterConfig.java
@@ -62,7 +62,7 @@ public final class ApplicationFilterConfig implements 
FilterConfig, Serializable
 static final StringManager sm =
 StringManager.getManager(Constants.Package);
 
-private final Log log = LogFactory.getLog(ApplicationFilterConfig.class); 
// must not be static
+private transient Log log = 
LogFactory.getLog(ApplicationFilterConfig.class); // must not be static
 
 /**
  * Empty String collection to serve as the basis for empty enumerations.
diff --git a/java/org/apache/catalina/ha/tcp/ReplicationValve.java 
b/java/org/apache/catalina/ha/tcp/ReplicationValve.java
index 8fac6b2..30308b5 100644
--- a/java/org/apache/catalina/ha/tcp/ReplicationValve.java
+++ b/java/org/apache/catalina/ha/tcp/ReplicationValve.java
@@ -93,13 +93,21 @@ public class ReplicationValve
  */
 protected boolean doProcessingStats = false;
 
-protected long totalRequestTime = 0;
-protected long totalSendTime = 0;
-protected long nrOfRequests = 0;
-protected long lastSendTime = 0;
-protected long nrOfFilterRequests = 0;
-protected long nrOfSendRequests = 0;
-protected long nrOfCrossContextSendRequests = 0;
+/*
+ * Note: The statistics are volatile to ensure the concurrent updates do 
not
+ *   corrupt them but it is still possible that:
+ *   - some updates may be lost;
+ *   - the individual statistics may not be consistent which each 
other.
+ *   This is a deliberate design choice to reduce the requirement for
+ *   synchronization.
+ */
+protected volatile long totalRequestTime = 0;
+protected volatile long totalSendTime = 0;
+protected volatile long nrOfRequests = 0;
+protected volatile long lastSendTime = 0;
+protected volatile long nrOfFilterRequests = 0;
+protected volatile long nrOfSendRequests = 0;
+protected volatile long nrOfCrossContextSendRequests = 0;
 
 /**
  * must primary change indicator set
@@ -354,11 +362,11 @@ public class ReplicationValve
  * reset the active statistics
  */
 public void resetStatistics() {
-totalRequestTime = 0 ;
-totalSendTime = 0 ;
-lastSendTime = 0 ;
-nrOfFilterRequests = 0 ;
-nrOfRequests = 0 ;
+totalRequestTime = 0;
+totalSendTime = 0;
+lastSendTime = 0;
+nrOfFilterRequests = 0;
+nrOfRequests = 0;
 nrOfSendRequests = 0;
 nrOfCrossContextSendRequests = 0;
 }
@@ -422,8 +430,7 @@ public class ReplicationValve
 protected void sendCrossContextSession() {
 List sessions = crossContextSessions.get();
 if(sessions != null && sessions.size() >0) {
-for(Iterator iter = sessions.iterator(); 
iter.hasNext() ;) {
-Session session = iter.next();
+for (DeltaSession session : sessions) {
 if(log.isDebugEnabled()) {
 
log.debug(sm.getString("ReplicationValve.crossContext.sendDelta",
 session.getManager().getContext().getName() ));
@@ -564,12 +571,11 @@ public class ReplicationValve
 protected  void updateStats(long requestTime, long clusterTime) {
 // TODO: Async requests may trigger multiple replication requests. How,
 //   if at all, should the stats handle this?
-synchronized(this) {
-lastSendTime=System.currentTimeMillis();
-

[tomcat] branch 8.5.x updated (f056ef1 -> 36291e6)

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from f056ef1  Properly calculate dynamic parts of ErrorReportValve response 
for TestHttp2InitialConnection
 new f001c56  Align with 9.0.x, improve i18n
 new 3fe5742  Back-port FindBugs fixes from 9.0.x
 new b46f44c  Fix SpotBugs warnings in o.a.catalina
 new fce6e65  Fix SportBugs warnings for Coyote and EL
 new 36291e6  SpotBugs fixes (incomplete) for Jasper

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../catalina/core/ApplicationFilterConfig.java |   2 +-
 java/org/apache/catalina/ha/ClusterListener.java   |  10 -
 .../catalina/ha/deploy/FileMessageFactory.java |  50 ++--
 .../catalina/ha/deploy/LocalStrings.properties |   6 +
 .../catalina/ha/deploy/LocalStrings_de.properties  |   2 +
 .../catalina/ha/deploy/LocalStrings_es.properties  |   2 +
 .../catalina/ha/deploy/LocalStrings_fr.properties  |   6 +
 .../catalina/ha/deploy/LocalStrings_ja.properties  |   6 +
 .../catalina/ha/deploy/LocalStrings_ko.properties  |   6 +
 .../ha/deploy/LocalStrings_zh_CN.properties|   2 +
 .../apache/catalina/ha/tcp/ReplicationValve.java   |  46 ++--
 .../catalina/loader/WebappClassLoaderBase.java |  10 +-
 .../catalina/manager/LocalStrings.properties   |   1 +
 .../catalina/manager/LocalStrings_fr.properties|   1 +
 .../catalina/manager/LocalStrings_ja.properties|   1 +
 .../catalina/manager/LocalStrings_ko.properties|   1 +
 .../catalina/manager/LocalStrings_ru.properties|   1 +
 .../catalina/manager/LocalStrings_zh_CN.properties |   1 +
 .../apache/catalina/manager/ManagerServlet.java|   8 +-
 .../catalina/manager/StatusManagerServlet.java |   7 -
 .../mbeans/JmxRemoteLifecycleListener.java |  27 ++
 java/org/apache/catalina/realm/JAASRealm.java  |   9 +-
 java/org/apache/catalina/realm/LockOutRealm.java   |   2 +-
 .../apache/catalina/security/SecurityConfig.java   |  12 +-
 java/org/apache/catalina/session/FileStore.java|  10 +-
 .../catalina/session/LocalStrings.properties   |   2 +
 .../catalina/session/LocalStrings_es.properties|   1 +
 .../catalina/session/LocalStrings_fr.properties|   2 +
 .../catalina/session/LocalStrings_ja.properties|   2 +
 .../catalina/session/LocalStrings_ko.properties|   2 +
 .../catalina/session/LocalStrings_zh_CN.properties |   2 +
 .../apache/catalina/session/StandardManager.java   |   7 +-
 java/org/apache/catalina/startup/Bootstrap.java| 104 +++-
 .../org/apache/catalina/startup/ContextConfig.java |   6 +-
 .../catalina/startup/LocalStrings.properties   |   2 +
 .../catalina/startup/LocalStrings_fr.properties|   2 +
 .../catalina/startup/LocalStrings_ja.properties|   2 +
 .../catalina/startup/LocalStrings_ko.properties|   2 +
 .../catalina/startup/LocalStrings_zh_CN.properties |   1 +
 java/org/apache/catalina/startup/Tomcat.java   |  22 +-
 .../catalina/storeconfig/LocalStrings.properties   |   3 +
 .../storeconfig/LocalStrings_fr.properties |   3 +
 .../storeconfig/LocalStrings_ja.properties |   3 +
 .../storeconfig/LocalStrings_ko.properties |   3 +
 .../LocalStrings_zh_CN.properties  |   3 +-
 .../catalina/storeconfig/StoreFileMover.java   |  23 +-
 java/org/apache/catalina/tribes/Member.java|   4 +-
 .../catalina/tribes/group/ChannelCoordinator.java  |   1 -
 .../apache/catalina/tribes/group/GroupChannel.java |   6 +-
 .../group/interceptors/TcpPingInterceptor.java |   4 +-
 .../group/interceptors/ThroughputInterceptor.java  |  14 +-
 .../org/apache/catalina/tribes/io/ChannelData.java |  21 +-
 .../org/apache/catalina/tribes/io/XByteBuffer.java |   6 +-
 .../tribes/membership/McastServiceImpl.java|   2 +-
 .../catalina/tribes/membership/Membership.java |  23 +-
 .../tribes/tipis/AbstractReplicatedMap.java|  16 +-
 .../catalina/tribes/tipis/LazyReplicatedMap.java   |  16 +-
 .../catalina/tribes/tipis/ReplicatedMap.java   |  25 +-
 .../catalina/tribes/transport/AbstractRxTask.java  |   4 +-
 .../catalina/tribes/transport/PooledSender.java|   8 +-
 .../catalina/tribes/transport/RxTaskPool.java  |   8 +-
 .../tribes/transport/bio/MultipointBioSender.java  |  16 +-
 .../tribes/transport/nio/ParallelNioSender.java|  16 +-
 .../catalina/tribes/util/ExecutorFactory.java  |   2 +-
 .../apache/coyote/http2/Http2UpgradeHandler.java   |  12 -
 java/org/apache/el/util/ReflectionUtil.java|  24 ++
 java/org/apache/jasper/compiler/AntCompiler.java   |   5 +-
 java/org/apache/jasper/compiler/Compiler.java  |   3 +-
 java/org/apache/jasper/compiler/JDTCompiler.java   |   5 +-
 

[tomcat] 05/06: SpotBugs fixes (incomplete) for Jasper and better align with 8.5.x

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 420c2b65326d416c366b58723bd1cdf224e6eea9
Author: Mark Thomas 
AuthorDate: Wed Nov 13 22:49:19 2019 +

SpotBugs fixes (incomplete) for Jasper and better align with 8.5.x
---
 java/org/apache/jasper/compiler/AntCompiler.java | 5 -
 java/org/apache/jasper/compiler/Compiler.java| 6 +-
 java/org/apache/jasper/compiler/JDTCompiler.java | 8 
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/jasper/compiler/AntCompiler.java 
b/java/org/apache/jasper/compiler/AntCompiler.java
index 7ee28fc..2dcd528 100644
--- a/java/org/apache/jasper/compiler/AntCompiler.java
+++ b/java/org/apache/jasper/compiler/AntCompiler.java
@@ -249,7 +249,10 @@ public class AntCompiler extends Compiler {
 
 if (!ctxt.keepGenerated()) {
 File javaFile = new File(javaFileName);
-javaFile.delete();
+if (!javaFile.delete()) {
+throw new JasperException(Localizer.getMessage(
+"jsp.warning.compiler.javafile.delete.fail", 
javaFile));
+}
 }
 
 if (be != null) {
diff --git a/java/org/apache/jasper/compiler/Compiler.java 
b/java/org/apache/jasper/compiler/Compiler.java
index 3ce7e08..4f6e9c3 100644
--- a/java/org/apache/jasper/compiler/Compiler.java
+++ b/java/org/apache/jasper/compiler/Compiler.java
@@ -68,6 +68,7 @@ public abstract class Compiler {
 
 protected Node.Nodes pageNodes;
 
+
 //  Constructor
 
 public void init(JspCompilationContext ctxt, JspServletWrapper jsw) {
@@ -76,6 +77,7 @@ public abstract class Compiler {
 this.options = ctxt.getOptions();
 }
 
+
 // - Public Methods
 
 /**
@@ -89,11 +91,13 @@ public abstract class Compiler {
 return this.pageNodes;
 }
 
+
 /**
  * Compile the jsp file into equivalent servlet in .java file
  *
  * @return a smap for the current JSP page, if one is generated, null
  * otherwise
+ * @throws Exception Error generating Java source
  */
 protected String[] generateJava() throws Exception {
 
@@ -263,7 +267,7 @@ public abstract class Compiler {
 + " generate=" + (t4 - t3) + " validate=" + (t2 - t1));
 }
 
-} catch (Exception e) {
+} catch (RuntimeException e) {
 if (writer != null) {
 try {
 writer.close();
diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java 
b/java/org/apache/jasper/compiler/JDTCompiler.java
index 8124bd0..91de3dc 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -581,7 +581,10 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 
 if (!ctxt.keepGenerated()) {
 File javaFile = new File(ctxt.getServletJavaFileName());
-javaFile.delete();
+if (!javaFile.delete()) {
+throw new JasperException(Localizer.getMessage(
+"jsp.warning.compiler.javafile.delete.fail", 
javaFile));
+}
 }
 
 if (!problemList.isEmpty()) {
@@ -604,8 +607,5 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 if (! options.isSmapSuppressed()) {
 SmapUtil.installSmap(smap);
 }
-
 }
-
-
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 03/06: SpotBugs fixes back-ports and additional clean-up spotted along the way

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 459b3f301bde62300a8da3e02fc8ffd2bafc71e3
Author: Mark Thomas 
AuthorDate: Wed Nov 13 22:13:46 2019 +

SpotBugs fixes back-ports and additional clean-up spotted along the way
---
 java/org/apache/catalina/ha/ClusterDeployer.java   |   4 +-
 java/org/apache/catalina/ha/ClusterListener.java   |  16 +--
 .../catalina/loader/WebappClassLoaderBase.java |  22 ++--
 java/org/apache/catalina/realm/JAASRealm.java  |  11 +-
 java/org/apache/catalina/realm/LockOutRealm.java   |   2 +-
 .../apache/catalina/security/SecurityConfig.java   |  33 --
 java/org/apache/catalina/session/FileStore.java|  17 ++-
 .../catalina/session/LocalStrings.properties   |   2 +
 .../catalina/session/LocalStrings_es.properties|   1 +
 .../catalina/session/LocalStrings_fr.properties|   2 +
 .../catalina/session/LocalStrings_ja.properties|   2 +
 .../catalina/session/LocalStrings_ko.properties|   2 +
 .../catalina/session/LocalStrings_zh_CN.properties |   2 +
 .../apache/catalina/session/StandardManager.java   |   8 +-
 java/org/apache/catalina/startup/Bootstrap.java| 122 +
 .../org/apache/catalina/startup/ContextConfig.java |   6 +-
 .../catalina/startup/LocalStrings.properties   |   2 +
 .../catalina/startup/LocalStrings_fr.properties|   2 +
 .../catalina/startup/LocalStrings_ja.properties|   2 +
 .../catalina/startup/LocalStrings_ko.properties|   2 +
 .../catalina/startup/LocalStrings_zh_CN.properties |   1 +
 java/org/apache/catalina/startup/Tomcat.java   |   4 +-
 .../apache/catalina/tribes/ChannelListener.java|   1 -
 .../catalina/tribes/group/ChannelCoordinator.java  |   8 +-
 .../apache/catalina/tribes/group/GroupChannel.java |   5 +-
 .../group/interceptors/TcpPingInterceptor.java |   4 +-
 .../group/interceptors/ThroughputInterceptor.java  |  10 +-
 .../org/apache/catalina/tribes/io/ChannelData.java |  22 ++--
 .../org/apache/catalina/tribes/io/XByteBuffer.java |   7 +-
 .../tribes/membership/McastServiceImpl.java|   3 +-
 .../catalina/tribes/membership/Membership.java |  34 --
 .../tribes/tipis/AbstractReplicatedMap.java|  21 ++--
 .../catalina/tribes/tipis/LazyReplicatedMap.java   |  21 +++-
 .../catalina/tribes/tipis/LocalStrings.properties  |  22 
 .../tribes/tipis/LocalStrings_de.properties|  17 +++
 .../tribes/tipis/LocalStrings_es.properties|  19 
 .../tribes/tipis/LocalStrings_fr.properties|  22 
 .../tribes/tipis/LocalStrings_ja.properties|  22 
 .../tribes/tipis/LocalStrings_ko.properties|  22 
 .../tribes/tipis/LocalStrings_zh_CN.properties |  20 
 .../catalina/tribes/tipis/ReplicatedMap.java   |  61 +++
 .../catalina/tribes/transport/AbstractRxTask.java  |   8 +-
 .../tribes/transport/MultiPointSender.java |   1 -
 .../catalina/tribes/transport/PooledSender.java|  20 +---
 .../catalina/tribes/transport/RxTaskPool.java  |  27 ++---
 .../tribes/transport/bio/MultipointBioSender.java  |  26 +++--
 .../tribes/transport/nio/ParallelNioSender.java|  40 ---
 .../catalina/tribes/util/ExecutorFactory.java  |   2 +-
 48 files changed, 444 insertions(+), 286 deletions(-)

diff --git a/java/org/apache/catalina/ha/ClusterDeployer.java 
b/java/org/apache/catalina/ha/ClusterDeployer.java
index 61798fe..a8dbb92 100644
--- a/java/org/apache/catalina/ha/ClusterDeployer.java
+++ b/java/org/apache/catalina/ha/ClusterDeployer.java
@@ -26,8 +26,6 @@ import org.apache.catalina.tribes.ChannelListener;
 /**
  * A ClusterDeployer interface allows to plug in and out the
  * different deployment implementations
- *
- * @author Filip Hanik
  */
 public interface ClusterDeployer extends ChannelListener {
 /**
@@ -42,7 +40,7 @@ public interface ClusterDeployer extends ChannelListener {
 
 /**
  * Stops the cluster deployer, the owning container will invoke this
- * @throws LifecycleException
+ * @throws LifecycleException Error stopping cluster deployer
  */
 public void stop() throws LifecycleException;
 
diff --git a/java/org/apache/catalina/ha/ClusterListener.java 
b/java/org/apache/catalina/ha/ClusterListener.java
index be9509f..348b136 100644
--- a/java/org/apache/catalina/ha/ClusterListener.java
+++ b/java/org/apache/catalina/ha/ClusterListener.java
@@ -21,6 +21,8 @@ import java.io.Serializable;
 
 import org.apache.catalina.tribes.ChannelListener;
 import org.apache.catalina.tribes.Member;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 
 
 /**
@@ -28,12 +30,10 @@ import org.apache.catalina.tribes.Member;
  * node is failed.
  *
  * @author Peter Rossbach
- * @author Filip Hanik
  */
 public abstract class ClusterListener implements ChannelListener {
 
-private static final 

[tomcat] branch 7.0.x updated (deab644 -> 7de970e)

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from deab644  Add more charsets to CharsetCache for the HPE JVM on HP-UX
 new eceb9d1  Align with 9.0.x/8/5/x. Improve i18n
 new 5721fb0  Align with 9.0.x/8.5.x. Identified during SpotBugs back-ports.
 new 459b3f3  SpotBugs fixes back-ports and additional clean-up spotted 
along the way
 new dbb7d6a  Javadoc fixes (copied from 8.5.x)
 new 420c2b6  SpotBugs fixes (incomplete) for Jasper and better align with 
8.5.x
 new 7de970e  More SpotBugs fixes and associated alignment with 8.5.x/9.0.x

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../catalina/ant/jmx/JMXAccessorConditionBase.java |   4 +-
 .../catalina/core/ApplicationFilterConfig.java |   2 +-
 java/org/apache/catalina/ha/ClusterDeployer.java   |   4 +-
 java/org/apache/catalina/ha/ClusterListener.java   |  16 +--
 .../catalina/ha/deploy/FileMessageFactory.java |  66 --
 .../catalina/ha/deploy/LocalStrings.properties |   6 +
 .../catalina/ha/deploy/LocalStrings_de.properties  |   2 +
 .../catalina/ha/deploy/LocalStrings_es.properties  |   2 +
 .../catalina/ha/deploy/LocalStrings_fr.properties  |   6 +
 .../catalina/ha/deploy/LocalStrings_ja.properties  |   6 +
 .../catalina/ha/deploy/LocalStrings_ko.properties  |   6 +
 .../ha/deploy/LocalStrings_zh_CN.properties|   2 +
 .../apache/catalina/ha/tcp/ReplicationValve.java   | 133 -
 .../catalina/loader/WebappClassLoaderBase.java |  22 ++--
 .../catalina/manager/LocalStrings.properties   |   1 +
 .../catalina/manager/LocalStrings_fr.properties|   1 +
 .../catalina/manager/LocalStrings_ja.properties|   1 +
 .../catalina/manager/LocalStrings_ko.properties|   1 +
 .../catalina/manager/LocalStrings_ru.properties|   1 +
 .../catalina/manager/LocalStrings_zh_CN.properties |   1 +
 .../apache/catalina/manager/ManagerServlet.java|  39 +++---
 .../catalina/manager/StatusManagerServlet.java |   7 --
 .../mbeans/JmxRemoteLifecycleListener.java |  27 +
 java/org/apache/catalina/realm/JAASRealm.java  |  11 +-
 java/org/apache/catalina/realm/LockOutRealm.java   |   2 +-
 .../apache/catalina/security/SecurityConfig.java   |  33 +++--
 java/org/apache/catalina/session/FileStore.java|  17 ++-
 .../catalina/session/LocalStrings.properties   |   2 +
 .../catalina/session/LocalStrings_es.properties|   1 +
 .../catalina/session/LocalStrings_fr.properties|   2 +
 .../catalina/session/LocalStrings_ja.properties|   2 +
 .../catalina/session/LocalStrings_ko.properties|   2 +
 .../catalina/session/LocalStrings_zh_CN.properties |   2 +
 .../apache/catalina/session/StandardManager.java   |   8 +-
 java/org/apache/catalina/startup/Bootstrap.java| 122 +--
 .../org/apache/catalina/startup/ContextConfig.java |   6 +-
 .../catalina/startup/LocalStrings.properties   |   2 +
 .../catalina/startup/LocalStrings_fr.properties|   2 +
 .../catalina/startup/LocalStrings_ja.properties|   2 +
 .../catalina/startup/LocalStrings_ko.properties|   2 +
 .../catalina/startup/LocalStrings_zh_CN.properties |   1 +
 java/org/apache/catalina/startup/Tomcat.java   |   4 +-
 .../apache/catalina/tribes/ChannelListener.java|   1 -
 java/org/apache/catalina/tribes/Member.java|   7 +-
 .../catalina/tribes/group/ChannelCoordinator.java  |   8 +-
 .../apache/catalina/tribes/group/GroupChannel.java |   5 +-
 .../group/interceptors/TcpPingInterceptor.java |   4 +-
 .../group/interceptors/ThroughputInterceptor.java  |  10 +-
 .../org/apache/catalina/tribes/io/ChannelData.java |  22 ++--
 .../org/apache/catalina/tribes/io/XByteBuffer.java |   7 +-
 .../tribes/membership/McastServiceImpl.java|   3 +-
 .../catalina/tribes/membership/Membership.java |  34 --
 .../tribes/tipis/AbstractReplicatedMap.java|  21 ++--
 .../catalina/tribes/tipis/LazyReplicatedMap.java   |  21 +++-
 .../tribes/tipis}/LocalStrings.properties  |  14 +--
 .../tribes/tipis}/LocalStrings_de.properties   |   7 +-
 .../tribes/tipis}/LocalStrings_es.properties   |   5 +-
 .../tribes/tipis/LocalStrings_fr.properties}   |   8 +-
 .../tribes/tipis/LocalStrings_ja.properties|  22 
 .../tribes/tipis}/LocalStrings_ko.properties   |  13 +-
 .../tribes/tipis/LocalStrings_zh_CN.properties}|   9 +-
 .../catalina/tribes/tipis/ReplicatedMap.java   |  61 ++
 .../catalina/tribes/transport/AbstractRxTask.java  |   8 +-
 .../tribes/transport/MultiPointSender.java |   1 -
 .../catalina/tribes/transport/PooledSender.java|  20 +---
 

[tomcat] 06/06: More SpotBugs fixes and associated alignment with 8.5.x/9.0.x

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 7de970e4e37ac6124453759fb1a1a8b4273ed6be
Author: Mark Thomas 
AuthorDate: Thu Nov 14 11:23:39 2019 +

More SpotBugs fixes and associated alignment with 8.5.x/9.0.x
---
 .../apache/jasper/compiler/JspRuntimeContext.java  |  7 +++--
 .../jasper/resources/LocalStrings.properties   |  1 +
 .../jasper/resources/LocalStrings_fr.properties|  1 +
 .../jasper/resources/LocalStrings_ja.properties|  1 +
 .../jasper/resources/LocalStrings_ko.properties|  1 +
 .../apache/jasper/servlet/JspServletWrapper.java   | 30 --
 java/org/apache/juli/logging/LogFactory.java   | 22 ++--
 .../apache/tomcat/buildutil/translate/Utils.java   |  6 -
 8 files changed, 45 insertions(+), 24 deletions(-)

diff --git a/java/org/apache/jasper/compiler/JspRuntimeContext.java 
b/java/org/apache/jasper/compiler/JspRuntimeContext.java
index 792f398..13f4a24 100644
--- a/java/org/apache/jasper/compiler/JspRuntimeContext.java
+++ b/java/org/apache/jasper/compiler/JspRuntimeContext.java
@@ -19,6 +19,7 @@ package org.apache.jasper.compiler;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FilePermission;
+import java.io.IOException;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.security.CodeSource;
@@ -606,8 +607,10 @@ public final class JspRuntimeContext {
 permissions.add(
 new FilePermission(jndiUrl,"read") );
 }
-} catch(Exception e) {
-context.log("Security Init for context failed",e);
+} catch (IOException e) {
+context.log(Localizer.getMessage("jsp.error.security"), e);
+} catch (RuntimeException e) {
+context.log(Localizer.getMessage("jsp.error.security"), e);
 }
 }
 return new SecurityHolder(source, permissions);
diff --git a/java/org/apache/jasper/resources/LocalStrings.properties 
b/java/org/apache/jasper/resources/LocalStrings.properties
index f63d840..5c6d87b 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -173,6 +173,7 @@ jsp.error.prolog_config_encoding_mismatch=Page-encoding 
specified in XML prolog
 jsp.error.prolog_pagedir_encoding_mismatch=Page-encoding specified in XML 
prolog [{0}] is different from that specified in page directive [{1}]
 jsp.error.quotes.unterminated=Unterminated quotes
 jsp.error.scripting.variable.missing_name=Unable to determine scripting 
variable name from attribute [{0}]
+jsp.error.security=Security initialization failed for context
 jsp.error.servlet.destroy.failed=Exception during Servlet.destroy() for JSP 
page
 jsp.error.setLastModified=Unable to set last modified date for file [{0}]
 jsp.error.signature.classnotfound=The class [{0}] specified in the method 
signature in TLD for the function [{1}] cannot be found. [{2}]
diff --git a/java/org/apache/jasper/resources/LocalStrings_fr.properties 
b/java/org/apache/jasper/resources/LocalStrings_fr.properties
index e1fb996..c448801 100644
--- a/java/org/apache/jasper/resources/LocalStrings_fr.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_fr.properties
@@ -171,6 +171,7 @@ jsp.error.prolog_config_encoding_mismatch=Le page-encoding 
spécifié dans le pr
 jsp.error.prolog_pagedir_encoding_mismatch=L''encodage spécifié dans le 
prologue XML [{0}] est différent de celui spécifié dans la directive de page 
[{1}]
 jsp.error.quotes.unterminated=Guillemets non terminés
 jsp.error.scripting.variable.missing_name=Incapable de déterminer le nom de 
variable scripting d''après l''attribut [{0}]
+jsp.error.security=L'initialisation de la sécurité a échouée pour le contexte
 jsp.error.servlet.destroy.failed=Erreur pendant le Servlet.destroy() de la 
page JSP
 jsp.error.setLastModified=Impossible de fixer la date de dernière modification 
pour le fichier [{0}]
 jsp.error.signature.classnotfound=La classe [{0}] spećifié dans la signature 
de la méthode dans la TLD pour la fonction [{1}] n''a pas pu être trouvée [{2}]
diff --git a/java/org/apache/jasper/resources/LocalStrings_ja.properties 
b/java/org/apache/jasper/resources/LocalStrings_ja.properties
index a495143..0924af7 100644
--- a/java/org/apache/jasper/resources/LocalStrings_ja.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_ja.properties
@@ -173,6 +173,7 @@ 
jsp.error.prolog_config_encoding_mismatch=XML導入部で指定されたpage-enc
 jsp.error.prolog_pagedir_encoding_mismatch=XML導入部で指定されたpage-encoding [{0}] 
がpage指示子中の指定 [{1}] と違います
 jsp.error.quotes.unterminated=引用符が終了していません
 jsp.error.scripting.variable.missing_name=属性 [{0}] からスクリプト変数名を決定できません
+jsp.error.security=コンテキストのセキュリティの初期化に失敗しました。
 

[tomcat] 01/06: Align with 9.0.x/8/5/x. Improve i18n

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit eceb9d12f21b78b3bd6da1c9f176e135563c61c1
Author: Mark Thomas 
AuthorDate: Wed Nov 13 18:22:37 2019 +

Align with 9.0.x/8/5/x. Improve i18n
---
 .../catalina/ha/deploy/FileMessageFactory.java | 66 --
 .../catalina/ha/deploy/LocalStrings.properties |  6 ++
 .../catalina/ha/deploy/LocalStrings_de.properties  |  2 +
 .../catalina/ha/deploy/LocalStrings_es.properties  |  2 +
 .../catalina/ha/deploy/LocalStrings_fr.properties  |  6 ++
 .../catalina/ha/deploy/LocalStrings_ja.properties  |  6 ++
 .../catalina/ha/deploy/LocalStrings_ko.properties  |  6 ++
 .../ha/deploy/LocalStrings_zh_CN.properties|  2 +
 8 files changed, 55 insertions(+), 41 deletions(-)

diff --git a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java 
b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
index fec3522..892ea0c 100644
--- a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
+++ b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
@@ -42,14 +42,12 @@ import org.apache.tomcat.util.res.StringManager;
  * To force a cleanup, call cleanup() from the calling object. 
  * This class is not thread safe.
  *
- * @author Filip Hanik
  * @version 1.0
  */
 public class FileMessageFactory {
 /*--Static Variables*/
 private static final Log log = LogFactory.getLog(FileMessageFactory.class);
-private static final StringManager sm =
-StringManager.getManager(Constants.Package);
+private static final StringManager sm = 
StringManager.getManager(FileMessageFactory.class);
 
 /**
  * The number of bytes that we read from file
@@ -68,7 +66,7 @@ public class FileMessageFactory {
 protected boolean openForWrite;
 
 /**
- * Once the factory is used, it can not be reused.
+ * Once the factory is used, it cannot be reused.
  */
 protected boolean closed = false;
 
@@ -107,8 +105,7 @@ public class FileMessageFactory {
  * everything is worked as expected, messages will spend very little time 
in
  * the buffer.
  */
-protected Map msgBuffer =
-new ConcurrentHashMap();
+protected Map msgBuffer = new ConcurrentHashMap();
 
 /**
  * The bytes that we hold the data in, not thread safe.
@@ -239,36 +236,26 @@ public class FileMessageFactory {
  */
 public boolean writeMessage(FileMessage msg)
 throws IllegalArgumentException, IOException {
-if (!openForWrite)
-throw new IllegalArgumentException(
-"Can't write message, this factory is reading.");
+if (!openForWrite) {
+throw new 
IllegalArgumentException(sm.getString("fileMessageFactory.cannotWrite"));
+}
 if (log.isDebugEnabled())
 log.debug("Message " + msg + " data " + 
HexUtils.toHexString(msg.getData())
 + " data length " + msg.getDataLength() + " out " + out);
 
 if (msg.getMessageNumber() <= lastMessageProcessed.get()) {
 // Duplicate of message already processed
-log.warn("Receive Message again -- Sender ActTimeout too short [ 
name: "
-+ msg.getContextName()
-+ " war: "
-+ msg.getFileName()
-+ " data: "
-+ HexUtils.toHexString(msg.getData())
-+ " data length: " + msg.getDataLength() + " ]");
+log.warn(sm.getString("fileMessageFactory.duplicateMessage", 
msg.getContextName(), msg.getFileName(),
+HexUtils.toHexString(msg.getData()), 
Integer.valueOf(msg.getDataLength(;
 return false;
 }
 
 FileMessage previous =
 msgBuffer.put(Long.valueOf(msg.getMessageNumber()), msg);
-if (previous !=null) {
+if (previous != null) {
 // Duplicate of message not yet processed
-log.warn("Receive Message again -- Sender ActTimeout too short [ 
name: "
-+ msg.getContextName()
-+ " war: "
-+ msg.getFileName()
-+ " data: "
-+ HexUtils.toHexString(msg.getData())
-+ " data length: " + msg.getDataLength() + " ]");
+log.warn(sm.getString("fileMessageFactory.duplicateMessage", 
msg.getContextName(), msg.getFileName(),
+HexUtils.toHexString(msg.getData()), 
Integer.valueOf(msg.getDataLength(;
 return false;
 }
 
@@ -337,24 +324,22 @@ public class FileMessageFactory {
  * asked to do. Invoked by readMessage/writeMessage before those methods
  * proceed.
  *
- * @param openForWrite
- *boolean
- * @throws IllegalArgumentException
+ * @param openForWrite The 

[tomcat] 02/06: Align with 9.0.x/8.5.x. Identified during SpotBugs back-ports.

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 5721fb0d0f5a5551de60a6d5c561b1dd9aa65c5c
Author: Mark Thomas 
AuthorDate: Wed Nov 13 19:24:19 2019 +

Align with 9.0.x/8.5.x. Identified during SpotBugs back-ports.
---
 .../catalina/ant/jmx/JMXAccessorConditionBase.java |   4 +-
 .../catalina/core/ApplicationFilterConfig.java |   2 +-
 .../apache/catalina/ha/tcp/ReplicationValve.java   | 133 -
 .../catalina/manager/LocalStrings.properties   |   1 +
 .../catalina/manager/LocalStrings_fr.properties|   1 +
 .../catalina/manager/LocalStrings_ja.properties|   1 +
 .../catalina/manager/LocalStrings_ko.properties|   1 +
 .../catalina/manager/LocalStrings_ru.properties|   1 +
 .../catalina/manager/LocalStrings_zh_CN.properties |   1 +
 .../apache/catalina/manager/ManagerServlet.java|  39 +++---
 .../catalina/manager/StatusManagerServlet.java |   7 --
 .../mbeans/JmxRemoteLifecycleListener.java |  27 +
 java/org/apache/catalina/tribes/Member.java|   7 +-
 13 files changed, 136 insertions(+), 89 deletions(-)

diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorConditionBase.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorConditionBase.java
index 8348213..a13fe90 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorConditionBase.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorConditionBase.java
@@ -150,8 +150,8 @@ public abstract class JMXAccessorConditionBase extends 
ProjectComponent implemen
  * from jmxOpen Task).
  *
  * @return active JMXConnection
- * @throws MalformedURLException
- * @throws IOException
+ * @throws MalformedURLException Invalid URL for JMX server
+ * @throws IOException Connection error
  */
 protected MBeanServerConnection getJMXConnection()
 throws MalformedURLException, IOException {
diff --git a/java/org/apache/catalina/core/ApplicationFilterConfig.java 
b/java/org/apache/catalina/core/ApplicationFilterConfig.java
index 39c85ae..47f65be 100644
--- a/java/org/apache/catalina/core/ApplicationFilterConfig.java
+++ b/java/org/apache/catalina/core/ApplicationFilterConfig.java
@@ -62,7 +62,7 @@ public final class ApplicationFilterConfig implements 
FilterConfig, Serializable
 static final StringManager sm =
 StringManager.getManager(Constants.Package);
 
-private final Log log = LogFactory.getLog(ApplicationFilterConfig.class); 
// must not be static
+private transient Log log = 
LogFactory.getLog(ApplicationFilterConfig.class); // must not be static
 
 /**
  * Empty String collection to serve as the basis for empty enumerations.
diff --git a/java/org/apache/catalina/ha/tcp/ReplicationValve.java 
b/java/org/apache/catalina/ha/tcp/ReplicationValve.java
index 8874119..5690350 100644
--- a/java/org/apache/catalina/ha/tcp/ReplicationValve.java
+++ b/java/org/apache/catalina/ha/tcp/ReplicationValve.java
@@ -42,6 +42,8 @@ import org.apache.catalina.ha.ClusterValve;
 import org.apache.catalina.ha.session.DeltaManager;
 import org.apache.catalina.ha.session.DeltaSession;
 import org.apache.catalina.valves.ValveBase;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -58,14 +60,12 @@ import org.apache.tomcat.util.res.StringManager;
  * 
  *
  * @author Craig R. McClanahan
- * @author Filip Hanik
  * @author Peter Rossbach
  */
 public class ReplicationValve
 extends ValveBase implements ClusterValve {
 
-private static final org.apache.juli.logging.Log log =
-org.apache.juli.logging.LogFactory.getLog( ReplicationValve.class );
+private static final Log log = LogFactory.getLog(ReplicationValve.class);
 
 // - Instance Variables
 
@@ -100,13 +100,21 @@ public class ReplicationValve
  */
 protected boolean doProcessingStats = false;
 
-protected long totalRequestTime = 0;
-protected long totalSendTime = 0;
-protected long nrOfRequests = 0;
-protected long lastSendTime = 0;
-protected long nrOfFilterRequests = 0;
-protected long nrOfSendRequests = 0;
-protected long nrOfCrossContextSendRequests = 0;
+/*
+ * Note: The statistics are volatile to ensure the concurrent updates do 
not
+ *   corrupt them but it is still possible that:
+ *   - some updates may be lost;
+ *   - the individual statistics may not be consistent which each 
other.
+ *   This is a deliberate design choice to reduce the requirement for
+ *   synchronization.
+ */
+protected volatile long totalRequestTime = 0;
+protected volatile long totalSendTime = 0;
+protected volatile long nrOfRequests = 0;
+protected volatile long lastSendTime = 0;
+protected volatile long 

[tomcat] 04/06: Javadoc fixes (copied from 8.5.x)

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit dbb7d6a92d846d454c6f48080b67528f1e122004
Author: Mark Thomas 
AuthorDate: Wed Nov 13 22:37:43 2019 +

Javadoc fixes (copied from 8.5.x)
---
 java/org/apache/el/util/ReflectionUtil.java | 19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/el/util/ReflectionUtil.java 
b/java/org/apache/el/util/ReflectionUtil.java
index 17cbd76..9d9e761 100644
--- a/java/org/apache/el/util/ReflectionUtil.java
+++ b/java/org/apache/el/util/ReflectionUtil.java
@@ -78,9 +78,12 @@ public class ReflectionUtil {
 }
 
 /**
- * Converts an array of Class names to Class types
- * @param s
- * @throws ClassNotFoundException
+ * Converts an array of Class names to Class types.
+ * @param s  The array of class names
+ * @return An array of Class instance where the element at index i in the
+ * result is an instance of the class with the name at index i in
+ * the input
+ * @throws ClassNotFoundException If a class of a given name cannot be 
found
  */
 public static Class[] toTypeArray(String[] s) throws 
ClassNotFoundException {
 if (s == null)
@@ -93,8 +96,10 @@ public class ReflectionUtil {
 }
 
 /**
- * Converts an array of Class types to Class names
- * @param c
+ * Converts an array of Class types to Class names.
+ * @param c The array of class instances
+ * @return An array of Class names where the element at index i in the
+ * result is the name of the class instance at index i in the input
  */
 public static String[] toTypeNameArray(Class[] c) {
 if (c == null)
@@ -113,7 +118,8 @@ public class ReflectionUtil {
  * @param paramTypes the parameter types to use
  * @param paramValues the parameter values
  * @return the method specified
- * @throws MethodNotFoundException
+ * @throws MethodNotFoundException If a method cannot be found that matches
+ * the given criteria
  */
 /*
  * This class duplicates code in javax.el.Util. When making changes keep
@@ -123,6 +129,7 @@ public class ReflectionUtil {
 public static Method getMethod(Object base, Object property,
 Class[] paramTypes, Object[] paramValues)
 throws MethodNotFoundException {
+
 if (base == null || property == null) {
 throw new MethodNotFoundException(MessageFactory.get(
 "error.method.notfound", base, property,


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[VOTE] Release Apache Tomcat 9.0.28

2019-11-14 Thread Mark Thomas
The proposed Apache Tomcat 9.0.28 release is now available for voting.

The major changes compared to the 9.0.27 release are:

- Improvements to Async error handling

- Stricter processing of HTTP headers when looking for specific token
  values

- Fix various issues that could lead to modification to a JSP not being
  reflected in the served page

Along with lots of other bug fixes and improvements.

For full details, see the changelog:
https://ci.apache.org/projects/tomcat/tomcat9/docs/changelog.html

It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.28/
The Maven staging repo is:
https://repository.apache.org/content/repositories/orgapachetomcat-1235/
The tag is:
https://github.com/apache/tomcat/tree/9.0.28


The proposed 9.0.28 release is:
[ ] Broken - do not release
[ ] Stable - go ahead and release as 9.0.28

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 05/05: Fix some of the SpotBugs warnings in o.a.tomcat

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 547f25c49ecbd179a561de4e81cdc29ee8d1c6ed
Author: Mark Thomas 
AuthorDate: Thu Nov 14 10:48:15 2019 +

Fix some of the SpotBugs warnings in o.a.tomcat
---
 .../apache/tomcat/buildutil/translate/Utils.java   |  6 ++-
 res/findbugs/filter-false-positives.xml| 61 --
 2 files changed, 61 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/buildutil/translate/Utils.java 
b/java/org/apache/tomcat/buildutil/translate/Utils.java
index 8b69c79..5eb015f 100644
--- a/java/org/apache/tomcat/buildutil/translate/Utils.java
+++ b/java/org/apache/tomcat/buildutil/translate/Utils.java
@@ -78,7 +78,11 @@ public class Utils {
 
 
 static void processDirectory(File root, File dir, Map 
translations) throws IOException {
-for (File f : dir.listFiles()) {
+File[] files = dir.listFiles();
+if (files == null) {
+throw new IllegalArgumentException("Not a directory [" + 
dir.getAbsolutePath() + "]");
+}
+for (File f : files) {
 if (f.isDirectory()) {
 processDirectory(root, f, translations);
 } else if (f.isFile()) {
diff --git a/res/findbugs/filter-false-positives.xml 
b/res/findbugs/filter-false-positives.xml
index fd1b463..c691b6c 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -1011,6 +1011,14 @@
 
   
   
+
+
+
+  
+  
+
+  
+  
 
 
 
@@ -1063,6 +1071,11 @@
 
   
   
+
+
+
+  
+  
 
 
@@ -1070,6 +1083,15 @@
 
   
   
+
+
+
+  
+  
+
+
+  
+  
 
 
 
@@ -1110,6 +1132,15 @@
 
   
   
+
+
+  
+  
+
+
+  
+  
 
 
 
@@ -1130,14 +1161,19 @@
 
   
   
-
-
-
-
+
+
+  
+  
+
+
   
   
 
-
+
+  
+  
+
 
 
   
@@ -1154,6 +1190,15 @@
 
   
   
+
+
+
+  
+  
+
+
+  
+  
 
 
@@ -1182,6 +1227,12 @@
 
   
   
+
+
+
+
+  
+  
 
 
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 04/05: Jasper

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 9a95146a69e580b4fc146c2f2f6c7c67a4e2cc91
Author: Mark Thomas 
AuthorDate: Thu Nov 14 10:42:01 2019 +

Jasper
---
 test/org/apache/jasper/el/TestJasperELResolver.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/jasper/el/TestJasperELResolver.java 
b/test/org/apache/jasper/el/TestJasperELResolver.java
index d659655..948465c 100644
--- a/test/org/apache/jasper/el/TestJasperELResolver.java
+++ b/test/org/apache/jasper/el/TestJasperELResolver.java
@@ -19,6 +19,7 @@ package org.apache.jasper.el;
 import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.el.ELResolver;
 import javax.servlet.jsp.el.ImplicitObjectELResolver;
@@ -61,7 +62,7 @@ public class TestJasperELResolver {
 Assert.assertEquals(9 + count,
 ((ELResolver[])getField("resolvers", resolver)).length);
 Assert.assertEquals(Integer.valueOf(9 + count),
-getField("size", resolver));
+Integer.valueOf(((AtomicInteger) getField("resolversSize", 
resolver)).get()));
 }
 
 private static final Object getField(String name, Object target)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 01/05: Fix SpotBug failures in Jasper

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 665a6da487947b40e45c631191d8e831c54704e2
Author: Mark Thomas 
AuthorDate: Thu Nov 14 10:29:05 2019 +

Fix SpotBug failures in Jasper
---
 .../apache/jasper/compiler/JspRuntimeContext.java  |  5 +--
 .../apache/jasper/compiler/TagFileProcessor.java   |  2 +-
 java/org/apache/jasper/el/JasperELResolver.java| 18 ++
 .../jasper/resources/LocalStrings.properties   |  1 +
 .../jasper/resources/LocalStrings_fr.properties|  1 +
 .../jasper/resources/LocalStrings_ja.properties|  1 +
 .../jasper/resources/LocalStrings_ko.properties|  1 +
 .../apache/jasper/runtime/JspRuntimeLibrary.java   |  2 +-
 .../apache/jasper/servlet/JspServletWrapper.java   |  4 +--
 res/findbugs/filter-false-positives.xml| 40 +-
 10 files changed, 54 insertions(+), 21 deletions(-)

diff --git a/java/org/apache/jasper/compiler/JspRuntimeContext.java 
b/java/org/apache/jasper/compiler/JspRuntimeContext.java
index 78f3f35..87157ff 100644
--- a/java/org/apache/jasper/compiler/JspRuntimeContext.java
+++ b/java/org/apache/jasper/compiler/JspRuntimeContext.java
@@ -19,6 +19,7 @@ package org.apache.jasper.compiler;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FilePermission;
+import java.io.IOException;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLClassLoader;
@@ -543,8 +544,8 @@ public final class JspRuntimeContext {
 // Allow the JSP to access 
org.apache.jasper.runtime.HttpJspBase
 permissions.add( new RuntimePermission(
 "accessClassInPackage.org.apache.jasper.runtime") );
-} catch(Exception e) {
-context.log("Security Init for context failed",e);
+} catch (RuntimeException | IOException e) {
+context.log(Localizer.getMessage("jsp.error.security"), e);
 }
 }
 return new SecurityHolder(source, permissions);
diff --git a/java/org/apache/jasper/compiler/TagFileProcessor.java 
b/java/org/apache/jasper/compiler/TagFileProcessor.java
index 910cb47..d26ba94 100644
--- a/java/org/apache/jasper/compiler/TagFileProcessor.java
+++ b/java/org/apache/jasper/compiler/TagFileProcessor.java
@@ -599,7 +599,7 @@ class TagFileProcessor {
 entry.getValue());
 }
 }
-} catch (Exception e) {
+} catch (RuntimeException | ReflectiveOperationException 
e) {
 // ignore errors
 }
 
diff --git a/java/org/apache/jasper/el/JasperELResolver.java 
b/java/org/apache/jasper/el/JasperELResolver.java
index 3eaab88..07d07a2 100644
--- a/java/org/apache/jasper/el/JasperELResolver.java
+++ b/java/org/apache/jasper/el/JasperELResolver.java
@@ -18,6 +18,7 @@
 package org.apache.jasper.el;
 
 import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.el.ArrayELResolver;
 import javax.el.BeanELResolver;
@@ -41,15 +42,14 @@ public class JasperELResolver extends CompositeELResolver {
 
 private static final int STANDARD_RESOLVERS_COUNT = 9;
 
-private int size;
-private ELResolver[] resolvers;
+private AtomicInteger resolversSize = new AtomicInteger(0);
+private volatile ELResolver[] resolvers;
 private final int appResolversSize;
 
 public JasperELResolver(List appResolvers,
 ELResolver streamResolver) {
 appResolversSize = appResolvers.size();
 resolvers = new ELResolver[appResolversSize + 
STANDARD_RESOLVERS_COUNT];
-size = 0;
 
 add(new ImplicitObjectELResolver());
 for (ELResolver appResolver : appResolvers) {
@@ -69,6 +69,8 @@ public class JasperELResolver extends CompositeELResolver {
 public synchronized void add(ELResolver elResolver) {
 super.add(elResolver);
 
+int size = resolversSize.get();
+
 if (resolvers.length > size) {
 resolvers[size] = elResolver;
 } else {
@@ -78,7 +80,7 @@ public class JasperELResolver extends CompositeELResolver {
 
 resolvers = nr;
 }
-size ++;
+resolversSize.incrementAndGet();
 }
 
 @Override
@@ -106,6 +108,7 @@ public class JasperELResolver extends CompositeELResolver {
 start = 1;
 }
 
+int size = resolversSize.get();
 for (int i = start; i < size; i++) {
 result = resolvers[i].getValue(context, base, property);
 if (context.isPropertyResolved()) {
@@ -143,6 +146,7 @@ public class JasperELResolver extends CompositeELResolver {
 // skip collection (map, resource, list, and array) resolvers
 index += 4;
 // call bean and the rest of resolvers
+int 

[tomcat] 03/05: Fix SpotBugs failures in JULI and naming

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 4467e6d8c95bb3037904ba4638eb26b2b15cbdce
Author: Mark Thomas 
AuthorDate: Thu Nov 14 10:33:34 2019 +

Fix SpotBugs failures in JULI and naming
---
 res/findbugs/filter-false-positives.xml | 12 
 1 file changed, 12 insertions(+)

diff --git a/res/findbugs/filter-false-positives.xml 
b/res/findbugs/filter-false-positives.xml
index b2ed8f1..fd1b463 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -980,6 +980,18 @@
 
   
   
+
+
+
+
+  
+  
+
+
+
+  
+  
 
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated (36291e6 -> 547f25c)

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 36291e6  SpotBugs fixes (incomplete) for Jasper
 new 665a6da  Fix SpotBug failures in Jasper
 new ee6ad62  Align with 9.0.x
 new 4467e6d  Fix SpotBugs failures in JULI and naming
 new 9a95146  Jasper
 new 547f25c  Fix some of the SpotBugs warnings in o.a.tomcat

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/jasper/compiler/JspRuntimeContext.java  |   5 +-
 .../apache/jasper/compiler/TagFileProcessor.java   |   2 +-
 java/org/apache/jasper/el/JasperELResolver.java|  18 ++--
 .../jasper/resources/LocalStrings.properties   |   1 +
 .../jasper/resources/LocalStrings_fr.properties|   1 +
 .../jasper/resources/LocalStrings_ja.properties|   1 +
 .../jasper/resources/LocalStrings_ko.properties|   1 +
 .../apache/jasper/runtime/JspRuntimeLibrary.java   |   2 +-
 .../apache/jasper/servlet/JspServletWrapper.java   |   4 +-
 java/org/apache/juli/logging/LogFactory.java   |   4 +-
 .../apache/tomcat/buildutil/translate/Utils.java   |   6 +-
 res/findbugs/filter-false-positives.xml| 113 ++---
 .../org/apache/jasper/el/TestJasperELResolver.java |   3 +-
 13 files changed, 130 insertions(+), 31 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 02/05: Align with 9.0.x

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit ee6ad621bb4609ac513f0bcc40818ad86840d326
Author: Mark Thomas 
AuthorDate: Thu Nov 14 10:33:17 2019 +

Align with 9.0.x
---
 java/org/apache/juli/logging/LogFactory.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/java/org/apache/juli/logging/LogFactory.java 
b/java/org/apache/juli/logging/LogFactory.java
index 9ba53a3..3cd4562 100644
--- a/java/org/apache/juli/logging/LogFactory.java
+++ b/java/org/apache/juli/logging/LogFactory.java
@@ -17,7 +17,6 @@
 package org.apache.juli.logging;
 
 import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import java.nio.file.FileSystems;
 import java.util.ServiceLoader;
 import java.util.logging.LogManager;
@@ -133,8 +132,7 @@ public class LogFactory {
 
 try {
 return discoveredLogConstructor.newInstance(name);
-} catch (InstantiationException | IllegalAccessException | 
IllegalArgumentException |
-InvocationTargetException e) {
+} catch (ReflectiveOperationException | IllegalArgumentException e) {
 throw new LogConfigurationException(e);
 }
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat 9.0.28

2019-11-14 Thread Mark Thomas
On 14/11/2019 10:27, Mark Thomas wrote:



> The proposed 9.0.28 release is:
> [ ] Broken - do not release
> [ ] Stable - go ahead and release as 9.0.28

It isn't broken but I spotted a missing release date in the changelog
for 9.0.27. It is trivial but the changelog is one of the files that is
widely read. I don't want the "release in progress" text to confuse people.

I'm leaning towards re-rolling the release since it isn't that much work.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Add 8.5.47 release date

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 5c4b290  Add 8.5.47 release date
5c4b290 is described below

commit 5c4b290c1c6cdd40234c1fdc21ca39b2e47859cd
Author: Mark Thomas 
AuthorDate: Thu Nov 14 10:59:12 2019 +

Add 8.5.47 release date
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a2f9c89..5867eda 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -216,7 +216,7 @@
 
   
 
-
+
   
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Add missing release date for 9.0.27

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new d7f64c6  Add missing release date for 9.0.27
d7f64c6 is described below

commit d7f64c64dbd4ebc7ef1fd1d73da60e8d2720a657
Author: Mark Thomas 
AuthorDate: Thu Nov 14 10:58:36 2019 +

Add missing release date for 9.0.27
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1d6ead2..efc0ab6 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -231,7 +231,7 @@
 
   
 
-
+
   
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: More SpotBugs fixes

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 2b2ed21  More SpotBugs fixes
2b2ed21 is described below

commit 2b2ed21c75bf43d66982f133f2a881c892c40462
Author: Mark Thomas 
AuthorDate: Thu Nov 14 11:22:51 2019 +

More SpotBugs fixes
---
 .../apache/tomcat/util/http/parser/HttpParser.java|  2 +-
 res/findbugs/filter-false-positives.xml   | 19 +++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java 
b/java/org/apache/tomcat/util/http/parser/HttpParser.java
index f76ddcb..90d7e42 100644
--- a/java/org/apache/tomcat/util/http/parser/HttpParser.java
+++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java
@@ -149,7 +149,7 @@ public class HttpParser {
 // Not valid for request target.
 // Combination of multiple rules from RFC7230 and RFC 3986. Must be
 // ASCII, no controls plus a few additional characters excluded
-if (IS_CONTROL[i] || i > 127 ||
+if (IS_CONTROL[i] ||
 i == ' ' || i == '\"' || i == '#' || i == '<' || i == '>' 
|| i == '\\' ||
 i == '^' || i == '`'  || i == '{' || i == '|' || i == '}') 
{
 if (!REQUEST_TARGET_ALLOW[i]) {
diff --git a/res/findbugs/filter-false-positives.xml 
b/res/findbugs/filter-false-positives.xml
index c691b6c..a4596d0 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -1212,6 +1212,16 @@
 
   
   
+
+
+
+
+  
+  
+
+
+  
+  
 
 
 
@@ -1245,6 +1255,15 @@
 
   
   
+
+
+
+  
+  
+
+
+  
+  
 
 
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r36726 - in /dev/tomcat/tomcat-9/v9.0.28: ./ bin/ bin/embed/ src/

2019-11-14 Thread markt
Author: markt
Date: Thu Nov 14 10:16:47 2019
New Revision: 36726

Log:
Upload 9.0.28 for voting

Added:
dev/tomcat/tomcat-9/v9.0.28/
dev/tomcat/tomcat-9/v9.0.28/KEYS
dev/tomcat/tomcat-9/v9.0.28/README.html
dev/tomcat/tomcat-9/v9.0.28/RELEASE-NOTES
dev/tomcat/tomcat-9/v9.0.28/bin/
dev/tomcat/tomcat-9/v9.0.28/bin/README.html
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-deployer.tar.gz   
(with props)
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-deployer.tar.gz.asc
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-deployer.tar.gz.sha512
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-deployer.zip   (with 
props)
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-deployer.zip.asc
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-deployer.zip.sha512
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-fulldocs.tar.gz   
(with props)
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-fulldocs.tar.gz.asc
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-fulldocs.tar.gz.sha512
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-windows-x64.zip   
(with props)
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-windows-x64.zip.asc
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-windows-x64.zip.sha512
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-windows-x86.zip   
(with props)
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-windows-x86.zip.asc
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28-windows-x86.zip.sha512
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28.exe   (with props)
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28.exe.asc
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28.exe.sha512
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28.tar.gz   (with props)
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28.tar.gz.asc
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28.tar.gz.sha512
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28.zip   (with props)
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28.zip.asc
dev/tomcat/tomcat-9/v9.0.28/bin/apache-tomcat-9.0.28.zip.sha512
dev/tomcat/tomcat-9/v9.0.28/bin/embed/
dev/tomcat/tomcat-9/v9.0.28/bin/embed/apache-tomcat-9.0.28-embed.tar.gz   
(with props)
dev/tomcat/tomcat-9/v9.0.28/bin/embed/apache-tomcat-9.0.28-embed.tar.gz.asc

dev/tomcat/tomcat-9/v9.0.28/bin/embed/apache-tomcat-9.0.28-embed.tar.gz.sha512
dev/tomcat/tomcat-9/v9.0.28/bin/embed/apache-tomcat-9.0.28-embed.zip   
(with props)
dev/tomcat/tomcat-9/v9.0.28/bin/embed/apache-tomcat-9.0.28-embed.zip.asc
dev/tomcat/tomcat-9/v9.0.28/bin/embed/apache-tomcat-9.0.28-embed.zip.sha512
dev/tomcat/tomcat-9/v9.0.28/src/
dev/tomcat/tomcat-9/v9.0.28/src/apache-tomcat-9.0.28-src.tar.gz   (with 
props)
dev/tomcat/tomcat-9/v9.0.28/src/apache-tomcat-9.0.28-src.tar.gz.asc
dev/tomcat/tomcat-9/v9.0.28/src/apache-tomcat-9.0.28-src.tar.gz.sha512
dev/tomcat/tomcat-9/v9.0.28/src/apache-tomcat-9.0.28-src.zip   (with props)
dev/tomcat/tomcat-9/v9.0.28/src/apache-tomcat-9.0.28-src.zip.asc
dev/tomcat/tomcat-9/v9.0.28/src/apache-tomcat-9.0.28-src.zip.sha512

Added: dev/tomcat/tomcat-9/v9.0.28/KEYS
==
--- dev/tomcat/tomcat-9/v9.0.28/KEYS (added)
+++ dev/tomcat/tomcat-9/v9.0.28/KEYS Thu Nov 14 10:16:47 2019
@@ -0,0 +1,676 @@
+This file contains the PGP keys of various Apache developers.
+Please don't use them for email unless you have to. Their main
+purpose is code signing.
+
+Apache users: pgp < KEYS
+Apache developers:
+(pgpk -ll  && pgpk -xa ) >> this file.
+  or
+(gpg --fingerprint --list-sigs 
+ && gpg --armor --export ) >> this file.
+
+Apache developers: please ensure that your key is also available via the
+PGP keyservers (such as pgpkeys.mit.edu).
+
+
+Type Bits/KeyIDDate   User ID
+pub  2048/F22C4FED 2001/07/02 Andy Armstrong 
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: PGPfreeware 7.0.3 for non-commercial use 
+
+mQGiBDtAWuURBADZ0KUEyUkSUiTA09e7tvEbX25STsjxrR+DNTainCls+XlkVOij
+gBv216lqge9tIsS0L6hCP4OQbFf/64qVtJssX4QXdyiZGb5wpmcj0Mz602Ew8r+N
+I0S5NvmogoYWW7BlP4r61jNxO5zrr03KaijM5r4ipJdLUxyOmM6P2jRPUwCg/5gm
+bpqiYl7pXX5FgDeB36tmD+UD/06iLqOnoiKO0vMbOk7URclhCObMNrHqxTxozMTS
+B9soYURbIeArei+plYo2n+1qB12ayybjhVu3uksXRdT9bEkyxMfslvLbIpDAG8Cz
+gNftTbKx/MVS7cQU0II8BKo2Akr+1FZah+sD4ovK8SfkMXUQUbTeefTntsAQKyyU
+9M9tA/9on9tBiHFl0qVJht6N4GiJ2G689v7rS2giLgKjetjiCduxBXEgvUSuyQID
+nF9ATrpXjITwsRlGKFmpZiFm5oCeCXihIVH0u6q066xNW2AXkLVoJ1l1Rs2Z0lsb
+0cq3xEAcwAmYLKQvCtgDV8CYgWKVmPi+49rSuQn7Lo9l02OUbLQgQW5keSBBcm1z
+dHJvbmcgPGFuZHlAdGFnaXNoLmNvbT6JAFgEEBECABgFAjtAWuUICwMJCAcCAQoC
+GQEFGwMACgkQajrT9PIsT+1plgCfXAovWnVL3MjrTfcGlFSKw7GHCSYAoJkz
+x+r2ANe8/0e+u5ZcYtSaSry+uQINBDtAWuUQCAD2Qle3CH8IF3KiutapQvMF6PlT

[tomcat] branch master updated (92a198d -> 6f3d3b8)

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 92a198d  Polish. Javadoc in expected order
 new 81e407f  Increment version for next development cycyle
 new 6f3d3b8  Polish. Align with 8.5.x/7.0.x

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.properties.default  | 2 +-
 java/org/apache/jasper/servlet/JspServletWrapper.java | 3 ++-
 res/maven/mvn.properties.default  | 2 +-
 webapps/docs/changelog.xml| 4 +++-
 4 files changed, 7 insertions(+), 4 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 02/02: Polish. Align with 8.5.x/7.0.x

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 6f3d3b8d19651f862727528b367cb5956bc75155
Author: Mark Thomas 
AuthorDate: Thu Nov 14 10:16:21 2019 +

Polish. Align with 8.5.x/7.0.x
---
 java/org/apache/jasper/servlet/JspServletWrapper.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/jasper/servlet/JspServletWrapper.java 
b/java/org/apache/jasper/servlet/JspServletWrapper.java
index a422d61..dbfd731 100644
--- a/java/org/apache/jasper/servlet/JspServletWrapper.java
+++ b/java/org/apache/jasper/servlet/JspServletWrapper.java
@@ -281,6 +281,7 @@ public class JspServletWrapper {
 synchronized (this) {
 if (getReloadInternal() || tagHandlerClass == null) {
 tagHandlerClass = ctxt.load();
+// Volatile 'reload' forces in order write of 
'tagHandlerClass'
 reload = false;
 }
 }
@@ -326,7 +327,7 @@ public class JspServletWrapper {
 }
 }
 }
-target = tagHandlerClass.newInstance();
+target = tagHandlerClass.getConstructor().newInstance();
 } else {
 target = getServlet();
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 01/02: Increment version for next development cycyle

2019-11-14 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 81e407f87a924f35fa86b6476d07fdc162146489
Author: Mark Thomas 
AuthorDate: Thu Nov 14 10:16:02 2019 +

Increment version for next development cycyle
---
 build.properties.default | 2 +-
 res/maven/mvn.properties.default | 2 +-
 webapps/docs/changelog.xml   | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 233c6a2..63efecb 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -25,7 +25,7 @@
 # - Version Control Flags -
 version.major=9
 version.minor=0
-version.build=28
+version.build=29
 version.patch=0
 version.suffix=-dev
 
diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default
index 2b50dd9..3c78539 100644
--- a/res/maven/mvn.properties.default
+++ b/res/maven/mvn.properties.default
@@ -39,7 +39,7 @@ 
maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d
 maven.asf.release.repo.repositoryId=apache.releases.https
 
 # Release version info
-maven.asf.release.deploy.version=9.0.28
+maven.asf.release.deploy.version=9.0.29
 
 #Where do we load the libraries from
 tomcat.lib.path=../../output/build/lib
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index bf9dacc..1d6ead2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -44,7 +44,9 @@
   They eventually become mixed with the numbered issues (i.e., numbered
   issues do not "pop up" wrt. others).
 -->
-
+
+
+
   
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Nexus: Staging Completed

2019-11-14 Thread Nexus Repository Manager
Message from: https://repository.apache.orgDeployer properties:"userAgent" = "maven-artifact/2.2.1 (Java 1.8.0_222; Windows 7 6.1)""userId" = "markt""ip" = "213.121.9.136"Details:The following artifacts have been staged/org/apache/tomcat/tomcat-i18n-de/9.0.28/tomcat-i18n-de-9.0.28.jar(SHA1: c8e2a96837ba51989c0cb99718bb718ecd8c2a68)/org/apache/tomcat/tomcat-i18n-de/9.0.28/tomcat-i18n-de-9.0.28.jar.asc(SHA1: d41a65c6443b7d3c2e90da775454fbbf29a11bcc)/org/apache/tomcat/tomcat-i18n-de/9.0.28/tomcat-i18n-de-9.0.28.pom(SHA1: c17342c418bf6a750c6934c5cbd939675dd042d3)/org/apache/tomcat/tomcat-i18n-de/9.0.28/tomcat-i18n-de-9.0.28.pom.asc(SHA1: 23d3a6efa0b8d343e2098207e635b83c45efb962)/org/apache/tomcat/tomcat-jni/9.0.28/tomcat-jni-9.0.28.pom.asc(SHA1: 3c489fb04c7ea779ed2f1709eeb781a929cbee1d)/org/apache/tomcat/tomcat-jni/9.0.28/tomcat-jni-9.0.28-sources.jar.asc(SHA1: bc0ee1ff9866082734cf4886c7c17a0c07708983)/org/apache/tomcat/tomcat-jni/9.0.28/tomcat-jni-9.0.28.jar(SHA1: d73e5ba1ed0807fed7b321c046cbd510242e860d)/org/apache/tomcat/tomcat-jni/9.0.28/tomcat-jni-9.0.28.jar.asc(SHA1: b1550a63092add1de549f6eca4d8b00462a09f55)/org/apache/tomcat/tomcat-jni/9.0.28/tomcat-jni-9.0.28-sources.jar(SHA1: d449f7f51c9746648acd1d66dd78f825637fd672)/org/apache/tomcat/tomcat-jni/9.0.28/tomcat-jni-9.0.28.pom(SHA1: d324ecd4b6d3b635c734c11f0ccac98aa2836cdb)/org/apache/tomcat/tomcat-juli/9.0.28/tomcat-juli-9.0.28.pom(SHA1: 4f52ea0ef3ff0d2d987ad4a15cbce550e207bacb)/org/apache/tomcat/tomcat-juli/9.0.28/tomcat-juli-9.0.28.jar.asc(SHA1: 63ea526c71354cd6611b7cfb7aa28017dbbae213)/org/apache/tomcat/tomcat-juli/9.0.28/tomcat-juli-9.0.28.pom.asc(SHA1: b64ba91edd2b25f5aae7e7958ef9e3598b8bb7e0)/org/apache/tomcat/tomcat-juli/9.0.28/tomcat-juli-9.0.28-sources.jar.asc(SHA1: ab94055726e1379a21d89260924762517300cad5)/org/apache/tomcat/tomcat-juli/9.0.28/tomcat-juli-9.0.28-sources.jar(SHA1: 5545cdb83b7ed7bfc9ff766ec5de3923b5734164)/org/apache/tomcat/tomcat-juli/9.0.28/tomcat-juli-9.0.28.jar(SHA1: 1dd756c39377f86da9cb07bfb9958f46d7843a9c)/org/apache/tomcat/tomcat-util/9.0.28/tomcat-util-9.0.28-sources.jar(SHA1: aefee6d043397c63bdb5656b9e763decb2ae3ed1)/org/apache/tomcat/tomcat-util/9.0.28/tomcat-util-9.0.28.jar(SHA1: aa019c4ceceb70231610b965361fc7b55a45208f)/org/apache/tomcat/tomcat-util/9.0.28/tomcat-util-9.0.28.jar.asc(SHA1: e202071d4e6c1ae9ee65cb9ec5d4ca88dcc7)/org/apache/tomcat/tomcat-util/9.0.28/tomcat-util-9.0.28.pom(SHA1: 75a45390e8b20009a9e3622a4406c5d0f29b4fe3)/org/apache/tomcat/tomcat-util/9.0.28/tomcat-util-9.0.28-sources.jar.asc(SHA1: da7e7b7c339d1ed66ebd6c8a96a2549c9e822886)/org/apache/tomcat/tomcat-util/9.0.28/tomcat-util-9.0.28.pom.asc(SHA1: c708ecc87b21c93f741eea3d29643736fe3f3b18)/org/apache/tomcat/tomcat-catalina/9.0.28/tomcat-catalina-9.0.28.pom.asc(SHA1: e5f745d7a2494385cb1ec665e9089fa6a36d5c85)/org/apache/tomcat/tomcat-catalina/9.0.28/tomcat-catalina-9.0.28.jar(SHA1: 1bc9a72c52c0c839bc084c9cfcf58ac2355816f9)/org/apache/tomcat/tomcat-catalina/9.0.28/tomcat-catalina-9.0.28.jar.asc(SHA1: 61f6113cfafc59c2f481ad1561571c789006abfc)/org/apache/tomcat/tomcat-catalina/9.0.28/tomcat-catalina-9.0.28-sources.jar.asc(SHA1: 14fa95a37e5cc2d829769a261e211ffa96e95aa6)/org/apache/tomcat/tomcat-catalina/9.0.28/tomcat-catalina-9.0.28-sources.jar(SHA1: 08c728f2bdaf6da791ba99e38df9025e44d32ab4)/org/apache/tomcat/tomcat-catalina/9.0.28/tomcat-catalina-9.0.28.pom(SHA1: dc3e9f55503e3cc11a98e5c0745b42ccacd19c6f)/org/apache/tomcat/tomcat-i18n-fr/9.0.28/tomcat-i18n-fr-9.0.28.pom(SHA1: 25d52e4646115ff7d192eb74769b0db67e0430fa)/org/apache/tomcat/tomcat-i18n-fr/9.0.28/tomcat-i18n-fr-9.0.28.pom.asc(SHA1: b7866d3a443a645cceb8c31dcb4e04eaa0d16694)/org/apache/tomcat/tomcat-i18n-fr/9.0.28/tomcat-i18n-fr-9.0.28.jar.asc(SHA1: e13cb92a8d71eaa11710570f5bacabe2bea5cbe2)/org/apache/tomcat/tomcat-i18n-fr/9.0.28/tomcat-i18n-fr-9.0.28.jar(SHA1: b37572fecfd813abb6f585463976a25c8f400686)/org/apache/tomcat/tomcat-i18n-cs/9.0.28/tomcat-i18n-cs-9.0.28.jar.asc(SHA1: a3604a4407c0564a5483c128852267c10f98c6d4)/org/apache/tomcat/tomcat-i18n-cs/9.0.28/tomcat-i18n-cs-9.0.28.pom(SHA1: 44d19855f6f3b62508f4e49ce47114ffad40298c)/org/apache/tomcat/tomcat-i18n-cs/9.0.28/tomcat-i18n-cs-9.0.28.pom.asc(SHA1: cd9bd8782dcd9bb6656af3a8026931809f5dc81a)/org/apache/tomcat/tomcat-i18n-cs/9.0.28/tomcat-i18n-cs-9.0.28.jar(SHA1: 43d603bebb57a22e1cd15f8ee621f8e1a0bcbdde)/org/apache/tomcat/tomcat-jdbc/9.0.28/tomcat-jdbc-9.0.28-sources.jar.asc(SHA1: 6af740f43d69d4066238ef8ac03adb67a6c34981)/org/apache/tomcat/tomcat-jdbc/9.0.28/tomcat-jdbc-9.0.28.jar.asc(SHA1: 6e14a5c3f7d2448e19a168027a9e5a4599d6416e)/org/apache/tomcat/tomcat-jdbc/9.0.28/tomcat-jdbc-9.0.28.jar(SHA1: 7f48409586dbc06008b113c5d943fd3d32d37a47)/org/apache/tomcat/tomcat-jdbc/9.0.28/tomcat-jdbc-9.0.28-sources.jar(SHA1: c7df1d205c5fdc7e4481a18615983a4519b90bb7)/org/apache/tomcat/tomcat-jdbc/9.0.28/tomcat-jdbc-9.0.28.pom.asc(SHA1: 60e5b6a881d86da443219c9be5595af44827a455)/org/apache/tomcat/tomcat-jdbc/9.0.28/tomcat-jdbc-9.0.28.pom(SHA1: 

[tomcat] branch master updated: Refactor JMX remote RMI registry creation

2019-11-14 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 1fc9f58  Refactor JMX remote RMI registry creation
1fc9f58 is described below

commit 1fc9f589dbdd8295cf313b2667ab041c425f99c3
Author: remm 
AuthorDate: Thu Nov 14 13:39:31 2019 +0100

Refactor JMX remote RMI registry creation
---
 .../mbeans/JmxRemoteLifecycleListener.java | 65 --
 webapps/docs/changelog.xml |  7 +++
 2 files changed, 56 insertions(+), 16 deletions(-)

diff --git a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java 
b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
index 3e472d0..77a785d 100644
--- a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
+++ b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
@@ -25,10 +25,11 @@ import java.net.MalformedURLException;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.UnknownHostException;
+import java.rmi.AccessException;
 import java.rmi.AlreadyBoundException;
+import java.rmi.NotBoundException;
+import java.rmi.Remote;
 import java.rmi.RemoteException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
 import java.rmi.server.RMIClientSocketFactory;
 import java.rmi.server.RMIServerSocketFactory;
 import java.util.HashMap;
@@ -417,18 +418,6 @@ public class JmxRemoteLifecycleListener extends 
SSLHostConfig implements Lifecyc
 RMIClientSocketFactory registryCsf, RMIServerSocketFactory 
registrySsf,
 RMIClientSocketFactory serverCsf, RMIServerSocketFactory 
serverSsf) {
 
-// Create the RMI registry
-Registry registry;
-try {
-registry = LocateRegistry.createRegistry(
-theRmiRegistryPort, registryCsf, registrySsf);
-} catch (RemoteException e) {
-log.error(sm.getString(
-"jmxRemoteLifecycleListener.createRegistryFailed",
-serverName, Integer.toString(theRmiRegistryPort)), e);
-return null;
-}
-
 if (bindAddress == null) {
 bindAddress = "localhost";
 }
@@ -449,11 +438,20 @@ public class JmxRemoteLifecycleListener extends 
SSLHostConfig implements Lifecyc
 cs = new RMIConnectorServer(serviceUrl, theEnv, server,
 ManagementFactory.getPlatformMBeanServer());
 cs.start();
-registry.bind("jmxrmi", server.toStub());
+Remote jmxServer = server.toStub();
+// Create the RMI registry
+try {
+new JmxRegistry(theRmiRegistryPort, registryCsf, registrySsf, 
"jmxrmi", jmxServer);
+} catch (RemoteException e) {
+log.error(sm.getString(
+"jmxRemoteLifecycleListener.createRegistryFailed",
+serverName, Integer.toString(theRmiRegistryPort)), e);
+return null;
+}
 log.info(sm.getString("jmxRemoteLifecycleListener.start",
 Integer.toString(theRmiRegistryPort),
 Integer.toString(theRmiServerPort), serverName));
-} catch (IOException | AlreadyBoundException e) {
+} catch (IOException e) {
 log.error(sm.getString(
 "jmxRemoteLifecycleListener.createServerFailed",
 serverName), e);
@@ -589,4 +587,39 @@ public class JmxRemoteLifecycleListener extends 
SSLHostConfig implements Lifecyc
 return true;
 }
 }
+
+
+private static class JmxRegistry extends sun.rmi.registry.RegistryImpl {
+private static final long serialVersionUID = -3772054804656428217L;
+private final String jmxName;
+private final Remote jmxServer;
+public JmxRegistry(int port, RMIClientSocketFactory csf,
+RMIServerSocketFactory ssf, String jmxName, Remote jmxServer) 
throws RemoteException {
+super(port, csf, ssf);
+this.jmxName = jmxName;
+this.jmxServer = jmxServer;
+}
+@Override
+public Remote lookup(String name)
+throws RemoteException, NotBoundException {
+return (jmxName.equals(name)) ? jmxServer : null;
+}
+@Override
+public void bind(String name, Remote obj)
+throws RemoteException, AlreadyBoundException, AccessException 
{
+}
+@Override
+public void unbind(String name)
+throws RemoteException, NotBoundException, AccessException {
+}
+@Override
+public void rebind(String name, Remote obj)
+throws RemoteException, AccessException {
+}
+@Override
+public String[] list() throws 

[tomcat] branch 8.5.x updated: Refactor JMX remote RMI registry creation

2019-11-14 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new a91d7db  Refactor JMX remote RMI registry creation
a91d7db is described below

commit a91d7db4047d372b2f12999d3cf2bc3254c20d00
Author: remm 
AuthorDate: Thu Nov 14 13:41:21 2019 +0100

Refactor JMX remote RMI registry creation
---
 .../mbeans/JmxRemoteLifecycleListener.java | 65 --
 webapps/docs/changelog.xml |  3 +
 2 files changed, 52 insertions(+), 16 deletions(-)

diff --git a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java 
b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
index f3aefde..a4095aa 100644
--- a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
+++ b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
@@ -25,10 +25,11 @@ import java.net.MalformedURLException;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.UnknownHostException;
+import java.rmi.AccessException;
 import java.rmi.AlreadyBoundException;
+import java.rmi.NotBoundException;
+import java.rmi.Remote;
 import java.rmi.RemoteException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
 import java.rmi.server.RMIClientSocketFactory;
 import java.rmi.server.RMIServerSocketFactory;
 import java.security.NoSuchAlgorithmException;
@@ -300,18 +301,6 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 RMIClientSocketFactory registryCsf, RMIServerSocketFactory 
registrySsf,
 RMIClientSocketFactory serverCsf, RMIServerSocketFactory 
serverSsf) {
 
-// Create the RMI registry
-Registry registry;
-try {
-registry = LocateRegistry.createRegistry(
-theRmiRegistryPort, registryCsf, registrySsf);
-} catch (RemoteException e) {
-log.error(sm.getString(
-"jmxRemoteLifecycleListener.createRegistryFailed",
-serverName, Integer.toString(theRmiRegistryPort)), e);
-return null;
-}
-
 if (bindAddress == null) {
 bindAddress = "localhost";
 }
@@ -332,11 +321,20 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 cs = new RMIConnectorServer(serviceUrl, theEnv, server,
 ManagementFactory.getPlatformMBeanServer());
 cs.start();
-registry.bind("jmxrmi", server.toStub());
+Remote jmxServer = server.toStub();
+// Create the RMI registry
+try {
+new JmxRegistry(theRmiRegistryPort, registryCsf, registrySsf, 
"jmxrmi", jmxServer);
+} catch (RemoteException e) {
+log.error(sm.getString(
+"jmxRemoteLifecycleListener.createRegistryFailed",
+serverName, Integer.toString(theRmiRegistryPort)), e);
+return null;
+}
 log.info(sm.getString("jmxRemoteLifecycleListener.start",
 Integer.toString(theRmiRegistryPort),
 Integer.toString(theRmiServerPort), serverName));
-} catch (IOException | AlreadyBoundException e) {
+} catch (IOException e) {
 log.error(sm.getString(
 "jmxRemoteLifecycleListener.createServerFailed",
 serverName), e);
@@ -492,4 +490,39 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 return true;
 }
 }
+
+
+private static class JmxRegistry extends sun.rmi.registry.RegistryImpl {
+private static final long serialVersionUID = -3772054804656428217L;
+private final String jmxName;
+private final Remote jmxServer;
+public JmxRegistry(int port, RMIClientSocketFactory csf,
+RMIServerSocketFactory ssf, String jmxName, Remote jmxServer) 
throws RemoteException {
+super(port, csf, ssf);
+this.jmxName = jmxName;
+this.jmxServer = jmxServer;
+}
+@Override
+public Remote lookup(String name)
+throws RemoteException, NotBoundException {
+return (jmxName.equals(name)) ? jmxServer : null;
+}
+@Override
+public void bind(String name, Remote obj)
+throws RemoteException, AlreadyBoundException, AccessException 
{
+}
+@Override
+public void unbind(String name)
+throws RemoteException, NotBoundException, AccessException {
+}
+@Override
+public void rebind(String name, Remote obj)
+throws RemoteException, AccessException {
+}
+@Override
+public String[] list() throws RemoteException {
+

[tomcat] branch 7.0.x updated: Refactor JMX remote RMI registry creation

2019-11-14 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
 new bef3f40  Refactor JMX remote RMI registry creation
bef3f40 is described below

commit bef3f40400243348d12f4abfe9b413f43897c02b
Author: remm 
AuthorDate: Thu Nov 14 13:42:28 2019 +0100

Refactor JMX remote RMI registry creation
---
 .../mbeans/JmxRemoteLifecycleListener.java | 67 --
 webapps/docs/changelog.xml |  3 +
 2 files changed, 51 insertions(+), 19 deletions(-)

diff --git a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java 
b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
index 3b18001..7d700a3 100644
--- a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
+++ b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
@@ -25,10 +25,11 @@ import java.net.MalformedURLException;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.UnknownHostException;
+import java.rmi.AccessException;
 import java.rmi.AlreadyBoundException;
+import java.rmi.NotBoundException;
+import java.rmi.Remote;
 import java.rmi.RemoteException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
 import java.rmi.server.RMIClientSocketFactory;
 import java.rmi.server.RMIServerSocketFactory;
 import java.security.NoSuchAlgorithmException;
@@ -300,18 +301,6 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 RMIClientSocketFactory registryCsf, RMIServerSocketFactory 
registrySsf,
 RMIClientSocketFactory serverCsf, RMIServerSocketFactory 
serverSsf) {
 
-// Create the RMI registry
-Registry registry;
-try {
-registry = LocateRegistry.createRegistry(
-theRmiRegistryPort, registryCsf, registrySsf);
-} catch (RemoteException e) {
-log.error(sm.getString(
-"jmxRemoteLifecycleListener.createRegistryFailed",
-serverName, Integer.toString(theRmiRegistryPort)), e);
-return null;
-}
-
 if (bindAddress == null) {
 bindAddress = "localhost";
 }
@@ -332,7 +321,16 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 cs = new RMIConnectorServer(serviceUrl, theEnv, server,
 ManagementFactory.getPlatformMBeanServer());
 cs.start();
-registry.bind("jmxrmi", server.toStub());
+Remote jmxServer = server.toStub();
+// Create the RMI registry
+try {
+new JmxRegistry(theRmiRegistryPort, registryCsf, registrySsf, 
"jmxrmi", jmxServer);
+} catch (RemoteException e) {
+log.error(sm.getString(
+"jmxRemoteLifecycleListener.createRegistryFailed",
+serverName, Integer.toString(theRmiRegistryPort)), e);
+return null;
+}
 log.info(sm.getString("jmxRemoteLifecycleListener.start",
 Integer.toString(theRmiRegistryPort),
 Integer.toString(theRmiServerPort), serverName));
@@ -340,10 +338,6 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 log.error(sm.getString(
 "jmxRemoteLifecycleListener.createServerFailed",
 serverName), e);
-} catch (AlreadyBoundException e) {
-log.error(sm.getString(
-"jmxRemoteLifecycleListener.createServerFailed",
-serverName), e);
 }
 return cs;
 }
@@ -496,4 +490,39 @@ public class JmxRemoteLifecycleListener implements 
LifecycleListener {
 return true;
 }
 }
+
+
+private static class JmxRegistry extends sun.rmi.registry.RegistryImpl {
+private static final long serialVersionUID = -3772054804656428217L;
+private final String jmxName;
+private final Remote jmxServer;
+public JmxRegistry(int port, RMIClientSocketFactory csf,
+RMIServerSocketFactory ssf, String jmxName, Remote jmxServer) 
throws RemoteException {
+super(port, csf, ssf);
+this.jmxName = jmxName;
+this.jmxServer = jmxServer;
+}
+@Override
+public Remote lookup(String name)
+throws RemoteException, NotBoundException {
+return (jmxName.equals(name)) ? jmxServer : null;
+}
+@Override
+public void bind(String name, Remote obj)
+throws RemoteException, AlreadyBoundException, AccessException 
{
+}
+@Override
+public void unbind(String name)
+throws RemoteException, NotBoundException, AccessException {
+