Buildbot success in on tomcat-10.1.x

2023-01-12 Thread buildbot
Build status: Build succeeded!
Worker used: bb2_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/625
Blamelist: Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 10.1.x] 80a5ad38b66c75763c3f0f52a7ba7ad5b9d517b2


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



Buildbot success in on tomcat-11.0.x

2023-01-12 Thread buildbot
Build status: Build succeeded!
Worker used: bb2_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/119
Blamelist: Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch main] 3cdbd46bcfc547eaf954cb12475f2da69f709557


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



[tomcat] branch 10.1.x updated: Handle inversion of meaning of StandardSocketOptions.IP_MULTICAST_LOOP

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 80a5ad38b6 Handle inversion of meaning of 
StandardSocketOptions.IP_MULTICAST_LOOP
80a5ad38b6 is described below

commit 80a5ad38b66c75763c3f0f52a7ba7ad5b9d517b2
Author: Mark Thomas 
AuthorDate: Thu Jan 12 23:18:30 2023 +

Handle inversion of meaning of StandardSocketOptions.IP_MULTICAST_LOOP

Prior to Java 14 a value of true means loopback is disabled
Java 14 onwards a value of true means loopback is enabled
---
 .../tribes/membership/McastServiceImpl.java|  4 +-
 .../apache/catalina/tribes/util/Jre14Compat.java   | 61 ++
 .../org/apache/catalina/tribes/util/JreCompat.java | 57 
 .../catalina/tribes/util/LocalStrings.properties   |  2 +
 .../apache/catalina/tribes/TesterMulticast.java|  7 +--
 5 files changed, 126 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java 
b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
index 1fac0a4207..c0d79c049e 100644
--- a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
+++ b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
@@ -25,7 +25,6 @@ import java.net.InetSocketAddress;
 import java.net.MulticastSocket;
 import java.net.NetworkInterface;
 import java.net.SocketTimeoutException;
-import java.net.StandardSocketOptions;
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -35,6 +34,7 @@ import org.apache.catalina.tribes.MembershipListener;
 import org.apache.catalina.tribes.MessageListener;
 import org.apache.catalina.tribes.io.ChannelData;
 import org.apache.catalina.tribes.io.XByteBuffer;
+import org.apache.catalina.tribes.util.JreCompat;
 import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -220,7 +220,7 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 socket = new MulticastSocket(port);
 }
 // Hint if we want disable loop back(local machine) messages
-socket.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.valueOf(!localLoopbackDisabled));
+JreCompat.getInstance().setSocketoptionIpMulticastLoop(socket, 
!localLoopbackDisabled);
 if (mcastBindAddress != null) {
 if(log.isInfoEnabled()) {
 log.info(sm.getString("mcastServiceImpl.setInterface", 
mcastBindAddress));
diff --git a/java/org/apache/catalina/tribes/util/Jre14Compat.java 
b/java/org/apache/catalina/tribes/util/Jre14Compat.java
new file mode 100644
index 00..1fb58a0a28
--- /dev/null
+++ b/java/org/apache/catalina/tribes/util/Jre14Compat.java
@@ -0,0 +1,61 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.catalina.tribes.util;
+
+import java.io.IOException;
+import java.net.MulticastSocket;
+import java.net.StandardSocketOptions;
+
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+
+public class Jre14Compat extends JreCompat {
+
+private static final Log log = LogFactory.getLog(Jre14Compat.class);
+private static final StringManager sm = 
StringManager.getManager(Jre14Compat.class);
+
+private static final boolean supported;
+
+static {
+// Don't need any Java 19 specific classes (yet) so just test for one 
of
+// the new ones for now.
+Class c1 = null;
+try {
+c1 = Class.forName("java.io.Serial");
+} catch (ClassNotFoundException cnfe) {
+// Must be pre-Java 16
+log.debug(sm.getString("jre14Compat.javaPre14"), cnfe);
+}
+
+supported = (c1 != null);
+}
+
+static boolean isSupported() {
+return supported;
+}
+
+
+@Override
+public void setSocketoptionIpMulticastLoop(MulticastSocket socket, boolean 
enabled) throws IOException {
+/*
+ *  Java < 14, a value of true means loopback is disabled. 

[tomcat] branch main updated: Handle inversion of meaning of StandardSocketOptions.IP_MULTICAST_LOOP

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 3cdbd46bcf Handle inversion of meaning of 
StandardSocketOptions.IP_MULTICAST_LOOP
3cdbd46bcf is described below

commit 3cdbd46bcfc547eaf954cb12475f2da69f709557
Author: Mark Thomas 
AuthorDate: Thu Jan 12 23:18:30 2023 +

Handle inversion of meaning of StandardSocketOptions.IP_MULTICAST_LOOP

Prior to Java 14 a value of true means loopback is disabled
Java 14 onwards a value of true means loopback is enabled
---
 .../tribes/membership/McastServiceImpl.java|  4 +-
 .../apache/catalina/tribes/util/Jre14Compat.java   | 61 ++
 .../org/apache/catalina/tribes/util/JreCompat.java | 57 
 .../catalina/tribes/util/LocalStrings.properties   |  2 +
 .../apache/catalina/tribes/TesterMulticast.java|  7 +--
 5 files changed, 126 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java 
b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
index 1fac0a4207..c0d79c049e 100644
--- a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
+++ b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
@@ -25,7 +25,6 @@ import java.net.InetSocketAddress;
 import java.net.MulticastSocket;
 import java.net.NetworkInterface;
 import java.net.SocketTimeoutException;
-import java.net.StandardSocketOptions;
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -35,6 +34,7 @@ import org.apache.catalina.tribes.MembershipListener;
 import org.apache.catalina.tribes.MessageListener;
 import org.apache.catalina.tribes.io.ChannelData;
 import org.apache.catalina.tribes.io.XByteBuffer;
+import org.apache.catalina.tribes.util.JreCompat;
 import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -220,7 +220,7 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 socket = new MulticastSocket(port);
 }
 // Hint if we want disable loop back(local machine) messages
-socket.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.valueOf(!localLoopbackDisabled));
+JreCompat.getInstance().setSocketoptionIpMulticastLoop(socket, 
!localLoopbackDisabled);
 if (mcastBindAddress != null) {
 if(log.isInfoEnabled()) {
 log.info(sm.getString("mcastServiceImpl.setInterface", 
mcastBindAddress));
diff --git a/java/org/apache/catalina/tribes/util/Jre14Compat.java 
b/java/org/apache/catalina/tribes/util/Jre14Compat.java
new file mode 100644
index 00..1fb58a0a28
--- /dev/null
+++ b/java/org/apache/catalina/tribes/util/Jre14Compat.java
@@ -0,0 +1,61 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.catalina.tribes.util;
+
+import java.io.IOException;
+import java.net.MulticastSocket;
+import java.net.StandardSocketOptions;
+
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+
+public class Jre14Compat extends JreCompat {
+
+private static final Log log = LogFactory.getLog(Jre14Compat.class);
+private static final StringManager sm = 
StringManager.getManager(Jre14Compat.class);
+
+private static final boolean supported;
+
+static {
+// Don't need any Java 19 specific classes (yet) so just test for one 
of
+// the new ones for now.
+Class c1 = null;
+try {
+c1 = Class.forName("java.io.Serial");
+} catch (ClassNotFoundException cnfe) {
+// Must be pre-Java 16
+log.debug(sm.getString("jre14Compat.javaPre14"), cnfe);
+}
+
+supported = (c1 != null);
+}
+
+static boolean isSupported() {
+return supported;
+}
+
+
+@Override
+public void setSocketoptionIpMulticastLoop(MulticastSocket socket, boolean 
enabled) throws IOException {
+/*
+ *  Java < 14, a value of true means loopback is disabled. Java 

Re: Buildbot failure in on tomcat-11.0.x

2023-01-12 Thread Mark Thomas

On 12/01/2023 22:16, Mark Thomas wrote:

On 12/01/2023 20:01, build...@apache.org wrote:

Build status: BUILD FAILED: failed compile (failure)
Worker used: bb2_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/115
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch main] 
65392b14e87e585289990b0dd65af87f58ab8c3f


This is related to the multicast deprecation changes.

The tests pass on Java 17 but fail on Java 11.

I'm investigating...


Oh that is just pure genius. The behaviour of IP_MULTICAST_LOOP is 
inverted for Java 14+.


https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8234643

I cannot believe that this change has not be back-ported to Java 11 and 
Java 8. Well actually, I can. I suspect it wasn't back-ported due to 
fear of breakage.


This looks like a job for JreCompat.

Sigh.

Mark

-
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 copy/paste error

2023-01-12 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 5250758127 Fix copy/paste error
5250758127 is described below

commit 525075812738411fd01f3f31e1f1b01561cd9ceb
Author: Mark Thomas 
AuthorDate: Thu Jan 12 22:23:30 2023 +

Fix copy/paste error
---
 test/org/apache/catalina/tribes/TesterMulticast.java | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java 
b/test/org/apache/catalina/tribes/TesterMulticast.java
index 866d50ed30..3fb019b775 100644
--- a/test/org/apache/catalina/tribes/TesterMulticast.java
+++ b/test/org/apache/catalina/tribes/TesterMulticast.java
@@ -18,8 +18,8 @@ package org.apache.catalina.tribes;
 
 import java.net.DatagramPacket;
 import java.net.InetAddress;
+import java.net.InetSocketAddress;
 import java.net.MulticastSocket;
-import java.net.NetworkInterface;
 import java.net.UnknownHostException;
 
 /**
@@ -82,8 +82,7 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setLoopbackMode(false);
-NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
-s.setNetworkInterface(networkInterface);
+s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);
@@ -110,8 +109,7 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setLoopbackMode(false);
-NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
-s.setNetworkInterface(networkInterface);
+s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);


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



[tomcat] 01/02: CheckStyle Javadoc checks += JavadocMissingWhitespaceAfterAsterisk

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 07c45306d25e4d6a14f33ca5d523d8da09f002b6
Author: Mark Thomas 
AuthorDate: Thu Jan 12 20:37:59 2023 +

CheckStyle Javadoc checks += JavadocMissingWhitespaceAfterAsterisk
---
 java/javax/servlet/jsp/JspWriter.java  |  2 +-
 java/javax/servlet/jsp/tagext/TagData.java |  2 +-
 java/org/apache/catalina/servlets/CGIServlet.java  | 10 
 .../apache/catalina/servlets/DefaultServlet.java   |  2 +-
 .../apache/jasper/servlet/JspServletWrapper.java   |  2 +-
 .../org/apache/tomcat/dbcp/pool2/PooledObject.java |  2 +-
 .../tomcat/dbcp/pool2/impl/AbandonedConfig.java|  2 +-
 .../tomcat/util/bcel/classfile/ElementValue.java   | 28 +++---
 .../util/modeler/BaseNotificationBroadcaster.java  |  3 +--
 .../apache/tomcat/jdbc/pool/DataSourceFactory.java |  4 ++--
 res/checkstyle/checkstyle.xml  |  1 +
 11 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/java/javax/servlet/jsp/JspWriter.java 
b/java/javax/servlet/jsp/JspWriter.java
index 209059194d..fb2166869a 100644
--- a/java/javax/servlet/jsp/JspWriter.java
+++ b/java/javax/servlet/jsp/JspWriter.java
@@ -23,7 +23,7 @@ import java.io.IOException;
  * The actions and template data in a JSP page is written using the JspWriter
  * object that is referenced by the implicit variable out which is initialized
  * automatically using methods in the PageContext object.
- *
+ * 
  * This abstract class emulates some of the functionality found in the
  * java.io.BufferedWriter and java.io.PrintWriter classes, however it differs 
in
  * that it throws java.io.IOException from the print methods while PrintWriter
diff --git a/java/javax/servlet/jsp/tagext/TagData.java 
b/java/javax/servlet/jsp/tagext/TagData.java
index 9740164b35..d603811228 100644
--- a/java/javax/servlet/jsp/tagext/TagData.java
+++ b/java/javax/servlet/jsp/tagext/TagData.java
@@ -140,7 +140,7 @@ public class TagData implements Cloneable {
 /**
  * Enumerates the attributes.
  *
- *@return An enumeration of the attributes in a TagData
+ * @return An enumeration of the attributes in a TagData
  */
 public java.util.Enumeration getAttributes() {
 return attributes.keys();
diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index 2694a38807..1c01714ff7 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -856,18 +856,18 @@ public final class CGIServlet extends HttpServlet {
  * CGI search algorithm: search the real path below
  *my-webapp-root and find the first non-directory in
  *the getPathTranslated("/"), reading/searching from left-to-right.
- *
- *
+ * 
+ * 
  *   The CGI search path will start at
  *   webAppRootDir + File.separator + cgiPathPrefix
  *   (or webAppRootDir alone if cgiPathPrefix is
  *   null).
- *
- *
+ * 
+ * 
  *   cgiPathPrefix is defined by setting
  *   this servlet's cgiPathPrefix init parameter
  *
- *
+ * 
  *
  * @param pathInfo   String from HttpServletRequest.getPathInfo()
  * @param webAppRootDir  String from context.getRealPath("/")
diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index b5a72fa09c..924b833bf8 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -109,7 +109,7 @@ import org.xml.sax.ext.EntityResolver2;
  * from the web application resource root using the full path from the root
  * of the web application context.
  * e.g. given a web application structure:
- *
+ * 
  * 
  * /context
  *   /images
diff --git a/java/org/apache/jasper/servlet/JspServletWrapper.java 
b/java/org/apache/jasper/servlet/JspServletWrapper.java
index 009501a7d8..dd3ce1457c 100644
--- a/java/org/apache/jasper/servlet/JspServletWrapper.java
+++ b/java/org/apache/jasper/servlet/JspServletWrapper.java
@@ -551,7 +551,7 @@ public class JspServletWrapper {
  * information, and a snippet of the JSP to help debugging.
  * Please see https://bz.apache.org/bugzilla/show_bug.cgi?id=37062 and
  * http://www.tfenne.com/jasper/ for more details.
- *
+ * 
  *
  * @param ex the exception that was the cause of the problem.
  * @return a JasperException with more detailed information
diff --git a/java/org/apache/tomcat/dbcp/pool2/PooledObject.java 
b/java/org/apache/tomcat/dbcp/pool2/PooledObject.java
index 69caef20c2..cb9504ccb9 100644
--- a/java/org/apache/tomcat/dbcp/pool2/PooledObject.java
+++ 

[tomcat] 02/02: Fix copy/paste error

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit d21508b49b2ba2786f7c2ad108bdde5d0aa2e86a
Author: Mark Thomas 
AuthorDate: Thu Jan 12 22:23:30 2023 +

Fix copy/paste error
---
 test/org/apache/catalina/tribes/TesterMulticast.java | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java 
b/test/org/apache/catalina/tribes/TesterMulticast.java
index 866d50ed30..3fb019b775 100644
--- a/test/org/apache/catalina/tribes/TesterMulticast.java
+++ b/test/org/apache/catalina/tribes/TesterMulticast.java
@@ -18,8 +18,8 @@ package org.apache.catalina.tribes;
 
 import java.net.DatagramPacket;
 import java.net.InetAddress;
+import java.net.InetSocketAddress;
 import java.net.MulticastSocket;
-import java.net.NetworkInterface;
 import java.net.UnknownHostException;
 
 /**
@@ -82,8 +82,7 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setLoopbackMode(false);
-NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
-s.setNetworkInterface(networkInterface);
+s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);
@@ -110,8 +109,7 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setLoopbackMode(false);
-NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
-s.setNetworkInterface(networkInterface);
+s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);


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



[tomcat] branch 9.0.x updated (b6678986b4 -> d21508b49b)

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from b6678986b4 Replace calls to methods that are deprecated in Java 16+
 new 07c45306d2 CheckStyle Javadoc checks += 
JavadocMissingWhitespaceAfterAsterisk
 new d21508b49b Fix copy/paste error

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:
 java/javax/servlet/jsp/JspWriter.java  |  2 +-
 java/javax/servlet/jsp/tagext/TagData.java |  2 +-
 java/org/apache/catalina/servlets/CGIServlet.java  | 10 
 .../apache/catalina/servlets/DefaultServlet.java   |  2 +-
 .../apache/jasper/servlet/JspServletWrapper.java   |  2 +-
 .../org/apache/tomcat/dbcp/pool2/PooledObject.java |  2 +-
 .../tomcat/dbcp/pool2/impl/AbandonedConfig.java|  2 +-
 .../tomcat/util/bcel/classfile/ElementValue.java   | 28 +++---
 .../util/modeler/BaseNotificationBroadcaster.java  |  3 +--
 .../apache/tomcat/jdbc/pool/DataSourceFactory.java |  4 ++--
 res/checkstyle/checkstyle.xml  |  1 +
 .../apache/catalina/tribes/TesterMulticast.java|  8 +++
 12 files changed, 32 insertions(+), 34 deletions(-)


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



Verifying reproducible release builds

2023-01-12 Thread Christopher Schultz

All,

I spent some time today verifying that the release artifacts that Mark 
published the other day for 10.1.5 were indeed reproducible by me. 
Fortunately, they were, but it was a little bit of a process so I went 
ahead and documented it.


https://cwiki.apache.org/confluence/display/TOMCAT/Verifying+a+Release+Build

Now, anybody can follow those instructions and perform a verifiable 
release build and sure that the process truly is repeatable and verifiable.


I'd love it if anyone who is mildly interested in such things would (a) 
check my work in Confluence and (b) actually try the verification 
process on any of this month's builds to see if you are successful.


Some things on my TODO list for this:

1. Allow verification without having to install+configure GPG
2. Allow verification using a "verify" ant build target

   This should be as straightforward as possible, so anyone wanting to
   see what is being done isn't confused by byzantine ant stuff. It
   should be as straightforward as a shell script with no functions
   or loops.

Unfortunately, the existing ant script contains  tasks at the 
top-level and not in a , so they occur before all targets. That 
means that we either need to have users wanting to verify builds 
create/modify one of the several build.properties files, or specify some 
properties on the command-line e.g. to disable GPG.


I could also write a separate build-verify.xml which might be a bit more 
straightforward to both implement AND read by a potential verifier.


-chris

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



[tomcat] branch 10.1.x updated: Fix copy/paste error

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 13ec5c575d Fix copy/paste error
13ec5c575d is described below

commit 13ec5c575d0db8751ee2bd38d47df67dd6d78b89
Author: Mark Thomas 
AuthorDate: Thu Jan 12 22:23:30 2023 +

Fix copy/paste error
---
 test/org/apache/catalina/tribes/TesterMulticast.java | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java 
b/test/org/apache/catalina/tribes/TesterMulticast.java
index 3e85687eea..10bb48bbb2 100644
--- a/test/org/apache/catalina/tribes/TesterMulticast.java
+++ b/test/org/apache/catalina/tribes/TesterMulticast.java
@@ -18,8 +18,8 @@ package org.apache.catalina.tribes;
 
 import java.net.DatagramPacket;
 import java.net.InetAddress;
+import java.net.InetSocketAddress;
 import java.net.MulticastSocket;
-import java.net.NetworkInterface;
 import java.net.StandardSocketOptions;
 import java.net.UnknownHostException;
 
@@ -83,8 +83,7 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.TRUE);
-NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
-s.setNetworkInterface(networkInterface);
+s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);
@@ -111,8 +110,7 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.TRUE);
-NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
-s.setNetworkInterface(networkInterface);
+s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);


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



[tomcat] branch main updated: Fix copy/paste error

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 9bcdbc4d41 Fix copy/paste error
9bcdbc4d41 is described below

commit 9bcdbc4d41585396e5eabd849acd5252677472db
Author: Mark Thomas 
AuthorDate: Thu Jan 12 22:23:30 2023 +

Fix copy/paste error
---
 test/org/apache/catalina/tribes/TesterMulticast.java | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java 
b/test/org/apache/catalina/tribes/TesterMulticast.java
index 3e85687eea..10bb48bbb2 100644
--- a/test/org/apache/catalina/tribes/TesterMulticast.java
+++ b/test/org/apache/catalina/tribes/TesterMulticast.java
@@ -18,8 +18,8 @@ package org.apache.catalina.tribes;
 
 import java.net.DatagramPacket;
 import java.net.InetAddress;
+import java.net.InetSocketAddress;
 import java.net.MulticastSocket;
-import java.net.NetworkInterface;
 import java.net.StandardSocketOptions;
 import java.net.UnknownHostException;
 
@@ -83,8 +83,7 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.TRUE);
-NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
-s.setNetworkInterface(networkInterface);
+s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);
@@ -111,8 +110,7 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.TRUE);
-NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
-s.setNetworkInterface(networkInterface);
+s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);


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



Re: Buildbot failure in on tomcat-11.0.x

2023-01-12 Thread Mark Thomas

On 12/01/2023 20:01, build...@apache.org wrote:

Build status: BUILD FAILED: failed compile (failure)
Worker used: bb2_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/115
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch main] 65392b14e87e585289990b0dd65af87f58ab8c3f


This is related to the multicast deprecation changes.

The tests pass on Java 17 but fail on Java 11.

I'm investigating...

Mark

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



Re: [VOTE] Release Apache Tomcat 8.5.85 (round 2)

2023-01-12 Thread Mark Thomas

On 12/01/2023 20:17, Christopher Schultz wrote:

The proposed 8.5.85 release is:
[ ] Broken - do not release
[X] Stable - go ahead and release as 8.5.85 (stable)


Unit tests pass on Linux.

Mark

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



Re: [VOTE] Release Apache Tomcat 10.1.5

2023-01-12 Thread Christopher Schultz

Mark,

On 1/9/23 15:25, Mark Thomas wrote:

The proposed Apache Tomcat 10.1.5 release is now available for
voting.

The notable changes compared to 10.1.4 are:

- Correct a regression in the refactoring that replaced the use of the
   URL constructors. The regression broke lookups for resources that
   contained one or more characters in their name that required escaping
   when used in a URI path.

- When resetting an HTTP/2 stream because the final response has been
   generated before the request has been fully read, use the HTTP/2 error
   code NO_ERROR so that client does not discard the response. Based on a
   suggestion by Lorenzo Dalla Vecchia.

- Change the default of the org.apache.el.GET_CLASSLOADER_USE_PRIVILEGED
   system property to true unless the EL library is running on Tomcat in
   which case the default remains false as the EL library is already
   called from within a privileged block and skipping the unnecessary
   privileged block improves performance.

For full details, see the change log:
https://nightlies.apache.org/tomcat/tomcat-10.1.x/docs/changelog.html

Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 
without changes. Java EE applications designed for Tomcat 9 and earlier 
may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat 
will automatically convert them to Jakarta EE and copy them to the 
webapps directory.


It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-10/v10.1.5/

The Maven staging repo is:
https://repository.apache.org/content/repositories/orgapachetomcat-1414

The tag is:
https://github.com/apache/tomcat/tree/10.1.5
f6eebe2ef959503150432dc2700181bd29a5ebc9


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


Thanks for RMing

+0

I have verified that

(a) The source distribution compiles successfully
(b) The release artifacts (both source and binary) match those I built 
locally in (a) above


I have not even tried running it.

-chris

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



[tomcat] branch 10.1.x updated: CheckStyle Javadoc checks += JavadocMissingWhitespaceAfterAsterisk

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new d1b50bd26f CheckStyle Javadoc checks += 
JavadocMissingWhitespaceAfterAsterisk
d1b50bd26f is described below

commit d1b50bd26f2a4dd516699250d75f83683a62104a
Author: Mark Thomas 
AuthorDate: Thu Jan 12 20:37:59 2023 +

CheckStyle Javadoc checks += JavadocMissingWhitespaceAfterAsterisk
---
 java/jakarta/servlet/jsp/JspWriter.java|  2 +-
 java/jakarta/servlet/jsp/tagext/TagData.java   |  2 +-
 java/org/apache/catalina/servlets/CGIServlet.java  | 10 
 .../apache/catalina/servlets/DefaultServlet.java   |  2 +-
 .../apache/jasper/servlet/JspServletWrapper.java   |  2 +-
 .../org/apache/tomcat/dbcp/pool2/PooledObject.java |  2 +-
 .../tomcat/dbcp/pool2/impl/AbandonedConfig.java|  2 +-
 .../tomcat/util/bcel/classfile/ElementValue.java   | 28 +++---
 .../util/modeler/BaseNotificationBroadcaster.java  |  3 +--
 .../apache/tomcat/jdbc/pool/DataSourceFactory.java |  4 ++--
 res/checkstyle/checkstyle.xml  |  1 +
 11 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/java/jakarta/servlet/jsp/JspWriter.java 
b/java/jakarta/servlet/jsp/JspWriter.java
index e65ae86af4..c196ace91c 100644
--- a/java/jakarta/servlet/jsp/JspWriter.java
+++ b/java/jakarta/servlet/jsp/JspWriter.java
@@ -23,7 +23,7 @@ import java.io.IOException;
  * The actions and template data in a JSP page is written using the JspWriter
  * object that is referenced by the implicit variable out which is initialized
  * automatically using methods in the PageContext object.
- *
+ * 
  * This abstract class emulates some of the functionality found in the
  * java.io.BufferedWriter and java.io.PrintWriter classes, however it differs 
in
  * that it throws java.io.IOException from the print methods while PrintWriter
diff --git a/java/jakarta/servlet/jsp/tagext/TagData.java 
b/java/jakarta/servlet/jsp/tagext/TagData.java
index 680acf3c74..dbc6b6ad16 100644
--- a/java/jakarta/servlet/jsp/tagext/TagData.java
+++ b/java/jakarta/servlet/jsp/tagext/TagData.java
@@ -140,7 +140,7 @@ public class TagData implements Cloneable {
 /**
  * Enumerates the attributes.
  *
- *@return An enumeration of the attributes in a TagData
+ * @return An enumeration of the attributes in a TagData
  */
 public java.util.Enumeration getAttributes() {
 return attributes.keys();
diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index d93c7dbb36..c2309e8e58 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -857,18 +857,18 @@ public final class CGIServlet extends HttpServlet {
  * CGI search algorithm: search the real path below
  *my-webapp-root and find the first non-directory in
  *the getPathTranslated("/"), reading/searching from left-to-right.
- *
- *
+ * 
+ * 
  *   The CGI search path will start at
  *   webAppRootDir + File.separator + cgiPathPrefix
  *   (or webAppRootDir alone if cgiPathPrefix is
  *   null).
- *
- *
+ * 
+ * 
  *   cgiPathPrefix is defined by setting
  *   this servlet's cgiPathPrefix init parameter
  *
- *
+ * 
  *
  * @param pathInfo   String from HttpServletRequest.getPathInfo()
  * @param webAppRootDir  String from context.getRealPath("/")
diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index e859438324..48d860870e 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -109,7 +109,7 @@ import org.xml.sax.ext.EntityResolver2;
  * from the web application resource root using the full path from the root
  * of the web application context.
  * e.g. given a web application structure:
- *
+ * 
  * 
  * /context
  *   /images
diff --git a/java/org/apache/jasper/servlet/JspServletWrapper.java 
b/java/org/apache/jasper/servlet/JspServletWrapper.java
index 1687a1ecfb..45fffea2b0 100644
--- a/java/org/apache/jasper/servlet/JspServletWrapper.java
+++ b/java/org/apache/jasper/servlet/JspServletWrapper.java
@@ -540,7 +540,7 @@ public class JspServletWrapper {
  * information, and a snippet of the JSP to help debugging.
  * Please see https://bz.apache.org/bugzilla/show_bug.cgi?id=37062 and
  * http://www.tfenne.com/jasper/ for more details.
- *
+ * 
  *
  * @param ex the exception that was the cause of the problem.
  * @return a JasperException with more detailed information
diff --git 

[tomcat] branch main updated: CheckStyle Javadoc checks += JavadocMissingWhitespaceAfterAsterisk

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 663f76093f CheckStyle Javadoc checks += 
JavadocMissingWhitespaceAfterAsterisk
663f76093f is described below

commit 663f76093fda45ba5880f2b2be5005c8fdefe4f4
Author: Mark Thomas 
AuthorDate: Thu Jan 12 20:37:59 2023 +

CheckStyle Javadoc checks += JavadocMissingWhitespaceAfterAsterisk
---
 java/jakarta/servlet/jsp/JspWriter.java|  2 +-
 java/jakarta/servlet/jsp/tagext/TagData.java   |  2 +-
 java/org/apache/catalina/servlets/CGIServlet.java  | 10 
 .../apache/catalina/servlets/DefaultServlet.java   |  2 +-
 .../apache/jasper/servlet/JspServletWrapper.java   |  2 +-
 .../org/apache/tomcat/dbcp/pool2/PooledObject.java |  2 +-
 .../tomcat/dbcp/pool2/impl/AbandonedConfig.java|  2 +-
 .../tomcat/util/bcel/classfile/ElementValue.java   | 28 +++---
 .../util/modeler/BaseNotificationBroadcaster.java  |  3 +--
 .../apache/tomcat/jdbc/pool/DataSourceFactory.java |  4 ++--
 res/checkstyle/checkstyle.xml  |  1 +
 11 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/java/jakarta/servlet/jsp/JspWriter.java 
b/java/jakarta/servlet/jsp/JspWriter.java
index e65ae86af4..c196ace91c 100644
--- a/java/jakarta/servlet/jsp/JspWriter.java
+++ b/java/jakarta/servlet/jsp/JspWriter.java
@@ -23,7 +23,7 @@ import java.io.IOException;
  * The actions and template data in a JSP page is written using the JspWriter
  * object that is referenced by the implicit variable out which is initialized
  * automatically using methods in the PageContext object.
- *
+ * 
  * This abstract class emulates some of the functionality found in the
  * java.io.BufferedWriter and java.io.PrintWriter classes, however it differs 
in
  * that it throws java.io.IOException from the print methods while PrintWriter
diff --git a/java/jakarta/servlet/jsp/tagext/TagData.java 
b/java/jakarta/servlet/jsp/tagext/TagData.java
index 680acf3c74..dbc6b6ad16 100644
--- a/java/jakarta/servlet/jsp/tagext/TagData.java
+++ b/java/jakarta/servlet/jsp/tagext/TagData.java
@@ -140,7 +140,7 @@ public class TagData implements Cloneable {
 /**
  * Enumerates the attributes.
  *
- *@return An enumeration of the attributes in a TagData
+ * @return An enumeration of the attributes in a TagData
  */
 public java.util.Enumeration getAttributes() {
 return attributes.keys();
diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index d93c7dbb36..c2309e8e58 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -857,18 +857,18 @@ public final class CGIServlet extends HttpServlet {
  * CGI search algorithm: search the real path below
  *my-webapp-root and find the first non-directory in
  *the getPathTranslated("/"), reading/searching from left-to-right.
- *
- *
+ * 
+ * 
  *   The CGI search path will start at
  *   webAppRootDir + File.separator + cgiPathPrefix
  *   (or webAppRootDir alone if cgiPathPrefix is
  *   null).
- *
- *
+ * 
+ * 
  *   cgiPathPrefix is defined by setting
  *   this servlet's cgiPathPrefix init parameter
  *
- *
+ * 
  *
  * @param pathInfo   String from HttpServletRequest.getPathInfo()
  * @param webAppRootDir  String from context.getRealPath("/")
diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index dc00ef6897..b48161aeae 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -98,7 +98,7 @@ import org.apache.tomcat.util.security.Escape;
  * from the web application resource root using the full path from the root
  * of the web application context.
  * e.g. given a web application structure:
- *
+ * 
  * 
  * /context
  *   /images
diff --git a/java/org/apache/jasper/servlet/JspServletWrapper.java 
b/java/org/apache/jasper/servlet/JspServletWrapper.java
index 1687a1ecfb..45fffea2b0 100644
--- a/java/org/apache/jasper/servlet/JspServletWrapper.java
+++ b/java/org/apache/jasper/servlet/JspServletWrapper.java
@@ -540,7 +540,7 @@ public class JspServletWrapper {
  * information, and a snippet of the JSP to help debugging.
  * Please see https://bz.apache.org/bugzilla/show_bug.cgi?id=37062 and
  * http://www.tfenne.com/jasper/ for more details.
- *
+ * 
  *
  * @param ex the exception that was the cause of the problem.
  * @return a JasperException with more detailed information
diff --git 

Re: [VOTE] Release Apache Tomcat 8.5.85 (round 2)

2023-01-12 Thread Mark Thomas

On 12/01/2023 20:17, Christopher Schultz wrote:

The proposed 8.5.85 release is:
[ ] Broken - do not release
[ ] Stable - go ahead and release as 8.5.85 (stable)


Still running the unit tests but I wanted to confirm that I have 
repeated the build using the new 8.5.85 tag and have confirmed that the 
resulting artifacts are identical to those previously uploaded.


Mark

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



[VOTE] Release Apache Tomcat 8.5.85 (round 2)

2023-01-12 Thread Christopher Schultz

The proposed Apache Tomcat 8.5.85 release is now available for voting.

[[[
Note that the previous tag has been replaced with a new one which 
contains the signature files produced during the release-build. The 
commit-id of the tag has therefore changed as noted later in this 
message. The files uploaded to the Tomcat release directory and to Maven 
are unchanged. There are no other changes to the tag from the previous 
8.5.85 tag. The files added are:


res/install-win/tomcat-installer.exe.sig
res/install-win/Uninstall.exe.sig
]]]

The notable changes compared to 8.5.84 are:

- The default value of AccessLogValue's file encoding is
  now UTF-8.

- Correct a regression in the refactoring that replaced the use of the
  URL constructors. The regression broke lookups for resources that
  contained one or more characters in their name that required escaping
  when used in a URI path.

- When an HTTP/2 stream was reset, the current active stream count was
  not reduced. If enough resets occurred on a connection, the current
  active stream count limit was reached and no new streams could be
  created on that connection.

- Change the default of the org.apache.el.GET_CLASSLOADER_USE_PRIVILEGED
  system property to true unless the EL library is running on Tomcat in
  which case the default remains false as the EL library is already
  called from within a privileged block and skipping the unnecessary
  privileged block improves performance.

Along with lots of other bug fixes and improvements.

For full details, see the changelog:
https://nightlies.apache.org/tomcat/tomcat-8.5.x/docs/changelog.html

It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.5.85/

The Maven staging repo is:
https://repository.apache.org/content/repositories/orgapachetomcat-1416

The tag is:
https://github.com/apache/tomcat/tree/8.5.85/
7b1f4ce0b82641bf76a3d763bd97d5522513b57b

The proposed 8.5.85 release is:
[ ] Broken - do not release
[ ] Stable - go ahead and release as 8.5.85 (stable)

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

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



[tomcat] 02/02: Update tag to include Windows detached signature files.

2023-01-12 Thread schultz
This is an automated email from the ASF dual-hosted git repository.

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

commit 7b1f4ce0b82641bf76a3d763bd97d5522513b57b
Author: schultz 
AuthorDate: Thu Jan 12 12:09:13 2023 -0800

Update tag to include Windows detached signature files.
---
 res/install-win/Uninstall.exe.sig| Bin 0 -> 10247 bytes
 res/install-win/tomcat-installer.exe.sig | Bin 0 -> 10247 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/res/install-win/Uninstall.exe.sig 
b/res/install-win/Uninstall.exe.sig
new file mode 100644
index 00..032e268935
Binary files /dev/null and b/res/install-win/Uninstall.exe.sig differ
diff --git a/res/install-win/tomcat-installer.exe.sig 
b/res/install-win/tomcat-installer.exe.sig
new file mode 100644
index 00..0a18186443
Binary files /dev/null and b/res/install-win/tomcat-installer.exe.sig differ


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



[tomcat] tag 8.5.85 created (now 7b1f4ce0b8)

2023-01-12 Thread schultz
This is an automated email from the ASF dual-hosted git repository.

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


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

 new 6e999c7928 Tag 8.5.85
 new 7b1f4ce0b8 Update tag to include Windows detached signature files.

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.



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



[tomcat] 01/02: Tag 8.5.85

2023-01-12 Thread schultz
This is an automated email from the ASF dual-hosted git repository.

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

commit 6e999c7928c47915172043bc31fbc8740f80b4c9
Author: schultz 
AuthorDate: Tue Jan 10 16:10:00 2023 -0800

Tag 8.5.85
---
 build.properties.release | 52 
 res/maven/mvn.properties.release | 27 +
 webapps/docs/changelog.xml   |  2 +-
 3 files changed, 80 insertions(+), 1 deletion(-)

diff --git a/build.properties.release b/build.properties.release
new file mode 100644
index 00..ddf28d974f
--- /dev/null
+++ b/build.properties.release
@@ -0,0 +1,52 @@
+# -
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -
+
+# This file was auto-generated by the pre-release Ant target.
+
+# Any unwanted settings may be over-ridden in a build.properties file located
+# in the same directory as this file.
+
+# Set the version-dev to "" (empty string) as this is not a development 
release.
+version.dev=
+
+# Ensure consistent timestamps for reproducible builds.
+ant.tstamp.now.iso=2023-01-11T00:09:15Z
+
+# Enable insertion of detached signatures into the Windows installer.
+do.codesigning=true
+
+# Re-use the same GPG executable.
+gpg.exec=C:/Program Files (x86)/gnupg/bin/gpg.exe
+
+# Reproducible builds require the use of the build tools defined below. The
+# vendors (where appropriate) and versions must match exactly for a 
reproducible
+# build since this data is embedded in various files, particularly JAR file
+# manifests, as part of the build process.
+#
+# Apache Ant:  Apache Ant(TM) version 1.10.12 compiled on October 13 2021
+#
+# Java Name:   OpenJDK 64-Bit Server VM
+# Java Vendor: Eclipse Adoptium
+# Java Version:11.0.17+8
+
+# The following is provided for information only. Builds will be repeatable
+# whether or not the build environment in consistent with this information.
+#
+# OS:  amd64 Windows 10 10.0
+# File encoding:   Cp1252
+#
+# Release Manager: schultz
diff --git a/res/maven/mvn.properties.release b/res/maven/mvn.properties.release
new file mode 100644
index 00..27c3c12bc3
--- /dev/null
+++ b/res/maven/mvn.properties.release
@@ -0,0 +1,27 @@
+# -
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -
+
+# This file was auto-generated by the pre-release Ant target.
+
+# Remove "-dev" from the version since this is not a development release.
+maven.asf.release.deploy.version=8.5.85
+
+# Re-use the same GPG executable.
+gpg.exec=C:/Program Files (x86)/gnupg/bin/gpg.exe
+
+# Set the user name to use to upload the artefacts to Nexus.
+asf.ldap.username=schultz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 06f4f23a17..c12e35a124 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,7 +104,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: 

[tomcat] tag 8.5.85 deleted (was 6e999c7928)

2023-01-12 Thread schultz
This is an automated email from the ASF dual-hosted git repository.

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


*** WARNING: tag 8.5.85 was deleted! ***

 was 6e999c7928 Tag 8.5.85

This change permanently discards the following revisions:

 discard 6e999c7928 Tag 8.5.85


-
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: Replace calls to methods that are deprecated in Java 16+

2023-01-12 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 6dcbb900fb Replace calls to methods that are deprecated in Java 16+
6dcbb900fb is described below

commit 6dcbb900fb80c42a8b4fd0fcf5b8947651f907d9
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:57:09 2023 +

Replace calls to methods that are deprecated in Java 16+
---
 test/org/apache/catalina/tribes/TesterMulticast.java | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java 
b/test/org/apache/catalina/tribes/TesterMulticast.java
index 32227525c8..866d50ed30 100644
--- a/test/org/apache/catalina/tribes/TesterMulticast.java
+++ b/test/org/apache/catalina/tribes/TesterMulticast.java
@@ -19,6 +19,7 @@ package org.apache.catalina.tribes;
 import java.net.DatagramPacket;
 import java.net.InetAddress;
 import java.net.MulticastSocket;
+import java.net.NetworkInterface;
 import java.net.UnknownHostException;
 
 /**
@@ -81,7 +82,8 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setLoopbackMode(false);
-s.joinGroup(INET_ADDRESS);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
+s.setNetworkInterface(networkInterface);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);
@@ -108,7 +110,8 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setLoopbackMode(false);
-s.joinGroup(INET_ADDRESS);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
+s.setNetworkInterface(networkInterface);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);


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



[tomcat] branch 9.0.x updated: Replace calls to methods that are deprecated in Java 16+

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new b6678986b4 Replace calls to methods that are deprecated in Java 16+
b6678986b4 is described below

commit b6678986b4fe7903019bea35a5d0b43a0ebaf07a
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:57:09 2023 +

Replace calls to methods that are deprecated in Java 16+
---
 test/org/apache/catalina/tribes/TesterMulticast.java | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java 
b/test/org/apache/catalina/tribes/TesterMulticast.java
index 32227525c8..866d50ed30 100644
--- a/test/org/apache/catalina/tribes/TesterMulticast.java
+++ b/test/org/apache/catalina/tribes/TesterMulticast.java
@@ -19,6 +19,7 @@ package org.apache.catalina.tribes;
 import java.net.DatagramPacket;
 import java.net.InetAddress;
 import java.net.MulticastSocket;
+import java.net.NetworkInterface;
 import java.net.UnknownHostException;
 
 /**
@@ -81,7 +82,8 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setLoopbackMode(false);
-s.joinGroup(INET_ADDRESS);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
+s.setNetworkInterface(networkInterface);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);
@@ -108,7 +110,8 @@ public class TesterMulticast {
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
 s.setLoopbackMode(false);
-s.joinGroup(INET_ADDRESS);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
+s.setNetworkInterface(networkInterface);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);


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



[tomcat] branch 10.1.x updated: Replace calls to methods that are deprecated in Java 16+

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 3136f94352 Replace calls to methods that are deprecated in Java 16+
3136f94352 is described below

commit 3136f943528c4a21a1eb54a22d2cbb4ae8940d8d
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:57:09 2023 +

Replace calls to methods that are deprecated in Java 16+
---
 test/org/apache/catalina/tribes/TesterMulticast.java | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java 
b/test/org/apache/catalina/tribes/TesterMulticast.java
index 32227525c8..3e85687eea 100644
--- a/test/org/apache/catalina/tribes/TesterMulticast.java
+++ b/test/org/apache/catalina/tribes/TesterMulticast.java
@@ -19,6 +19,8 @@ package org.apache.catalina.tribes;
 import java.net.DatagramPacket;
 import java.net.InetAddress;
 import java.net.MulticastSocket;
+import java.net.NetworkInterface;
+import java.net.StandardSocketOptions;
 import java.net.UnknownHostException;
 
 /**
@@ -80,8 +82,9 @@ public class TesterMulticast {
 @Override
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
-s.setLoopbackMode(false);
-s.joinGroup(INET_ADDRESS);
+s.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.TRUE);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
+s.setNetworkInterface(networkInterface);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);
@@ -107,8 +110,9 @@ public class TesterMulticast {
 @Override
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
-s.setLoopbackMode(false);
-s.joinGroup(INET_ADDRESS);
+s.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.TRUE);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
+s.setNetworkInterface(networkInterface);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);


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



[tomcat] branch main updated: Replace calls to methods that are deprecated in Java 16+

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new d00a37c96e Replace calls to methods that are deprecated in Java 16+
d00a37c96e is described below

commit d00a37c96ee6acb2ba8ce086143c0b0b9837cfcf
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:57:09 2023 +

Replace calls to methods that are deprecated in Java 16+
---
 test/org/apache/catalina/tribes/TesterMulticast.java | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java 
b/test/org/apache/catalina/tribes/TesterMulticast.java
index 32227525c8..3e85687eea 100644
--- a/test/org/apache/catalina/tribes/TesterMulticast.java
+++ b/test/org/apache/catalina/tribes/TesterMulticast.java
@@ -19,6 +19,8 @@ package org.apache.catalina.tribes;
 import java.net.DatagramPacket;
 import java.net.InetAddress;
 import java.net.MulticastSocket;
+import java.net.NetworkInterface;
+import java.net.StandardSocketOptions;
 import java.net.UnknownHostException;
 
 /**
@@ -80,8 +82,9 @@ public class TesterMulticast {
 @Override
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
-s.setLoopbackMode(false);
-s.joinGroup(INET_ADDRESS);
+s.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.TRUE);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
+s.setNetworkInterface(networkInterface);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);
@@ -107,8 +110,9 @@ public class TesterMulticast {
 @Override
 public void run() {
 try (MulticastSocket s = new MulticastSocket(PORT)) {
-s.setLoopbackMode(false);
-s.joinGroup(INET_ADDRESS);
+s.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.TRUE);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(INET_ADDRESS);
+s.setNetworkInterface(networkInterface);
 DatagramPacket p = new DatagramPacket(new byte[4], 4);
 p.setAddress(INET_ADDRESS);
 p.setPort(PORT);


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



Buildbot failure in on tomcat-11.0.x

2023-01-12 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb2_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/115
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch main] 65392b14e87e585289990b0dd65af87f58ab8c3f


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 2

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


-
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: Replace calls to methods that are deprecated in Java 16+

2023-01-12 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 34809cd4a8 Replace calls to methods that are deprecated in Java 16+
34809cd4a8 is described below

commit 34809cd4a8be88d6c46e678c0fc4517da93a493c
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:49:15 2023 +

Replace calls to methods that are deprecated in Java 16+
---
 java/org/apache/tomcat/util/net/SSLUtilBase.java| 2 +-
 java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java | 2 ++
 test/org/apache/tomcat/util/net/TesterSupport.java  | 4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/SSLUtilBase.java 
b/java/org/apache/tomcat/util/net/SSLUtilBase.java
index 5c3ff28d54..71e7e020d9 100644
--- a/java/org/apache/tomcat/util/net/SSLUtilBase.java
+++ b/java/org/apache/tomcat/util/net/SSLUtilBase.java
@@ -465,7 +465,7 @@ public abstract class SSLUtilBase implements SSLUtil {
 ((X509Certificate) cert).checkValidity(now);
 } catch (CertificateExpiredException | 
CertificateNotYetValidException e) {
 String msg = 
sm.getString("sslUtilBase.trustedCertNotValid", alias,
-((X509Certificate) cert).getSubjectDN(), 
e.getMessage());
+((X509Certificate) 
cert).getSubjectX500Principal(), e.getMessage());
 if (log.isDebugEnabled()) {
 log.debug(msg, e);
 } else {
diff --git 
a/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
index de33204b60..a3eddce8c0 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
@@ -62,11 +62,13 @@ final class OpenSSLX509Certificate extends X509Certificate {
 }
 
 @Override
+@Deprecated
 public Principal getIssuerDN() {
 return unwrap().getIssuerDN();
 }
 
 @Override
+@Deprecated
 public Principal getSubjectDN() {
 return unwrap().getSubjectDN();
 }
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index 2f13295886..374c440008 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -296,7 +296,7 @@ public final class TesterSupport {
 try {
 KeyStore ks = getKeyStore(CA_JKS);
 X509Certificate cert = 
(X509Certificate)ks.getCertificate(CA_ALIAS);
-clientAuthExpectedIssuer = cert.getSubjectDN().getName();
+clientAuthExpectedIssuer = 
cert.getSubjectX500Principal().toString();
 } catch (Exception ex) {
 throw new RuntimeException(ex);
 }
@@ -305,7 +305,7 @@ public final class TesterSupport {
 try {
 KeyStore ks = getKeyStore(CLIENT_JKS);
 X509Certificate cert = 
(X509Certificate)ks.getCertificate(CLIENT_ALIAS);
-cn = cert.getSubjectDN().getName();
+cn = cert.getSubjectX500Principal().toString();
 } catch (Exception ex) {
 throw new RuntimeException(ex);
 }


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



[tomcat] branch 9.0.x updated: Replace calls to methods that are deprecated in Java 16+

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 651aa7d4b4 Replace calls to methods that are deprecated in Java 16+
651aa7d4b4 is described below

commit 651aa7d4b49702ae13bf31addbb3aaa7b846c1de
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:49:15 2023 +

Replace calls to methods that are deprecated in Java 16+
---
 java/org/apache/tomcat/util/net/SSLUtilBase.java| 2 +-
 java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java | 2 ++
 test/org/apache/tomcat/util/net/TesterSupport.java  | 4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/SSLUtilBase.java 
b/java/org/apache/tomcat/util/net/SSLUtilBase.java
index 0c73006f90..76b485654f 100644
--- a/java/org/apache/tomcat/util/net/SSLUtilBase.java
+++ b/java/org/apache/tomcat/util/net/SSLUtilBase.java
@@ -465,7 +465,7 @@ public abstract class SSLUtilBase implements SSLUtil {
 ((X509Certificate) cert).checkValidity(now);
 } catch (CertificateExpiredException | 
CertificateNotYetValidException e) {
 String msg = 
sm.getString("sslUtilBase.trustedCertNotValid", alias,
-((X509Certificate) cert).getSubjectDN(), 
e.getMessage());
+((X509Certificate) 
cert).getSubjectX500Principal(), e.getMessage());
 if (log.isDebugEnabled()) {
 log.debug(msg, e);
 } else {
diff --git 
a/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
index de33204b60..a3eddce8c0 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
@@ -62,11 +62,13 @@ final class OpenSSLX509Certificate extends X509Certificate {
 }
 
 @Override
+@Deprecated
 public Principal getIssuerDN() {
 return unwrap().getIssuerDN();
 }
 
 @Override
+@Deprecated
 public Principal getSubjectDN() {
 return unwrap().getSubjectDN();
 }
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index 570e6b1ce6..1bab0435c6 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -302,7 +302,7 @@ public final class TesterSupport {
 try {
 KeyStore ks = getKeyStore(CA_JKS);
 X509Certificate cert = 
(X509Certificate)ks.getCertificate(CA_ALIAS);
-clientAuthExpectedIssuer = cert.getSubjectDN().getName();
+clientAuthExpectedIssuer = 
cert.getSubjectX500Principal().toString();
 } catch (Exception ex) {
 throw new RuntimeException(ex);
 }
@@ -311,7 +311,7 @@ public final class TesterSupport {
 try {
 KeyStore ks = getKeyStore(CLIENT_JKS);
 X509Certificate cert = 
(X509Certificate)ks.getCertificate(CLIENT_ALIAS);
-cn = cert.getSubjectDN().getName();
+cn = cert.getSubjectX500Principal().toString();
 } catch (Exception ex) {
 throw new RuntimeException(ex);
 }


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



[tomcat] branch 10.1.x updated: Replace calls to methods that are deprecated in Java 16+

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 3c7fbcd37a Replace calls to methods that are deprecated in Java 16+
3c7fbcd37a is described below

commit 3c7fbcd37a11c0be5c13c6a0d1275f5f8e253b3f
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:49:15 2023 +

Replace calls to methods that are deprecated in Java 16+
---
 java/org/apache/tomcat/util/net/SSLUtilBase.java| 2 +-
 java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java | 2 ++
 test/org/apache/tomcat/util/net/TesterSupport.java  | 4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/SSLUtilBase.java 
b/java/org/apache/tomcat/util/net/SSLUtilBase.java
index 0c73006f90..76b485654f 100644
--- a/java/org/apache/tomcat/util/net/SSLUtilBase.java
+++ b/java/org/apache/tomcat/util/net/SSLUtilBase.java
@@ -465,7 +465,7 @@ public abstract class SSLUtilBase implements SSLUtil {
 ((X509Certificate) cert).checkValidity(now);
 } catch (CertificateExpiredException | 
CertificateNotYetValidException e) {
 String msg = 
sm.getString("sslUtilBase.trustedCertNotValid", alias,
-((X509Certificate) cert).getSubjectDN(), 
e.getMessage());
+((X509Certificate) 
cert).getSubjectX500Principal(), e.getMessage());
 if (log.isDebugEnabled()) {
 log.debug(msg, e);
 } else {
diff --git 
a/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
index de33204b60..a3eddce8c0 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
@@ -62,11 +62,13 @@ final class OpenSSLX509Certificate extends X509Certificate {
 }
 
 @Override
+@Deprecated
 public Principal getIssuerDN() {
 return unwrap().getIssuerDN();
 }
 
 @Override
+@Deprecated
 public Principal getSubjectDN() {
 return unwrap().getSubjectDN();
 }
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index 9922e82d11..c3bd64330e 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -274,7 +274,7 @@ public final class TesterSupport {
 try {
 KeyStore ks = getKeyStore(CA_JKS);
 X509Certificate cert = 
(X509Certificate)ks.getCertificate(CA_ALIAS);
-clientAuthExpectedIssuer = cert.getSubjectDN().getName();
+clientAuthExpectedIssuer = 
cert.getSubjectX500Principal().toString();
 } catch (Exception ex) {
 throw new RuntimeException(ex);
 }
@@ -283,7 +283,7 @@ public final class TesterSupport {
 try {
 KeyStore ks = getKeyStore(CLIENT_JKS);
 X509Certificate cert = 
(X509Certificate)ks.getCertificate(CLIENT_ALIAS);
-cn = cert.getSubjectDN().getName();
+cn = cert.getSubjectX500Principal().toString();
 } catch (Exception ex) {
 throw new RuntimeException(ex);
 }


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



[tomcat] branch main updated: Replace calls to methods that are deprecated in Java 16+

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 759139b95d Replace calls to methods that are deprecated in Java 16+
759139b95d is described below

commit 759139b95d6b188a5cf2b2c4ea93a9eda04d9ac9
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:49:15 2023 +

Replace calls to methods that are deprecated in Java 16+
---
 java/org/apache/tomcat/util/net/SSLUtilBase.java| 2 +-
 java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java | 2 ++
 test/org/apache/tomcat/util/net/TesterSupport.java  | 4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/SSLUtilBase.java 
b/java/org/apache/tomcat/util/net/SSLUtilBase.java
index 0c73006f90..76b485654f 100644
--- a/java/org/apache/tomcat/util/net/SSLUtilBase.java
+++ b/java/org/apache/tomcat/util/net/SSLUtilBase.java
@@ -465,7 +465,7 @@ public abstract class SSLUtilBase implements SSLUtil {
 ((X509Certificate) cert).checkValidity(now);
 } catch (CertificateExpiredException | 
CertificateNotYetValidException e) {
 String msg = 
sm.getString("sslUtilBase.trustedCertNotValid", alias,
-((X509Certificate) cert).getSubjectDN(), 
e.getMessage());
+((X509Certificate) 
cert).getSubjectX500Principal(), e.getMessage());
 if (log.isDebugEnabled()) {
 log.debug(msg, e);
 } else {
diff --git 
a/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
index de33204b60..a3eddce8c0 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLX509Certificate.java
@@ -62,11 +62,13 @@ final class OpenSSLX509Certificate extends X509Certificate {
 }
 
 @Override
+@Deprecated
 public Principal getIssuerDN() {
 return unwrap().getIssuerDN();
 }
 
 @Override
+@Deprecated
 public Principal getSubjectDN() {
 return unwrap().getSubjectDN();
 }
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index 9922e82d11..c3bd64330e 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -274,7 +274,7 @@ public final class TesterSupport {
 try {
 KeyStore ks = getKeyStore(CA_JKS);
 X509Certificate cert = 
(X509Certificate)ks.getCertificate(CA_ALIAS);
-clientAuthExpectedIssuer = cert.getSubjectDN().getName();
+clientAuthExpectedIssuer = 
cert.getSubjectX500Principal().toString();
 } catch (Exception ex) {
 throw new RuntimeException(ex);
 }
@@ -283,7 +283,7 @@ public final class TesterSupport {
 try {
 KeyStore ks = getKeyStore(CLIENT_JKS);
 X509Certificate cert = 
(X509Certificate)ks.getCertificate(CLIENT_ALIAS);
-cn = cert.getSubjectDN().getName();
+cn = cert.getSubjectX500Principal().toString();
 } catch (Exception ex) {
 throw new RuntimeException(ex);
 }


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



[tomcat] branch main updated: Remove SecurityManager references from the o.a.t.utils package

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 9c0682869d Remove SecurityManager references from the o.a.t.utils 
package
9c0682869d is described below

commit 9c0682869d9bbbd124d8ad9c96b95ab57328ba11
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:48:15 2023 +

Remove SecurityManager references from the o.a.t.utils package
---
 .../apache/tomcat/dbcp/dbcp2/BasicDataSource.java  |  39 ---
 java/org/apache/tomcat/dbcp/dbcp2/Utils.java   |  12 --
 .../apache/tomcat/dbcp/pool2/impl/CallStack.java   |   1 -
 .../tomcat/dbcp/pool2/impl/CallStackUtils.java |  85 --
 .../dbcp/pool2/impl/DefaultPooledObject.java   |   8 +-
 .../tomcat/dbcp/pool2/impl/EvictionTimer.java  |   8 +-
 .../dbcp/pool2/impl/SecurityManagerCallStack.java  | 122 -
 .../org/apache/tomcat/util/compat/JrePlatform.java |  10 +-
 .../apache/tomcat/util/descriptor/Constants.java   |   5 +-
 .../tomcat/util/descriptor/tld/TldParser.java  |  26 +
 java/org/apache/tomcat/util/net/Constants.java |   2 -
 .../tomcat/util/security/PrivilegedGetTccl.java|  28 -
 .../PrivilegedSetAccessControlContext.java |  67 ---
 .../tomcat/util/security/PrivilegedSetTccl.java|  41 ---
 java/org/apache/tomcat/util/threads/Constants.java |   5 -
 .../tomcat/util/threads/TaskThreadFactory.java |  26 +
 .../tomcat/util/threads/ThreadPoolExecutor.java|  44 
 .../tomcat/websocket/AsyncChannelGroupUtil.java|  46 +---
 .../apache/tomcat/jdbc/pool/ConnectionPool.java|  15 +--
 19 files changed, 20 insertions(+), 570 deletions(-)

diff --git a/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java 
b/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java
index a9cf96761c..b3729e025c 100644
--- a/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java
+++ b/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java
@@ -19,9 +19,6 @@ package org.apache.tomcat.dbcp.dbcp2;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.nio.charset.StandardCharsets;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
 import java.sql.Connection;
 import java.sql.Driver;
 import java.sql.DriverManager;
@@ -73,30 +70,6 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
 static {
 // Attempt to prevent deadlocks - see DBCP - 272
 DriverManager.getDrivers();
-try {
-// Load classes now to prevent AccessControlExceptions later
-// A number of classes are loaded when getConnection() is called
-// but the following classes are not loaded and therefore require
-// explicit loading.
-if (Utils.isSecurityEnabled()) {
-final ClassLoader loader = 
BasicDataSource.class.getClassLoader();
-final String dbcpPackageName = 
BasicDataSource.class.getPackage().getName();
-loader.loadClass(dbcpPackageName + 
".DelegatingCallableStatement");
-loader.loadClass(dbcpPackageName + 
".DelegatingDatabaseMetaData");
-loader.loadClass(dbcpPackageName + 
".DelegatingPreparedStatement");
-loader.loadClass(dbcpPackageName + ".DelegatingResultSet");
-loader.loadClass(dbcpPackageName + 
".PoolableCallableStatement");
-loader.loadClass(dbcpPackageName + 
".PoolablePreparedStatement");
-loader.loadClass(dbcpPackageName + 
".PoolingConnection$StatementType");
-loader.loadClass(dbcpPackageName + ".PStmtKey");
-
-final String poolPackageName = 
PooledObject.class.getPackage().getName();
-loader.loadClass(poolPackageName + 
".impl.LinkedBlockingDeque$Node");
-loader.loadClass(poolPackageName + 
".impl.GenericKeyedObjectPool$ObjectDeque");
-}
-} catch (final ClassNotFoundException cnfe) {
-throw new IllegalStateException("Unable to pre-load classes", 
cnfe);
-}
 }
 
 /**
@@ -695,18 +668,6 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
  */
 @Override
 public Connection getConnection() throws SQLException {
-if (Utils.isSecurityEnabled()) {
-final PrivilegedExceptionAction action = () -> 
createDataSource().getConnection();
-try {
-return AccessController.doPrivileged(action);
-} catch (final PrivilegedActionException e) {
-final Throwable cause = e.getCause();
-if (cause instanceof SQLException) {
-throw (SQLException) cause;
-}
-throw new 

Re: CI, Java 17 and Javadoc

2023-01-12 Thread Rémy Maucherat
On Thu, Jan 12, 2023 at 3:03 PM Mark Thomas  wrote:
>
> On 12/01/2023 13:41, Rémy Maucherat wrote:
> > On Thu, Jan 12, 2023 at 1:19 PM Mark Thomas  wrote:
> >>
> >> I tried switching the CI over to use Java 17 last night. This exposed an
> >> unexpected Javadoc behaviour that is currently breaking the 9.0.x and
> >> 8.5.x builds.
> >>
> >> Ant is configured to run Javadoc with failonwarning="true"
> >>
> >> When running the Javadoc task with Java 17:
> >>
> >> - if source="11" (Tomcat 10.1.x and 11.0.x) no warnings are generated
> >> regarding SecurityManager use
> >>
> >> - if source="8" (Tomcat 9.0.x) warnings are generated for
> >> SecurityManager use
> >>
> >> - if source="7" (Tomcat 8.5.x) warnings are generated for
> >> SecurityManager use
> >>
> >> I don't understand why the warning generation is only generated for
> >> older source values. It would make more sense to me if it were only
> >> generated for newer values.
> >
> > Yes, ok, that looks very odd ...
> >
> >> Possible options:
> >> - only use Java 17 for 11.0.x builds
> >> - use failonwarning="false"
> >
> > Yes please. If you remember, I sent an update earlier on Javadoc 18+.
> > There will now be some warnings that will make it counterproductive
> > for us (in particular, having to have an empty constructor on
> > everything just so that it can be javadoc-ed). We should keep the
> > setting around however to see how these things evolve, maybe it would
> > be improved/fixed eventually ...
>
> Ah yes. I remember that now. I'll parameterise the setting and default
> it to false. Early indications are that the CheckStyle checks are more
> useful anyway. They have already uncovered a bunch of issues. Some are
> cosmetic but others are more significant such as whole sets of constants
> having the wrong descriptions.

Actually this javadoc validation through checkstyle looks better
indeed. It's nice you were able to find these options, I had no idea
it existed.

Rémy

> Mark
>
> >
> > Rémy
> >
> >> - something else
> >>
> >> I'll switch the CI system back to Java 11 while we discuss options. I
> >> also plan to look at CheckStyle options for Javadoc validation to see if
> >> they could be an alternative approach if we use failonwarning="false"
> >>
> >> Thoughts?
> >
> >
> >
> >> Mark
> >>
> >> -
> >> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: dev-h...@tomcat.apache.org
> >>
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: dev-h...@tomcat.apache.org
> >
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

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



[tomcat] branch main updated: Remove SecurityManager references from o.a.naming

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 3bb830bfd0 Remove SecurityManager references from o.a.naming
3bb830bfd0 is described below

commit 3bb830bfd0485dc30722e5574604dc48affa8898
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:24:32 2023 +

Remove SecurityManager references from o.a.naming
---
 .../org/apache/naming/ContextAccessController.java |  6 --
 .../apache/naming/factory/MailSessionFactory.java  | 87 ++
 .../apache/naming/factory/ResourceLinkFactory.java |  5 --
 .../org/apache/naming/factory/SendMailFactory.java | 64 +++-
 4 files changed, 66 insertions(+), 96 deletions(-)

diff --git a/java/org/apache/naming/ContextAccessController.java 
b/java/org/apache/naming/ContextAccessController.java
index 0fad089be5..35112df149 100644
--- a/java/org/apache/naming/ContextAccessController.java
+++ b/java/org/apache/naming/ContextAccessController.java
@@ -49,12 +49,6 @@ public class ContextAccessController {
  * @param token Security token
  */
 public static void setSecurityToken(Object name, Object token) {
-SecurityManager sm = System.getSecurityManager();
-if (sm != null) {
-sm.checkPermission(new RuntimePermission(
-ContextAccessController.class.getName()
-+ ".setSecurityToken"));
-}
 if ((!securityTokens.containsKey(name)) && (token != null)) {
 securityTokens.put(name, token);
 }
diff --git a/java/org/apache/naming/factory/MailSessionFactory.java 
b/java/org/apache/naming/factory/MailSessionFactory.java
index 29c902fd23..70a8d2f266 100644
--- a/java/org/apache/naming/factory/MailSessionFactory.java
+++ b/java/org/apache/naming/factory/MailSessionFactory.java
@@ -16,8 +16,6 @@
  */
 package org.apache.naming.factory;
 
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Properties;
@@ -97,57 +95,48 @@ public class MailSessionFactory implements ObjectFactory {
 return null;
 }
 
-// Create a new Session inside a doPrivileged block, so that JavaMail
-// can read its default properties without throwing Security
-// exceptions.
-//
-// Bugzilla 31288, 33077: add support for authentication.
-return AccessController.doPrivileged((PrivilegedAction) () -> 
{
-
-// Create the JavaMail properties we will use
-Properties props = new Properties();
-props.put("mail.transport.protocol", "smtp");
-props.put("mail.smtp.host", "localhost");
-
-String password = null;
-
-Enumeration attrs = ref.getAll();
-while (attrs.hasMoreElements()) {
-RefAddr attr = attrs.nextElement();
-if ("factory".equals(attr.getType())) {
-continue;
-}
-
-if ("password".equals(attr.getType())) {
-password = (String) attr.getContent();
-continue;
-}
-
-props.put(attr.getType(), attr.getContent());
+// Create the JavaMail properties we will use
+Properties props = new Properties();
+props.put("mail.transport.protocol", "smtp");
+props.put("mail.smtp.host", "localhost");
+
+String password = null;
+
+Enumeration attrs = ref.getAll();
+while (attrs.hasMoreElements()) {
+RefAddr attr = attrs.nextElement();
+if ("factory".equals(attr.getType())) {
+continue;
+}
+
+if ("password".equals(attr.getType())) {
+password = (String) attr.getContent();
+continue;
 }
 
-Authenticator auth = null;
-if (password != null) {
-String user = props.getProperty("mail.smtp.user");
-if(user == null) {
-user = props.getProperty("mail.user");
-}
-
-if(user != null) {
-final PasswordAuthentication pa = new 
PasswordAuthentication(user, password);
-auth = new Authenticator() {
-@Override
-protected PasswordAuthentication 
getPasswordAuthentication() {
-return pa;
-}
-};
-}
+props.put(attr.getType(), attr.getContent());
+}
+
+Authenticator auth = null;
+if (password != null) {
+String user = props.getProperty("mail.smtp.user");
+if(user == null) {
+user = 

[tomcat] branch main updated: Remove SecurityManager references from JULI

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 0377504b83 Remove SecurityManager references from JULI
0377504b83 is described below

commit 0377504b8394bbed872e50112e4f7c6b920eb282
Author: Mark Thomas 
AuthorDate: Thu Jan 12 19:21:14 2023 +

Remove SecurityManager references from JULI
---
 java/org/apache/juli/ClassLoaderLogManager.java | 117 ++--
 java/org/apache/juli/FileHandler.java   |  21 +
 2 files changed, 31 insertions(+), 107 deletions(-)

diff --git a/java/org/apache/juli/ClassLoaderLogManager.java 
b/java/org/apache/juli/ClassLoaderLogManager.java
index b4ab262601..5fc80f62d1 100644
--- a/java/org/apache/juli/ClassLoaderLogManager.java
+++ b/java/org/apache/juli/ClassLoaderLogManager.java
@@ -18,15 +18,10 @@ package org.apache.juli;
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FilePermission;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 import java.net.URLClassLoader;
-import java.security.AccessControlException;
-import java.security.AccessController;
-import java.security.Permission;
-import java.security.PrivilegedAction;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -143,14 +138,7 @@ public class ClassLoaderLogManager extends LogManager {
 // Apply initial level for new logger
 final String levelString = getProperty(loggerName + ".level");
 if (levelString != null) {
-try {
-AccessController.doPrivileged((PrivilegedAction) () -> {
-logger.setLevel(Level.parse(levelString.trim()));
-return null;
-});
-} catch (IllegalArgumentException e) {
-// Leave level set to null
-}
+logger.setLevel(Level.parse(levelString.trim()));
 }
 
 // Always instantiate parent loggers so that
@@ -168,7 +156,7 @@ public class ClassLoaderLogManager extends LogManager {
 // Set parent logger
 Logger parentLogger = node.findParentLogger();
 if (parentLogger != null) {
-doSetParentLogger(logger, parentLogger);
+logger.setParent(parentLogger);
 }
 
 // Tell children we are their new parent
@@ -305,24 +293,14 @@ public class ClassLoaderLogManager extends LogManager {
 }
 
 @Override
-public void readConfiguration()
-throws IOException, SecurityException {
-
-checkAccess();
-
+public void readConfiguration() throws IOException, SecurityException {
 readConfiguration(getClassLoader());
-
 }
 
 @Override
-public void readConfiguration(InputStream is)
-throws IOException, SecurityException {
-
-checkAccess();
+public void readConfiguration(InputStream is) throws IOException, 
SecurityException {
 reset();
-
 readConfiguration(is, getClassLoader());
-
 }
 
 @Override
@@ -400,15 +378,11 @@ public class ClassLoaderLogManager extends LogManager {
 }
 ClassLoaderLogInfo info = classLoaderLoggers.get(classLoader);
 if (info == null) {
-final ClassLoader classLoaderParam = classLoader;
-AccessController.doPrivileged((PrivilegedAction) () -> {
-try {
-readConfiguration(classLoaderParam);
-} catch (IOException e) {
-// Ignore
-}
-return null;
-});
+try {
+readConfiguration(classLoader);
+} catch (IOException e) {
+// Ignore
+}
 info = classLoaderLoggers.get(classLoader);
 }
 return info;
@@ -427,45 +401,27 @@ public class ClassLoaderLogManager extends LogManager {
 InputStream is = null;
 // Special case for URL classloaders which are used in containers:
 // only look in the local repositories to avoid redefining loggers 20 
times
-try {
-if (classLoader instanceof WebappProperties) {
-if (((WebappProperties) classLoader).hasLoggingConfig()) {
-is = classLoader.getResourceAsStream("logging.properties");
+if (classLoader instanceof WebappProperties) {
+if (((WebappProperties) classLoader).hasLoggingConfig()) {
+is = classLoader.getResourceAsStream("logging.properties");
+}
+} else if (classLoader instanceof URLClassLoader) {
+URL logConfig = 
((URLClassLoader)classLoader).findResource("logging.properties");
+
+if(null != logConfig) {
+if(Boolean.getBoolean(DEBUG_PROPERTY)) {
+System.err.println(getClass().getName()

Re: [VOTE] Release Apache Tomcat 8.5.85

2023-01-12 Thread Mark Thomas

On 12/01/2023 19:01, Christopher Schultz wrote:




It looks like the Release Process document should include this:

--- Create the tag
(Do existing tag stuff, up through but not including the "commit" step)

* Run a release build (ant release)
* git add res/install-win/tomcat-installer.exe.sig 
res/install-win/Uninstall.exe.sig

(or maybe this is covered already by the upcoming "git commit -a")


I think if you switch that to "git commit -A" it will pick up the new 
files as well as the modified ones. Just make sure you have a clean 
checkout.


Mark



(now resume with the existing "commit" step)

Now, instead of resetting the local copy, you should just be able to 
continue with the release from that point, no? All the build artifacts 
have been completed and there's no need to check-out from the tag and 
rebuild the release.


-chris

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



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



Re: [VOTE] Release Apache Tomcat 8.5.85

2023-01-12 Thread Christopher Schultz

Mark,

On 1/12/23 13:55, Mark Thomas wrote:

Something like:

git checkout 8.5.85
git add ...
git commit - "Update 8.5.85 tag to include signature files"
git tag -d 8.5.85
git push --delete origin 8.5.85
git tag 8.5.85
git push origin 8.5.85

?


I can try that. I wasn't sure if tags were also branches.

Well, at least nobody is really leaning on us to provide super-clean 
no-funny-business repeatable builds ;)


-chris


On 12/01/2023 18:51, Christopher Schultz wrote:

Mark,

On 1/11/23 14:45, Mark Thomas wrote:

On 11/01/2023 15:49, Christopher Schultz wrote:

Mark,

On 1/11/23 10:39, Christopher Schultz wrote:

Mark,

On 1/11/23 04:22, Mark Thomas wrote:

On 11/01/2023 01:47, Christopher Schultz wrote:


The proposed 8.5.85 release is:
[X] Broken - do not release
[ ] Stable - go ahead and release as 8.5.85 (stable)


The signature files required for a reproducible build are missing 
from the tag.


Compare

https://github.com/apache/tomcat/tree/10.1.5/res/install-win

with

https://github.com/apache/tomcat/tree/8.5.85/res/install-win


:(

Let me see how that happened.


Oh, right. I was thinking I was missing build.properties.release, 
but I'm missing the detached signatures.


That's because I followed the "release process" page and forgot that 
you basically have to do a complete release, push those signatures 
to the tag, and then re-build the release from the tag. Do I have 
that right?


Should I cancel the vote and re-start, or let the process continue?


In theory, if you still have the sig files you should be able to 
re-tag without changing the binaries. If that works, I'd restart the 
VOTE with an updated tag hash.


I have everything from the release build still here, including these 
sigs:


./output/dist/src/res/install-win/tomcat-installer.exe.sig
./output/dist/src/res/install-win/Uninstall.exe.sig
./output/dist/Uninstall.exe.sig
./res/install-win/tomcat-installer.exe.sig
./res/install-win/Uninstall.exe.sig

So I think I can do it just by re-tagging.

Unfortunately, the branch has diverged since I cut my release tag. Can 
I use a tag as a branch and produce a new tag from that? I know the 
commit id of the branch just prior to tagging. My git-fu is weak on 
all this.


Or should I just cancel the vote and use a new release version?

-chris

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



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



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



Re: [VOTE] Release Apache Tomcat 8.5.85

2023-01-12 Thread Christopher Schultz

All,

On 1/12/23 13:51, Christopher Schultz wrote:

Mark,

On 1/11/23 14:45, Mark Thomas wrote:

On 11/01/2023 15:49, Christopher Schultz wrote:

Mark,

On 1/11/23 10:39, Christopher Schultz wrote:

Mark,

On 1/11/23 04:22, Mark Thomas wrote:

On 11/01/2023 01:47, Christopher Schultz wrote:


The proposed 8.5.85 release is:
[X] Broken - do not release
[ ] Stable - go ahead and release as 8.5.85 (stable)


The signature files required for a reproducible build are missing 
from the tag.


Compare

https://github.com/apache/tomcat/tree/10.1.5/res/install-win

with

https://github.com/apache/tomcat/tree/8.5.85/res/install-win


:(

Let me see how that happened.


Oh, right. I was thinking I was missing build.properties.release, but 
I'm missing the detached signatures.


That's because I followed the "release process" page and forgot that 
you basically have to do a complete release, push those signatures to 
the tag, and then re-build the release from the tag. Do I have that 
right?


Should I cancel the vote and re-start, or let the process continue?


In theory, if you still have the sig files you should be able to 
re-tag without changing the binaries. If that works, I'd restart the 
VOTE with an updated tag hash.


I have everything from the release build still here, including these sigs:

./output/dist/src/res/install-win/tomcat-installer.exe.sig
./output/dist/src/res/install-win/Uninstall.exe.sig
./output/dist/Uninstall.exe.sig
./res/install-win/tomcat-installer.exe.sig
./res/install-win/Uninstall.exe.sig

So I think I can do it just by re-tagging.

Unfortunately, the branch has diverged since I cut my release tag. Can I 
use a tag as a branch and produce a new tag from that? I know the commit 
id of the branch just prior to tagging. My git-fu is weak on all this.


Or should I just cancel the vote and use a new release version?


It looks like the Release Process document should include this:

--- Create the tag
(Do existing tag stuff, up through but not including the "commit" step)

* Run a release build (ant release)
* git add res/install-win/tomcat-installer.exe.sig 
res/install-win/Uninstall.exe.sig

(or maybe this is covered already by the upcoming "git commit -a")

(now resume with the existing "commit" step)

Now, instead of resetting the local copy, you should just be able to 
continue with the release from that point, no? All the build artifacts 
have been completed and there's no need to check-out from the tag and 
rebuild the release.


-chris

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



Re: [VOTE] Release Apache Tomcat 8.5.85

2023-01-12 Thread Mark Thomas

Something like:

git checkout 8.5.85
git add ...
git commit - "Update 8.5.85 tag to include signature files"
git tag -d 8.5.85
git push --delete origin 8.5.85
git tag 8.5.85
git push origin 8.5.85

?

Mark


On 12/01/2023 18:51, Christopher Schultz wrote:

Mark,

On 1/11/23 14:45, Mark Thomas wrote:

On 11/01/2023 15:49, Christopher Schultz wrote:

Mark,

On 1/11/23 10:39, Christopher Schultz wrote:

Mark,

On 1/11/23 04:22, Mark Thomas wrote:

On 11/01/2023 01:47, Christopher Schultz wrote:


The proposed 8.5.85 release is:
[X] Broken - do not release
[ ] Stable - go ahead and release as 8.5.85 (stable)


The signature files required for a reproducible build are missing 
from the tag.


Compare

https://github.com/apache/tomcat/tree/10.1.5/res/install-win

with

https://github.com/apache/tomcat/tree/8.5.85/res/install-win


:(

Let me see how that happened.


Oh, right. I was thinking I was missing build.properties.release, but 
I'm missing the detached signatures.


That's because I followed the "release process" page and forgot that 
you basically have to do a complete release, push those signatures to 
the tag, and then re-build the release from the tag. Do I have that 
right?


Should I cancel the vote and re-start, or let the process continue?


In theory, if you still have the sig files you should be able to 
re-tag without changing the binaries. If that works, I'd restart the 
VOTE with an updated tag hash.


I have everything from the release build still here, including these sigs:

./output/dist/src/res/install-win/tomcat-installer.exe.sig
./output/dist/src/res/install-win/Uninstall.exe.sig
./output/dist/Uninstall.exe.sig
./res/install-win/tomcat-installer.exe.sig
./res/install-win/Uninstall.exe.sig

So I think I can do it just by re-tagging.

Unfortunately, the branch has diverged since I cut my release tag. Can I 
use a tag as a branch and produce a new tag from that? I know the commit 
id of the branch just prior to tagging. My git-fu is weak on all this.


Or should I just cancel the vote and use a new release version?

-chris

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



-
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: CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk

2023-01-12 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 9c9afff9fb CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk
9c9afff9fb is described below

commit 9c9afff9fbe600fcb14e62e30e59f4a95770bdc7
Author: Mark Thomas 
AuthorDate: Thu Jan 12 18:41:58 2023 +

CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk
---
 java/javax/servlet/jsp/tagext/TagData.java |  2 +-
 java/org/apache/catalina/realm/JAASRealm.java  | 26 --
 java/org/apache/catalina/servlets/CGIServlet.java  |  2 +-
 .../TomcatURLStreamHandlerFactory.java |  1 -
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 java/org/apache/naming/StringManager.java  | 14 ++--
 .../apache/tomcat/jdbc/pool/PoolConfiguration.java | 10 -
 res/checkstyle/checkstyle.xml  |  1 +
 8 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/java/javax/servlet/jsp/tagext/TagData.java 
b/java/javax/servlet/jsp/tagext/TagData.java
index 78f3e17988..9740164b35 100644
--- a/java/javax/servlet/jsp/tagext/TagData.java
+++ b/java/javax/servlet/jsp/tagext/TagData.java
@@ -50,7 +50,7 @@ public class TagData implements Cloneable {
  *
  * All values must be Strings except for those holding the
  * distinguished object REQUEST_TIME_VALUE.
-
+ *
  * @param atts the static attribute and values.  May be null.
  */
 public TagData(Object[] atts[]) {
diff --git a/java/org/apache/catalina/realm/JAASRealm.java 
b/java/org/apache/catalina/realm/JAASRealm.java
index ce3c4bafdd..71c2af984c 100644
--- a/java/org/apache/catalina/realm/JAASRealm.java
+++ b/java/org/apache/catalina/realm/JAASRealm.java
@@ -96,21 +96,23 @@ import org.apache.tomcat.util.ExceptionUtils;
  * with this name in the JAAS configuration file. Here is a hypothetical
  * JAAS configuration file entry for a database-oriented login module that 
uses
  * a Tomcat-managed JNDI database resource:
- * Catalina {
-org.foobar.auth.DatabaseLoginModule REQUIRED
-JNDI_RESOURCE=jdbc/AuthDB
-  USER_TABLE=users
-  USER_ID_COLUMN=id
-  USER_NAME_COLUMN=name
-  USER_CREDENTIAL_COLUMN=password
-  ROLE_TABLE=roles
-  ROLE_NAME_COLUMN=name
-  PRINCIPAL_FACTORY=org.foobar.auth.impl.SimplePrincipalFactory;
-};
+ * 
+ * Catalina {
+ * org.foobar.auth.DatabaseLoginModule REQUIRED
+ *   JNDI_RESOURCE=jdbc/AuthDB
+ *   USER_TABLE=users
+ *   USER_ID_COLUMN=id
+ *   USER_NAME_COLUMN=name
+ *   USER_CREDENTIAL_COLUMN=password
+ *   ROLE_TABLE=roles
+ *   ROLE_NAME_COLUMN=name
+ *   PRINCIPAL_FACTORY=org.foobar.auth.impl.SimplePrincipalFactory;
+ * };
+ * 
  * To set the JAAS configuration file
  * location, set the CATALINA_OPTS environment variable
  * similar to the following:
-CATALINA_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config"
+ * 
CATALINA_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config"
  * 
  * As part of the login process, JAASRealm registers its own 
CallbackHandler,
  * called (unsurprisingly) JAASCallbackHandler. This handler 
supplies the
diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index 902f138a59..1b6e5cb9da 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -764,7 +764,7 @@ public final class CGIServlet extends HttpServlet {
  *
  * @return true if the request was parsed without error, false if there
  *   was a problem
-
+ *
  * @throws UnsupportedEncodingException Unknown encoding
  */
 protected boolean setupFromRequest(HttpServletRequest req)
diff --git 
a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java 
b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
index f2dd35ba39..d58f9d3fef 100644
--- a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
+++ b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
@@ -86,7 +86,6 @@ public class TomcatURLStreamHandlerFactory implements 
URLStreamHandlerFactory {
  * successfully disabled as a result of this call.
  * false if the factory was already registered prior
  * to this call.
-
  */
 public static boolean disable() {
 return !getInstanceInternal(false).isRegistered();
diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index 322a14ecd3..27f9eff1ad 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -652,7 +652,7 @@ public class AjpProcessor extends AbstractProcessor {
  * @param message   

Re: [VOTE] Release Apache Tomcat 8.5.85

2023-01-12 Thread Christopher Schultz

Mark,

On 1/11/23 14:45, Mark Thomas wrote:

On 11/01/2023 15:49, Christopher Schultz wrote:

Mark,

On 1/11/23 10:39, Christopher Schultz wrote:

Mark,

On 1/11/23 04:22, Mark Thomas wrote:

On 11/01/2023 01:47, Christopher Schultz wrote:


The proposed 8.5.85 release is:
[X] Broken - do not release
[ ] Stable - go ahead and release as 8.5.85 (stable)


The signature files required for a reproducible build are missing 
from the tag.


Compare

https://github.com/apache/tomcat/tree/10.1.5/res/install-win

with

https://github.com/apache/tomcat/tree/8.5.85/res/install-win


:(

Let me see how that happened.


Oh, right. I was thinking I was missing build.properties.release, but 
I'm missing the detached signatures.


That's because I followed the "release process" page and forgot that 
you basically have to do a complete release, push those signatures to 
the tag, and then re-build the release from the tag. Do I have that 
right?


Should I cancel the vote and re-start, or let the process continue?


In theory, if you still have the sig files you should be able to re-tag 
without changing the binaries. If that works, I'd restart the VOTE with 
an updated tag hash.


I have everything from the release build still here, including these sigs:

./output/dist/src/res/install-win/tomcat-installer.exe.sig
./output/dist/src/res/install-win/Uninstall.exe.sig
./output/dist/Uninstall.exe.sig
./res/install-win/tomcat-installer.exe.sig
./res/install-win/Uninstall.exe.sig

So I think I can do it just by re-tagging.

Unfortunately, the branch has diverged since I cut my release tag. Can I 
use a tag as a branch and produce a new tag from that? I know the commit 
id of the branch just prior to tagging. My git-fu is weak on all this.


Or should I just cancel the vote and use a new release version?

-chris

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



[tomcat] branch 9.0.x updated: CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new acda728a52 CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk
acda728a52 is described below

commit acda728a529670449b32a5099dfd467b62932527
Author: Mark Thomas 
AuthorDate: Thu Jan 12 18:41:58 2023 +

CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk
---
 java/javax/servlet/jsp/tagext/TagData.java |  2 +-
 java/org/apache/catalina/realm/JAASRealm.java  | 26 --
 java/org/apache/catalina/servlets/CGIServlet.java  |  2 +-
 .../TomcatURLStreamHandlerFactory.java |  1 -
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 java/org/apache/naming/StringManager.java  | 14 ++--
 .../tomcat/dbcp/dbcp2/managed/package-info.java|  2 +-
 .../apache/tomcat/jdbc/pool/PoolConfiguration.java | 10 -
 res/checkstyle/checkstyle.xml  |  1 +
 9 files changed, 31 insertions(+), 29 deletions(-)

diff --git a/java/javax/servlet/jsp/tagext/TagData.java 
b/java/javax/servlet/jsp/tagext/TagData.java
index 78f3e17988..9740164b35 100644
--- a/java/javax/servlet/jsp/tagext/TagData.java
+++ b/java/javax/servlet/jsp/tagext/TagData.java
@@ -50,7 +50,7 @@ public class TagData implements Cloneable {
  *
  * All values must be Strings except for those holding the
  * distinguished object REQUEST_TIME_VALUE.
-
+ *
  * @param atts the static attribute and values.  May be null.
  */
 public TagData(Object[] atts[]) {
diff --git a/java/org/apache/catalina/realm/JAASRealm.java 
b/java/org/apache/catalina/realm/JAASRealm.java
index ae4b46ad59..1a0c876a76 100644
--- a/java/org/apache/catalina/realm/JAASRealm.java
+++ b/java/org/apache/catalina/realm/JAASRealm.java
@@ -96,21 +96,23 @@ import org.apache.tomcat.util.ExceptionUtils;
  * with this name in the JAAS configuration file. Here is a hypothetical
  * JAAS configuration file entry for a database-oriented login module that 
uses
  * a Tomcat-managed JNDI database resource:
- * Catalina {
-org.foobar.auth.DatabaseLoginModule REQUIRED
-JNDI_RESOURCE=jdbc/AuthDB
-  USER_TABLE=users
-  USER_ID_COLUMN=id
-  USER_NAME_COLUMN=name
-  USER_CREDENTIAL_COLUMN=password
-  ROLE_TABLE=roles
-  ROLE_NAME_COLUMN=name
-  PRINCIPAL_FACTORY=org.foobar.auth.impl.SimplePrincipalFactory;
-};
+ * 
+ * Catalina {
+ * org.foobar.auth.DatabaseLoginModule REQUIRED
+ *   JNDI_RESOURCE=jdbc/AuthDB
+ *   USER_TABLE=users
+ *   USER_ID_COLUMN=id
+ *   USER_NAME_COLUMN=name
+ *   USER_CREDENTIAL_COLUMN=password
+ *   ROLE_TABLE=roles
+ *   ROLE_NAME_COLUMN=name
+ *   PRINCIPAL_FACTORY=org.foobar.auth.impl.SimplePrincipalFactory;
+ * };
+ * 
  * To set the JAAS configuration file
  * location, set the CATALINA_OPTS environment variable
  * similar to the following:
-CATALINA_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config"
+ * 
CATALINA_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config"
  * 
  * As part of the login process, JAASRealm registers its own 
CallbackHandler,
  * called (unsurprisingly) JAASCallbackHandler. This handler 
supplies the
diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index 9d503b4f0c..2694a38807 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -764,7 +764,7 @@ public final class CGIServlet extends HttpServlet {
  *
  * @return true if the request was parsed without error, false if there
  *   was a problem
-
+ *
  * @throws UnsupportedEncodingException Unknown encoding
  */
 protected boolean setupFromRequest(HttpServletRequest req)
diff --git 
a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java 
b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
index f2dd35ba39..d58f9d3fef 100644
--- a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
+++ b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
@@ -86,7 +86,6 @@ public class TomcatURLStreamHandlerFactory implements 
URLStreamHandlerFactory {
  * successfully disabled as a result of this call.
  * false if the factory was already registered prior
  * to this call.
-
  */
 public static boolean disable() {
 return !getInstanceInternal(false).isRegistered();
diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index 420f2db132..1b5d311836 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -558,7 +558,7 @@ public class 

[tomcat] branch 10.1.x updated: CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 4b38d6dbcf CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk
4b38d6dbcf is described below

commit 4b38d6dbcfa06e1e0d6b7435da87632cee16572a
Author: Mark Thomas 
AuthorDate: Thu Jan 12 18:41:58 2023 +

CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk
---
 java/jakarta/servlet/jsp/tagext/TagData.java   |  2 +-
 java/org/apache/catalina/realm/JAASRealm.java  | 26 --
 java/org/apache/catalina/servlets/CGIServlet.java  |  2 +-
 .../TomcatURLStreamHandlerFactory.java |  1 -
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 java/org/apache/naming/StringManager.java  | 14 ++--
 .../tomcat/dbcp/dbcp2/managed/package-info.java|  2 +-
 .../apache/tomcat/jdbc/pool/PoolConfiguration.java | 10 -
 res/checkstyle/checkstyle.xml  |  1 +
 9 files changed, 31 insertions(+), 29 deletions(-)

diff --git a/java/jakarta/servlet/jsp/tagext/TagData.java 
b/java/jakarta/servlet/jsp/tagext/TagData.java
index 989a7a83df..680acf3c74 100644
--- a/java/jakarta/servlet/jsp/tagext/TagData.java
+++ b/java/jakarta/servlet/jsp/tagext/TagData.java
@@ -50,7 +50,7 @@ public class TagData implements Cloneable {
  *
  * All values must be Strings except for those holding the
  * distinguished object REQUEST_TIME_VALUE.
-
+ *
  * @param atts the static attribute and values.  May be null.
  */
 public TagData(Object[] atts[]) {
diff --git a/java/org/apache/catalina/realm/JAASRealm.java 
b/java/org/apache/catalina/realm/JAASRealm.java
index f249ae4387..c6b1dcfbfa 100644
--- a/java/org/apache/catalina/realm/JAASRealm.java
+++ b/java/org/apache/catalina/realm/JAASRealm.java
@@ -97,21 +97,23 @@ import org.apache.tomcat.util.ExceptionUtils;
  * with this name in the JAAS configuration file. Here is a hypothetical
  * JAAS configuration file entry for a database-oriented login module that 
uses
  * a Tomcat-managed JNDI database resource:
- * Catalina {
-org.foobar.auth.DatabaseLoginModule REQUIRED
-JNDI_RESOURCE=jdbc/AuthDB
-  USER_TABLE=users
-  USER_ID_COLUMN=id
-  USER_NAME_COLUMN=name
-  USER_CREDENTIAL_COLUMN=password
-  ROLE_TABLE=roles
-  ROLE_NAME_COLUMN=name
-  PRINCIPAL_FACTORY=org.foobar.auth.impl.SimplePrincipalFactory;
-};
+ * 
+ * Catalina {
+ * org.foobar.auth.DatabaseLoginModule REQUIRED
+ *   JNDI_RESOURCE=jdbc/AuthDB
+ *   USER_TABLE=users
+ *   USER_ID_COLUMN=id
+ *   USER_NAME_COLUMN=name
+ *   USER_CREDENTIAL_COLUMN=password
+ *   ROLE_TABLE=roles
+ *   ROLE_NAME_COLUMN=name
+ *   PRINCIPAL_FACTORY=org.foobar.auth.impl.SimplePrincipalFactory;
+ * };
+ * 
  * To set the JAAS configuration file
  * location, set the CATALINA_OPTS environment variable
  * similar to the following:
-CATALINA_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config"
+ * 
CATALINA_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config"
  * 
  * As part of the login process, JAASRealm registers its own 
CallbackHandler,
  * called (unsurprisingly) JAASCallbackHandler. This handler 
supplies the
diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index cb4a7421bb..d93c7dbb36 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -765,7 +765,7 @@ public final class CGIServlet extends HttpServlet {
  *
  * @return true if the request was parsed without error, false if there
  *   was a problem
-
+ *
  * @throws UnsupportedEncodingException Unknown encoding
  */
 protected boolean setupFromRequest(HttpServletRequest req)
diff --git 
a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java 
b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
index f2dd35ba39..d58f9d3fef 100644
--- a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
+++ b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
@@ -86,7 +86,6 @@ public class TomcatURLStreamHandlerFactory implements 
URLStreamHandlerFactory {
  * successfully disabled as a result of this call.
  * false if the factory was already registered prior
  * to this call.
-
  */
 public static boolean disable() {
 return !getInstanceInternal(false).isRegistered();
diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index a7911e75f8..3d50ae89b5 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -565,7 +565,7 @@ public 

[tomcat] branch main updated: CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 65392b14e8 CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk
65392b14e8 is described below

commit 65392b14e87e585289990b0dd65af87f58ab8c3f
Author: Mark Thomas 
AuthorDate: Thu Jan 12 18:41:58 2023 +

CheckStyle Javadoc checks += JavadocMissingLeadingAsterisk
---
 java/jakarta/servlet/jsp/tagext/TagData.java   |  2 +-
 java/org/apache/catalina/realm/JAASRealm.java  | 26 --
 java/org/apache/catalina/servlets/CGIServlet.java  |  2 +-
 .../TomcatURLStreamHandlerFactory.java |  1 -
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 java/org/apache/naming/StringManager.java  | 14 ++--
 .../tomcat/dbcp/dbcp2/managed/package-info.java|  2 +-
 .../apache/tomcat/jdbc/pool/PoolConfiguration.java | 10 -
 res/checkstyle/checkstyle.xml  |  1 +
 9 files changed, 31 insertions(+), 29 deletions(-)

diff --git a/java/jakarta/servlet/jsp/tagext/TagData.java 
b/java/jakarta/servlet/jsp/tagext/TagData.java
index 989a7a83df..680acf3c74 100644
--- a/java/jakarta/servlet/jsp/tagext/TagData.java
+++ b/java/jakarta/servlet/jsp/tagext/TagData.java
@@ -50,7 +50,7 @@ public class TagData implements Cloneable {
  *
  * All values must be Strings except for those holding the
  * distinguished object REQUEST_TIME_VALUE.
-
+ *
  * @param atts the static attribute and values.  May be null.
  */
 public TagData(Object[] atts[]) {
diff --git a/java/org/apache/catalina/realm/JAASRealm.java 
b/java/org/apache/catalina/realm/JAASRealm.java
index f249ae4387..c6b1dcfbfa 100644
--- a/java/org/apache/catalina/realm/JAASRealm.java
+++ b/java/org/apache/catalina/realm/JAASRealm.java
@@ -97,21 +97,23 @@ import org.apache.tomcat.util.ExceptionUtils;
  * with this name in the JAAS configuration file. Here is a hypothetical
  * JAAS configuration file entry for a database-oriented login module that 
uses
  * a Tomcat-managed JNDI database resource:
- * Catalina {
-org.foobar.auth.DatabaseLoginModule REQUIRED
-JNDI_RESOURCE=jdbc/AuthDB
-  USER_TABLE=users
-  USER_ID_COLUMN=id
-  USER_NAME_COLUMN=name
-  USER_CREDENTIAL_COLUMN=password
-  ROLE_TABLE=roles
-  ROLE_NAME_COLUMN=name
-  PRINCIPAL_FACTORY=org.foobar.auth.impl.SimplePrincipalFactory;
-};
+ * 
+ * Catalina {
+ * org.foobar.auth.DatabaseLoginModule REQUIRED
+ *   JNDI_RESOURCE=jdbc/AuthDB
+ *   USER_TABLE=users
+ *   USER_ID_COLUMN=id
+ *   USER_NAME_COLUMN=name
+ *   USER_CREDENTIAL_COLUMN=password
+ *   ROLE_TABLE=roles
+ *   ROLE_NAME_COLUMN=name
+ *   PRINCIPAL_FACTORY=org.foobar.auth.impl.SimplePrincipalFactory;
+ * };
+ * 
  * To set the JAAS configuration file
  * location, set the CATALINA_OPTS environment variable
  * similar to the following:
-CATALINA_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config"
+ * 
CATALINA_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config"
  * 
  * As part of the login process, JAASRealm registers its own 
CallbackHandler,
  * called (unsurprisingly) JAASCallbackHandler. This handler 
supplies the
diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index cb4a7421bb..d93c7dbb36 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -765,7 +765,7 @@ public final class CGIServlet extends HttpServlet {
  *
  * @return true if the request was parsed without error, false if there
  *   was a problem
-
+ *
  * @throws UnsupportedEncodingException Unknown encoding
  */
 protected boolean setupFromRequest(HttpServletRequest req)
diff --git 
a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java 
b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
index f2dd35ba39..d58f9d3fef 100644
--- a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
+++ b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
@@ -86,7 +86,6 @@ public class TomcatURLStreamHandlerFactory implements 
URLStreamHandlerFactory {
  * successfully disabled as a result of this call.
  * false if the factory was already registered prior
  * to this call.
-
  */
 public static boolean disable() {
 return !getInstanceInternal(false).isRegistered();
diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index a7911e75f8..3d50ae89b5 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -565,7 +565,7 @@ public class 

Re: CI, Java 17 and Javadoc

2023-01-12 Thread Christopher Schultz

Mark,

On 1/12/23 07:19, Mark Thomas wrote:
I tried switching the CI over to use Java 17 last night. This exposed an 
unexpected Javadoc behaviour that is currently breaking the 9.0.x and 
8.5.x builds.


Ant is configured to run Javadoc with failonwarning="true"

When running the Javadoc task with Java 17:

- if source="11" (Tomcat 10.1.x and 11.0.x) no warnings are generated
   regarding SecurityManager use

- if source="8" (Tomcat 9.0.x) warnings are generated for
   SecurityManager use

- if source="7" (Tomcat 8.5.x) warnings are generated for
   SecurityManager use

I don't understand why the warning generation is only generated for 
older source values. It would make more sense to me if it were only 
generated for newer values.


Possible options:
- only use Java 17 for 11.0.x builds
- use failonwarning="false"
- something else

>
I'll switch the CI system back to Java 11 while we discuss options. I 
also plan to look at CheckStyle options for Javadoc validation to see if 
they could be an alternative approach if we use failonwarning="false"


Thoughts?


I'm +1 for only moving-forward with Tomcat 11 for the time being. It 
makes sense to ratchet things forward at least there.


-chris

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



Buildbot failure in on tomcat-10.1.x

2023-01-12 Thread buildbot
Build status: BUILD FAILED: failed Snapshot deployed to ASF Maven snapshot 
repository (failure)
Worker used: bb2_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/624
Blamelist: Mark Thomas 
Build Text: failed Snapshot deployed to ASF Maven snapshot repository (failure)
Status Detected: new failure
Build Source Stamp: [branch 10.1.x] c68a614d7003316cc972684e24c98074fba5dee5


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 2


-- ASF Buildbot


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



[tomcat] branch main updated: Additional SecurityManagter related changes for o.a.el in the unit tests

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new d9c1d8e253 Additional SecurityManagter related changes for o.a.el in 
the unit tests
d9c1d8e253 is described below

commit d9c1d8e253e995cc78136c3d69fc0fe8dfd1b399
Author: Mark Thomas 
AuthorDate: Thu Jan 12 17:52:25 2023 +

Additional SecurityManagter related changes for o.a.el in the unit tests
---
 java/org/apache/jasper/Constants.java  |   6 --
 java/org/apache/jasper/EmbeddedServletOptions.java |   4 -
 java/org/apache/jasper/JspCompilationContext.java  |   3 +-
 .../apache/jasper/compiler/ELFunctionMapper.java   |  12 +--
 .../apache/jasper/compiler/JspDocumentParser.java  |  27 +
 .../apache/jasper/compiler/JspRuntimeContext.java  | 115 
 .../apache/jasper/compiler/TagPluginManager.java   |  27 +
 java/org/apache/jasper/compiler/Validator.java |   5 +-
 java/org/apache/jasper/el/ELContextImpl.java   |  45 +++-
 .../jasper/resources/LocalStrings.properties   |   1 -
 .../jasper/resources/LocalStrings_cs.properties|   1 -
 .../jasper/resources/LocalStrings_de.properties|   1 -
 .../jasper/resources/LocalStrings_es.properties|   1 -
 .../jasper/resources/LocalStrings_fr.properties|   1 -
 .../jasper/resources/LocalStrings_ja.properties|   1 -
 .../jasper/resources/LocalStrings_ko.properties|   1 -
 .../jasper/resources/LocalStrings_pt_BR.properties |   1 -
 .../jasper/resources/LocalStrings_zh_CN.properties |   1 -
 .../jasper/runtime/JspApplicationContextImpl.java  |  10 +-
 java/org/apache/jasper/runtime/JspFactoryImpl.java | 117 +++--
 .../apache/jasper/security/SecurityClassLoad.java  |  64 ---
 java/org/apache/jasper/security/SecurityUtil.java  |  41 
 .../apache/jasper/servlet/JasperInitializer.java   |   2 -
 java/org/apache/jasper/servlet/JasperLoader.java   |  43 +---
 java/org/apache/jasper/servlet/JspServlet.java |  25 +
 test/jakarta/el/TestBeanELResolver.java|   2 +-
 test/jakarta/el/TestMethodReference.java   |   4 +-
 test/jakarta/el/TestResourceBundleELResolver.java  |   2 +-
 test/org/apache/el/TestELEvaluation.java   |   2 +-
 test/org/apache/el/TestExpressionFactory.java  |   2 +-
 test/org/apache/el/TestMethodExpressionImpl.java   |   2 +-
 test/org/apache/el/TestValueExpressionImpl.java|  18 ++--
 test/org/apache/el/parser/TestELParser.java|  10 +-
 test/org/apache/el/util/TestReflectionUtil.java|   2 +-
 .../jasper/compiler/TestAttributeParser.java   |   2 +-
 35 files changed, 66 insertions(+), 535 deletions(-)

diff --git a/java/org/apache/jasper/Constants.java 
b/java/org/apache/jasper/Constants.java
index 7a5f736e8c..efed51e648 100644
--- a/java/org/apache/jasper/Constants.java
+++ b/java/org/apache/jasper/Constants.java
@@ -59,12 +59,6 @@ public class Constants {
  */
 public static final int MAX_POOL_SIZE = 5;
 
-/**
- * Has security been turned on?
- */
-public static final boolean IS_SECURITY_ENABLED =
-(System.getSecurityManager() != null);
-
 /**
  * Name of the system property containing
  * the tomcat product installation path
diff --git a/java/org/apache/jasper/EmbeddedServletOptions.java 
b/java/org/apache/jasper/EmbeddedServletOptions.java
index a0a88dea46..33156864f2 100644
--- a/java/org/apache/jasper/EmbeddedServletOptions.java
+++ b/java/org/apache/jasper/EmbeddedServletOptions.java
@@ -727,10 +727,6 @@ public final class EmbeddedServletOptions implements 
Options {
  * scratchdir
  */
 String dir = config.getInitParameter("scratchdir");
-if (dir != null && Constants.IS_SECURITY_ENABLED) {
-log.info(Localizer.getMessage("jsp.info.ignoreSetting", 
"scratchdir", dir));
-dir = null;
-}
 if (dir != null) {
 scratchDir = new File(dir);
 } else {
diff --git a/java/org/apache/jasper/JspCompilationContext.java 
b/java/org/apache/jasper/JspCompilationContext.java
index 9876c56f93..6cedf2814d 100644
--- a/java/org/apache/jasper/JspCompilationContext.java
+++ b/java/org/apache/jasper/JspCompilationContext.java
@@ -178,8 +178,7 @@ public class JspCompilationContext {
 
 public ClassLoader getJspLoader() {
 if( jspLoader == null ) {
-jspLoader = new JasperLoader(new URL[] {baseUrl}, getClassLoader(),
-basePackageName, rctxt.getPermissionCollection());
+jspLoader = new JasperLoader(new URL[] {baseUrl}, 
getClassLoader(), basePackageName);
 }
 return jspLoader;
 }
diff --git a/java/org/apache/jasper/compiler/ELFunctionMapper.java 
b/java/org/apache/jasper/compiler/ELFunctionMapper.java
index a4ad003cee..37d25677cc 100644
--- 

[tomcat] branch main updated: Remove SecurityManager references from the o.a.elpackage

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new e950ca41e0 Remove SecurityManager references from the o.a.elpackage
e950ca41e0 is described below

commit e950ca41e03353a753960230b488e9723c6f5782
Author: Mark Thomas 
AuthorDate: Thu Jan 12 17:34:04 2023 +

Remove SecurityManager references from the o.a.elpackage
---
 java/org/apache/el/lang/ELSupport.java | 24 ++-
 java/org/apache/el/lang/ExpressionBuilder.java | 10 +-
 java/org/apache/el/util/ReflectionUtil.java| 27 ++
 java/org/apache/el/util/Validation.java| 20 +--
 4 files changed, 6 insertions(+), 75 deletions(-)

diff --git a/java/org/apache/el/lang/ELSupport.java 
b/java/org/apache/el/lang/ELSupport.java
index d07c9d6959..d5737db3c0 100644
--- a/java/org/apache/el/lang/ELSupport.java
+++ b/java/org/apache/el/lang/ELSupport.java
@@ -24,8 +24,6 @@ import java.lang.reflect.Modifier;
 import java.lang.reflect.Proxy;
 import java.math.BigDecimal;
 import java.math.BigInteger;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.Collections;
 import java.util.Map;
 import java.util.Set;
@@ -47,21 +45,7 @@ public class ELSupport {
 
 private static final Long ZERO = Long.valueOf(0L);
 
-protected static final boolean COERCE_TO_ZERO;
-
-static {
-String coerceToZeroStr;
-if (System.getSecurityManager() != null) {
-coerceToZeroStr = AccessController.doPrivileged(
-(PrivilegedAction) () -> System.getProperty(
-"org.apache.el.parser.COERCE_TO_ZERO", "false")
-);
-} else {
-coerceToZeroStr = System.getProperty(
-"org.apache.el.parser.COERCE_TO_ZERO", "false");
-}
-COERCE_TO_ZERO = Boolean.parseBoolean(coerceToZeroStr);
-}
+protected static final boolean COERCE_TO_ZERO = 
Boolean.getBoolean("org.apache.el.parser.COERCE_TO_ZERO");
 
 
 /**
@@ -639,11 +623,7 @@ public class ELSupport {
 });
 return result;
 };
-if (System.getSecurityManager() !=  null) {
-return AccessController.doPrivileged((PrivilegedAction) 
proxy::get);
-} else {
-return proxy.get();
-}
+return proxy.get();
 }
 
 
diff --git a/java/org/apache/el/lang/ExpressionBuilder.java 
b/java/org/apache/el/lang/ExpressionBuilder.java
index b03b78cbf3..2b7ab404d9 100644
--- a/java/org/apache/el/lang/ExpressionBuilder.java
+++ b/java/org/apache/el/lang/ExpressionBuilder.java
@@ -18,8 +18,6 @@ package org.apache.el.lang;
 
 import java.io.StringReader;
 import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 
 import jakarta.el.ELContext;
 import jakarta.el.ELException;
@@ -56,13 +54,7 @@ public final class ExpressionBuilder implements NodeVisitor {
 "org.apache.el.ExpressionBuilder.CACHE_SIZE";
 
 static {
-String cacheSizeStr;
-if (System.getSecurityManager() == null) {
-cacheSizeStr = System.getProperty(CACHE_SIZE_PROP, "5000");
-} else {
-cacheSizeStr = AccessController.doPrivileged(
-(PrivilegedAction) () -> 
System.getProperty(CACHE_SIZE_PROP, "5000"));
-}
+String cacheSizeStr = System.getProperty(CACHE_SIZE_PROP, "5000");
 CACHE_SIZE = Integer.parseInt(cacheSizeStr);
 }
 
diff --git a/java/org/apache/el/util/ReflectionUtil.java 
b/java/org/apache/el/util/ReflectionUtil.java
index fd6680dd8f..381937b01d 100644
--- a/java/org/apache/el/util/ReflectionUtil.java
+++ b/java/org/apache/el/util/ReflectionUtil.java
@@ -19,8 +19,6 @@ package org.apache.el.util;
 import java.lang.reflect.Array;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
@@ -59,10 +57,10 @@ public class ReflectionUtil {
 if (c == null) {
 if (name.endsWith("[]")) {
 String nc = name.substring(0, name.length() - 2);
-c = Class.forName(nc, true, getContextClassLoader());
+c = Class.forName(nc, true, 
Thread.currentThread().getContextClassLoader());
 c = Array.newInstance(c, 0).getClass();
 } else {
-c = Class.forName(name, true, getContextClassLoader());
+c = Class.forName(name, true, 
Thread.currentThread().getContextClassLoader());
 }
 }
 return c;
@@ -482,27 +480,6 @@ public class ReflectionUtil {
 }
 
 
-private static ClassLoader 

Buildbot success in on tomcat-8.5.x

2023-01-12 Thread buildbot
Build status: Build succeeded!
Worker used: bb2_worker2_ubuntu
URL: https://ci2.apache.org/#builders/36/builds/360
Blamelist: Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 8.5.x] 55ad12cd34c8efe29e2c0f7d8c6d8ef8579fa6b5


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 0

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



[tomcat] branch main updated: Remove SecurityManager references

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 7fe4f498e7 Remove SecurityManager references
7fe4f498e7 is described below

commit 7fe4f498e7424ae75aef345ec9d247a0ef2a35c8
Author: Mark Thomas 
AuthorDate: Thu Jan 12 17:29:39 2023 +

Remove SecurityManager references
---
 java/org/apache/coyote/AsyncStateMachine.java | 31 ++
 java/org/apache/coyote/Constants.java |  6 
 java/org/apache/coyote/http2/Stream.java  | 46 +--
 3 files changed, 4 insertions(+), 79 deletions(-)

diff --git a/java/org/apache/coyote/AsyncStateMachine.java 
b/java/org/apache/coyote/AsyncStateMachine.java
index 472a48b18e..b400788831 100644
--- a/java/org/apache/coyote/AsyncStateMachine.java
+++ b/java/org/apache/coyote/AsyncStateMachine.java
@@ -16,16 +16,12 @@
  */
 package org.apache.coyote;
 
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.util.security.PrivilegedGetTccl;
-import org.apache.tomcat.util.security.PrivilegedSetTccl;
 
 /**
  * Manages the state transitions for async requests.
@@ -449,39 +445,18 @@ class AsyncStateMachine {
 state == AsyncState.READ_WRITE_OP) {
 // Execute the runnable using a container thread from the
 // Connector's thread pool. Use a wrapper to prevent a memory leak
-ClassLoader oldCL;
-if (Constants.IS_SECURITY_ENABLED) {
-PrivilegedAction pa = new PrivilegedGetTccl();
-oldCL = AccessController.doPrivileged(pa);
-} else {
-oldCL = Thread.currentThread().getContextClassLoader();
-}
+ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
 try {
-if (Constants.IS_SECURITY_ENABLED) {
-PrivilegedAction pa = new PrivilegedSetTccl(
-this.getClass().getClassLoader());
-AccessController.doPrivileged(pa);
-} else {
-Thread.currentThread().setContextClassLoader(
-this.getClass().getClassLoader());
-}
-
+
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
 processor.execute(runnable);
 } finally {
-if (Constants.IS_SECURITY_ENABLED) {
-PrivilegedAction pa = new PrivilegedSetTccl(
-oldCL);
-AccessController.doPrivileged(pa);
-} else {
-Thread.currentThread().setContextClassLoader(oldCL);
-}
+Thread.currentThread().setContextClassLoader(oldCL);
 }
 } else {
 throw new IllegalStateException(
 sm.getString("asyncStateMachine.invalidAsyncState",
 "asyncRun()", state));
 }
-
 }
 
 
diff --git a/java/org/apache/coyote/Constants.java 
b/java/org/apache/coyote/Constants.java
index a431968064..ac5dede33e 100644
--- a/java/org/apache/coyote/Constants.java
+++ b/java/org/apache/coyote/Constants.java
@@ -46,12 +46,6 @@ public final class Constants {
 public static final int DEFAULT_CONNECTION_LINGER = -1;
 public static final boolean DEFAULT_TCP_NO_DELAY = true;
 
-/**
- * Has security been turned on?
- */
-public static final boolean IS_SECURITY_ENABLED = 
(System.getSecurityManager() != null);
-
-
 /**
  * The request attribute that is set to the value of {@code Boolean.TRUE}
  * if connector processing this request supports use of sendfile.
diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 9037d7d849..53850fc384 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -19,9 +19,6 @@ package org.apache.coyote.http2;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.charset.StandardCharsets;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Locale;
@@ -795,7 +792,7 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 
request.getMimeHeaders().addValue(":authority").duplicate(request.serverName());
 }
 
-push(handler, request, this);
+

[tomcat] branch 8.5.x updated: Replace methods deprecated in Java 16+

2023-01-12 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 86ff195758 Replace methods deprecated in Java 16+
86ff195758 is described below

commit 86ff195758b05b976e18740bfedd011a26221d02
Author: Mark Thomas 
AuthorDate: Thu Jan 12 15:25:36 2023 +

Replace methods deprecated in Java 16+
---
 java/org/apache/catalina/realm/CombinedRealm.java | 2 +-
 java/org/apache/catalina/realm/LockOutRealm.java  | 2 +-
 java/org/apache/catalina/realm/RealmBase.java | 2 +-
 java/org/apache/catalina/valves/rewrite/ResolverImpl.java | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/realm/CombinedRealm.java 
b/java/org/apache/catalina/realm/CombinedRealm.java
index 0f5eca6158..67c3567e59 100644
--- a/java/org/apache/catalina/realm/CombinedRealm.java
+++ b/java/org/apache/catalina/realm/CombinedRealm.java
@@ -327,7 +327,7 @@ public class CombinedRealm extends RealmBase {
 Principal authenticatedUser = null;
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectDN().getName();
+username = certs[0].getSubjectX500Principal().toString();
 }
 
 for (Realm realm : realms) {
diff --git a/java/org/apache/catalina/realm/LockOutRealm.java 
b/java/org/apache/catalina/realm/LockOutRealm.java
index 148279cfe6..ebc89cecb2 100644
--- a/java/org/apache/catalina/realm/LockOutRealm.java
+++ b/java/org/apache/catalina/realm/LockOutRealm.java
@@ -171,7 +171,7 @@ public class LockOutRealm extends CombinedRealm {
 public Principal authenticate(X509Certificate[] certs) {
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectDN().getName();
+username = certs[0].getSubjectX500Principal().toString();
 }
 
 Principal authenticatedUser = super.authenticate(certs);
diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index bf53b6a787..022f1dff05 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -454,7 +454,7 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements org.apache
 for (X509Certificate cert : certs) {
 if (log.isDebugEnabled()) {
 log.debug(" Checking validity for '" +
-cert.getSubjectDN().getName() + "'");
+cert.getSubjectX500Principal().toString() + "'");
 }
 try {
 cert.checkValidity();
diff --git a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java 
b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
index a909b5c871..a63eb4ee73 100644
--- a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
+++ b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
@@ -222,7 +222,7 @@ public class ResolverImpl extends Resolver {
 } else if (key.equals("M_SERIAL")) {
 return certificates[0].getSerialNumber().toString();
 } else if (key.equals("S_DN")) {
-return certificates[0].getSubjectDN().getName();
+return certificates[0].getSubjectX500Principal().toString();
 } else if (key.startsWith("S_DN_")) {
 key = key.substring("S_DN_".length());
 return 
resolveComponent(certificates[0].getSubjectX500Principal().getName(), key);
@@ -235,10 +235,10 @@ public class ResolverImpl extends Resolver {
 key = key.substring("SAN_DNS_".length());
 return resolveAlternateName(certificates[0], 2, 
Integer.parseInt(key));
 } else if (key.equals("I_DN")) {
-return certificates[0].getIssuerDN().getName();
+return certificates[0].getIssuerX500Principal().getName();
 } else if (key.startsWith("I_DN_")) {
 key = key.substring("I_DN_".length());
-return 
resolveComponent(certificates[0].getIssuerX500Principal().getName(), key);
+return 
resolveComponent(certificates[0].getIssuerX500Principal().toString(), key);
 } else if (key.equals("V_START")) {
 return String.valueOf(certificates[0].getNotBefore().getTime());
 } else if (key.equals("V_END")) {


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



[tomcat] 02/02: Replace methods deprecated in Java 16+

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit fb7939c9aae7f98eb7f97e278b40babae308de48
Author: Mark Thomas 
AuthorDate: Thu Jan 12 15:25:36 2023 +

Replace methods deprecated in Java 16+
---
 java/org/apache/catalina/realm/CombinedRealm.java | 2 +-
 java/org/apache/catalina/realm/LockOutRealm.java  | 2 +-
 java/org/apache/catalina/realm/RealmBase.java | 2 +-
 java/org/apache/catalina/valves/rewrite/ResolverImpl.java | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/realm/CombinedRealm.java 
b/java/org/apache/catalina/realm/CombinedRealm.java
index eaf46cecd1..8c880e6396 100644
--- a/java/org/apache/catalina/realm/CombinedRealm.java
+++ b/java/org/apache/catalina/realm/CombinedRealm.java
@@ -320,7 +320,7 @@ public class CombinedRealm extends RealmBase {
 Principal authenticatedUser = null;
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectDN().getName();
+username = certs[0].getSubjectX500Principal().toString();
 }
 
 for (Realm realm : realms) {
diff --git a/java/org/apache/catalina/realm/LockOutRealm.java 
b/java/org/apache/catalina/realm/LockOutRealm.java
index 1eaff96ba8..abaee00b37 100644
--- a/java/org/apache/catalina/realm/LockOutRealm.java
+++ b/java/org/apache/catalina/realm/LockOutRealm.java
@@ -166,7 +166,7 @@ public class LockOutRealm extends CombinedRealm {
 public Principal authenticate(X509Certificate[] certs) {
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectDN().getName();
+username = certs[0].getSubjectX500Principal().toString();
 }
 
 Principal authenticatedUser = super.authenticate(certs);
diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index e5da7792a8..dbce28d313 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -452,7 +452,7 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 for (X509Certificate cert : certs) {
 if (log.isDebugEnabled()) {
 log.debug(" Checking validity for '" +
-cert.getSubjectDN().getName() + "'");
+cert.getSubjectX500Principal().toString() + "'");
 }
 try {
 cert.checkValidity();
diff --git a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java 
b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
index 8e925dcff3..f6adc5a128 100644
--- a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
+++ b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
@@ -233,7 +233,7 @@ public class ResolverImpl extends Resolver {
 } else if (key.equals("M_SERIAL")) {
 return certificates[0].getSerialNumber().toString();
 } else if (key.equals("S_DN")) {
-return certificates[0].getSubjectDN().getName();
+return certificates[0].getSubjectX500Principal().toString();
 } else if (key.startsWith("S_DN_")) {
 key = key.substring("S_DN_".length());
 return 
resolveComponent(certificates[0].getSubjectX500Principal().getName(), key);
@@ -246,10 +246,10 @@ public class ResolverImpl extends Resolver {
 key = key.substring("SAN_DNS_".length());
 return resolveAlternateName(certificates[0], 2, 
Integer.parseInt(key));
 } else if (key.equals("I_DN")) {
-return certificates[0].getIssuerDN().getName();
+return certificates[0].getIssuerX500Principal().getName();
 } else if (key.startsWith("I_DN_")) {
 key = key.substring("I_DN_".length());
-return 
resolveComponent(certificates[0].getIssuerX500Principal().getName(), key);
+return 
resolveComponent(certificates[0].getIssuerX500Principal().toString(), key);
 } else if (key.equals("V_START")) {
 return String.valueOf(certificates[0].getNotBefore().getTime());
 } else if (key.equals("V_END")) {


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



[tomcat] branch 9.0.x updated (d97b343258 -> fb7939c9aa)

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from d97b343258 CheckStyle Javadoc checks += JavadocMethod
 new 0f8c12e64b Fix calls to deprecated (Java 14+) code
 new fb7939c9aa Replace methods deprecated in Java 16+

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:
 .../catalina/ha/backend/MultiCastSender.java   |  2 +-
 java/org/apache/catalina/realm/CombinedRealm.java  |  2 +-
 java/org/apache/catalina/realm/LockOutRealm.java   |  2 +-
 java/org/apache/catalina/realm/RealmBase.java  |  2 +-
 .../tribes/membership/McastServiceImpl.java| 23 --
 .../catalina/valves/rewrite/ResolverImpl.java  |  6 +++---
 6 files changed, 24 insertions(+), 13 deletions(-)


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



[tomcat] 01/02: Fix calls to deprecated (Java 14+) code

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 0f8c12e64b3e033b87837e1c7b5c466eed6114f8
Author: Mark Thomas 
AuthorDate: Thu Jan 12 14:57:39 2023 +

Fix calls to deprecated (Java 14+) code
---
 .../catalina/ha/backend/MultiCastSender.java   |  2 +-
 .../tribes/membership/McastServiceImpl.java| 23 --
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/ha/backend/MultiCastSender.java 
b/java/org/apache/catalina/ha/backend/MultiCastSender.java
index 1e00ee8dc3..2568a0e75b 100644
--- a/java/org/apache/catalina/ha/backend/MultiCastSender.java
+++ b/java/org/apache/catalina/ha/backend/MultiCastSender.java
@@ -60,7 +60,7 @@ public class MultiCastSender
 }
 
 s.setTimeToLive(config.getTtl());
-s.joinGroup(group);
+s.joinGroup(new InetSocketAddress(group, 0), null);
 } catch (Exception ex) {
 log.error(sm.getString("multiCastSender.multiCastFailed"), ex);
 s = null;
diff --git a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java 
b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
index 068a383440..da42ac7ceb 100644
--- a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
+++ b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
@@ -23,6 +23,7 @@ import java.net.DatagramPacket;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.MulticastSocket;
+import java.net.NetworkInterface;
 import java.net.SocketTimeoutException;
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -217,12 +218,14 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 } else {
 socket = new MulticastSocket(port);
 }
-socket.setLoopbackMode(localLoopbackDisabled); //hint if we want 
disable loop back(local machine) messages
+// Hint if we want disable loop back(local machine) messages
+socket.setLoopbackMode(localLoopbackDisabled);
 if (mcastBindAddress != null) {
 if(log.isInfoEnabled()) {
 log.info(sm.getString("mcastServiceImpl.setInterface", 
mcastBindAddress));
 }
-socket.setInterface(mcastBindAddress);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(mcastBindAddress);
+socket.setNetworkInterface(networkInterface);
 } //end if
 //force a so timeout so that we don't block forever
 if (mcastSoTimeout <= 0) {
@@ -258,7 +261,7 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 }
 try {
 if ( sender == null ) {
-socket.joinGroup(address);
+socket.joinGroup(new InetSocketAddress(address, 0), null);
 }
 }catch (IOException iox) {
 log.error(sm.getString("mcastServiceImpl.unable.join"));
@@ -275,7 +278,7 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 throw new 
IllegalStateException(sm.getString("mcastServiceImpl.send.running"));
 }
 if ( receiver == null ) {
-socket.joinGroup(address);
+socket.joinGroup(new InetSocketAddress(address, 0), null);
 }
 //make sure at least one packet gets out there
 send(false);
@@ -343,8 +346,16 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 member.setCommand(Member.SHUTDOWN_PAYLOAD);
 send(false);
 //leave mcast group
-try {socket.leaveGroup(address);}catch ( Exception ignore){}
-try {socket.close();}catch ( Exception ignore){}
+try {
+socket.leaveGroup(new InetSocketAddress(address, 0), null);
+} catch ( Exception ignore) {
+// NO-OP
+}
+try {
+socket.close();
+} catch (Exception ignore) {
+// NO-OP
+}
 member.setServiceStartTime(-1);
 }
 return (startLevel == 0);


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



[tomcat] branch 10.1.x updated: Follow-up - restore call changed in error. Fix correct (issuer) call.

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new c68a614d70 Follow-up - restore call changed in error. Fix correct 
(issuer) call.
c68a614d70 is described below

commit c68a614d7003316cc972684e24c98074fba5dee5
Author: Mark Thomas 
AuthorDate: Thu Jan 12 17:14:53 2023 +

Follow-up - restore call changed in error. Fix correct (issuer) call.
---
 java/org/apache/catalina/valves/rewrite/ResolverImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java 
b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
index 508a2ac28f..f6adc5a128 100644
--- a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
+++ b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
@@ -236,7 +236,7 @@ public class ResolverImpl extends Resolver {
 return certificates[0].getSubjectX500Principal().toString();
 } else if (key.startsWith("S_DN_")) {
 key = key.substring("S_DN_".length());
-return 
resolveComponent(certificates[0].getSubjectX500Principal().toString(), key);
+return 
resolveComponent(certificates[0].getSubjectX500Principal().getName(), key);
 } else if (key.startsWith("SAN_Email_")) {
 // Type rfc822Name, which is 1
 key = key.substring("SAN_Email_".length());
@@ -249,7 +249,7 @@ public class ResolverImpl extends Resolver {
 return certificates[0].getIssuerX500Principal().getName();
 } else if (key.startsWith("I_DN_")) {
 key = key.substring("I_DN_".length());
-return 
resolveComponent(certificates[0].getIssuerX500Principal().getName(), key);
+return 
resolveComponent(certificates[0].getIssuerX500Principal().toString(), key);
 } else if (key.equals("V_START")) {
 return String.valueOf(certificates[0].getNotBefore().getTime());
 } else if (key.equals("V_END")) {


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



[tomcat] branch main updated: Follow-up - restore call changed in error. Fix correct (issuer) call.

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 84848a8e6c Follow-up - restore call changed in error. Fix correct 
(issuer) call.
84848a8e6c is described below

commit 84848a8e6ca0b2414d0451293dabe4e126e0c8d3
Author: Mark Thomas 
AuthorDate: Thu Jan 12 17:14:53 2023 +

Follow-up - restore call changed in error. Fix correct (issuer) call.
---
 java/org/apache/catalina/valves/rewrite/ResolverImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java 
b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
index 508a2ac28f..f6adc5a128 100644
--- a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
+++ b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
@@ -236,7 +236,7 @@ public class ResolverImpl extends Resolver {
 return certificates[0].getSubjectX500Principal().toString();
 } else if (key.startsWith("S_DN_")) {
 key = key.substring("S_DN_".length());
-return 
resolveComponent(certificates[0].getSubjectX500Principal().toString(), key);
+return 
resolveComponent(certificates[0].getSubjectX500Principal().getName(), key);
 } else if (key.startsWith("SAN_Email_")) {
 // Type rfc822Name, which is 1
 key = key.substring("SAN_Email_".length());
@@ -249,7 +249,7 @@ public class ResolverImpl extends Resolver {
 return certificates[0].getIssuerX500Principal().getName();
 } else if (key.startsWith("I_DN_")) {
 key = key.substring("I_DN_".length());
-return 
resolveComponent(certificates[0].getIssuerX500Principal().getName(), key);
+return 
resolveComponent(certificates[0].getIssuerX500Principal().toString(), key);
 } else if (key.equals("V_START")) {
 return String.valueOf(certificates[0].getNotBefore().getTime());
 } else if (key.equals("V_END")) {


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



[tomcat] branch 10.1.x updated: Followup to getSubjectX500Principal() changes - retain original name

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new a74276e443 Followup to getSubjectX500Principal() changes - retain 
original name
a74276e443 is described below

commit a74276e4437e47fafee5b7ab4101e536481fd9e9
Author: Mark Thomas 
AuthorDate: Thu Jan 12 17:06:14 2023 +

Followup to getSubjectX500Principal() changes - retain original name

As per BZ 66009 getSubjectX500Principal().toString() returns the same
result as getSubjectDN().getName()
---
 java/org/apache/catalina/realm/CombinedRealm.java | 2 +-
 java/org/apache/catalina/realm/LockOutRealm.java  | 2 +-
 java/org/apache/catalina/realm/RealmBase.java | 2 +-
 java/org/apache/catalina/valves/rewrite/ResolverImpl.java | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/realm/CombinedRealm.java 
b/java/org/apache/catalina/realm/CombinedRealm.java
index 0968241e9a..8c880e6396 100644
--- a/java/org/apache/catalina/realm/CombinedRealm.java
+++ b/java/org/apache/catalina/realm/CombinedRealm.java
@@ -320,7 +320,7 @@ public class CombinedRealm extends RealmBase {
 Principal authenticatedUser = null;
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectX500Principal().getName();
+username = certs[0].getSubjectX500Principal().toString();
 }
 
 for (Realm realm : realms) {
diff --git a/java/org/apache/catalina/realm/LockOutRealm.java 
b/java/org/apache/catalina/realm/LockOutRealm.java
index 90fe1b64e9..f4254dcb64 100644
--- a/java/org/apache/catalina/realm/LockOutRealm.java
+++ b/java/org/apache/catalina/realm/LockOutRealm.java
@@ -166,7 +166,7 @@ public class LockOutRealm extends CombinedRealm {
 public Principal authenticate(X509Certificate[] certs) {
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectX500Principal().getName();
+username = certs[0].getSubjectX500Principal().toString();
 }
 
 Principal authenticatedUser = super.authenticate(certs);
diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index 3ff9c336e2..0bac871696 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -452,7 +452,7 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 for (X509Certificate cert : certs) {
 if (log.isDebugEnabled()) {
 log.debug(" Checking validity for '" +
-cert.getSubjectX500Principal().getName() + "'");
+cert.getSubjectX500Principal().toString() + "'");
 }
 try {
 cert.checkValidity();
diff --git a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java 
b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
index a023c0d1e9..508a2ac28f 100644
--- a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
+++ b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
@@ -233,10 +233,10 @@ public class ResolverImpl extends Resolver {
 } else if (key.equals("M_SERIAL")) {
 return certificates[0].getSerialNumber().toString();
 } else if (key.equals("S_DN")) {
-return certificates[0].getSubjectX500Principal().getName();
+return certificates[0].getSubjectX500Principal().toString();
 } else if (key.startsWith("S_DN_")) {
 key = key.substring("S_DN_".length());
-return 
resolveComponent(certificates[0].getSubjectX500Principal().getName(), key);
+return 
resolveComponent(certificates[0].getSubjectX500Principal().toString(), key);
 } else if (key.startsWith("SAN_Email_")) {
 // Type rfc822Name, which is 1
 key = key.substring("SAN_Email_".length());


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



[tomcat] branch main updated: Followup to getSubjectX500Principal() changes - retain original name

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 2b4a853dae Followup to getSubjectX500Principal() changes - retain 
original name
2b4a853dae is described below

commit 2b4a853dae39fd1242042be8ad165a8c0c538398
Author: Mark Thomas 
AuthorDate: Thu Jan 12 17:06:14 2023 +

Followup to getSubjectX500Principal() changes - retain original name

As per BZ 66009 getSubjectX500Principal().toString() returns the same
result as getSubjectDN().getName()
---
 java/org/apache/catalina/realm/CombinedRealm.java | 2 +-
 java/org/apache/catalina/realm/LockOutRealm.java  | 2 +-
 java/org/apache/catalina/realm/RealmBase.java | 2 +-
 java/org/apache/catalina/valves/rewrite/ResolverImpl.java | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/realm/CombinedRealm.java 
b/java/org/apache/catalina/realm/CombinedRealm.java
index 0968241e9a..8c880e6396 100644
--- a/java/org/apache/catalina/realm/CombinedRealm.java
+++ b/java/org/apache/catalina/realm/CombinedRealm.java
@@ -320,7 +320,7 @@ public class CombinedRealm extends RealmBase {
 Principal authenticatedUser = null;
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectX500Principal().getName();
+username = certs[0].getSubjectX500Principal().toString();
 }
 
 for (Realm realm : realms) {
diff --git a/java/org/apache/catalina/realm/LockOutRealm.java 
b/java/org/apache/catalina/realm/LockOutRealm.java
index 90fe1b64e9..f4254dcb64 100644
--- a/java/org/apache/catalina/realm/LockOutRealm.java
+++ b/java/org/apache/catalina/realm/LockOutRealm.java
@@ -166,7 +166,7 @@ public class LockOutRealm extends CombinedRealm {
 public Principal authenticate(X509Certificate[] certs) {
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectX500Principal().getName();
+username = certs[0].getSubjectX500Principal().toString();
 }
 
 Principal authenticatedUser = super.authenticate(certs);
diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index 3ff9c336e2..0bac871696 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -452,7 +452,7 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 for (X509Certificate cert : certs) {
 if (log.isDebugEnabled()) {
 log.debug(" Checking validity for '" +
-cert.getSubjectX500Principal().getName() + "'");
+cert.getSubjectX500Principal().toString() + "'");
 }
 try {
 cert.checkValidity();
diff --git a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java 
b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
index a023c0d1e9..508a2ac28f 100644
--- a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
+++ b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
@@ -233,10 +233,10 @@ public class ResolverImpl extends Resolver {
 } else if (key.equals("M_SERIAL")) {
 return certificates[0].getSerialNumber().toString();
 } else if (key.equals("S_DN")) {
-return certificates[0].getSubjectX500Principal().getName();
+return certificates[0].getSubjectX500Principal().toString();
 } else if (key.startsWith("S_DN_")) {
 key = key.substring("S_DN_".length());
-return 
resolveComponent(certificates[0].getSubjectX500Principal().getName(), key);
+return 
resolveComponent(certificates[0].getSubjectX500Principal().toString(), key);
 } else if (key.startsWith("SAN_Email_")) {
 // Type rfc822Name, which is 1
 key = key.substring("SAN_Email_".length());


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



[tomcat] 02/02: Replace methods deprecated in Java 16+

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 43e7a47f53862d82ef7707a38ca1be9e3cb18219
Author: Mark Thomas 
AuthorDate: Thu Jan 12 15:25:36 2023 +

Replace methods deprecated in Java 16+
---
 java/org/apache/catalina/realm/CombinedRealm.java | 2 +-
 java/org/apache/catalina/realm/LockOutRealm.java  | 2 +-
 java/org/apache/catalina/realm/RealmBase.java | 2 +-
 java/org/apache/catalina/valves/rewrite/ResolverImpl.java | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/realm/CombinedRealm.java 
b/java/org/apache/catalina/realm/CombinedRealm.java
index eaf46cecd1..0968241e9a 100644
--- a/java/org/apache/catalina/realm/CombinedRealm.java
+++ b/java/org/apache/catalina/realm/CombinedRealm.java
@@ -320,7 +320,7 @@ public class CombinedRealm extends RealmBase {
 Principal authenticatedUser = null;
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectDN().getName();
+username = certs[0].getSubjectX500Principal().getName();
 }
 
 for (Realm realm : realms) {
diff --git a/java/org/apache/catalina/realm/LockOutRealm.java 
b/java/org/apache/catalina/realm/LockOutRealm.java
index 0743df6d6d..90fe1b64e9 100644
--- a/java/org/apache/catalina/realm/LockOutRealm.java
+++ b/java/org/apache/catalina/realm/LockOutRealm.java
@@ -166,7 +166,7 @@ public class LockOutRealm extends CombinedRealm {
 public Principal authenticate(X509Certificate[] certs) {
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectDN().getName();
+username = certs[0].getSubjectX500Principal().getName();
 }
 
 Principal authenticatedUser = super.authenticate(certs);
diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index db4226f9e6..3ff9c336e2 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -452,7 +452,7 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 for (X509Certificate cert : certs) {
 if (log.isDebugEnabled()) {
 log.debug(" Checking validity for '" +
-cert.getSubjectDN().getName() + "'");
+cert.getSubjectX500Principal().getName() + "'");
 }
 try {
 cert.checkValidity();
diff --git a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java 
b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
index 8e925dcff3..a023c0d1e9 100644
--- a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
+++ b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
@@ -233,7 +233,7 @@ public class ResolverImpl extends Resolver {
 } else if (key.equals("M_SERIAL")) {
 return certificates[0].getSerialNumber().toString();
 } else if (key.equals("S_DN")) {
-return certificates[0].getSubjectDN().getName();
+return certificates[0].getSubjectX500Principal().getName();
 } else if (key.startsWith("S_DN_")) {
 key = key.substring("S_DN_".length());
 return 
resolveComponent(certificates[0].getSubjectX500Principal().getName(), key);
@@ -246,7 +246,7 @@ public class ResolverImpl extends Resolver {
 key = key.substring("SAN_DNS_".length());
 return resolveAlternateName(certificates[0], 2, 
Integer.parseInt(key));
 } else if (key.equals("I_DN")) {
-return certificates[0].getIssuerDN().getName();
+return certificates[0].getIssuerX500Principal().getName();
 } else if (key.startsWith("I_DN_")) {
 key = key.substring("I_DN_".length());
 return 
resolveComponent(certificates[0].getIssuerX500Principal().getName(), key);


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



[tomcat] branch 10.1.x updated (eca5f57c98 -> 43e7a47f53)

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from eca5f57c98 CheckStyle Javadoc checks += JavadocMethod
 new 13025120a2 Fix calls to deprecated (Java 14+) code
 new 43e7a47f53 Replace methods deprecated in Java 16+

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:
 .../catalina/ha/backend/MultiCastSender.java   |  2 +-
 java/org/apache/catalina/realm/CombinedRealm.java  |  2 +-
 java/org/apache/catalina/realm/LockOutRealm.java   |  2 +-
 java/org/apache/catalina/realm/RealmBase.java  |  2 +-
 .../tribes/membership/McastServiceImpl.java| 24 --
 .../catalina/valves/rewrite/ResolverImpl.java  |  4 ++--
 6 files changed, 24 insertions(+), 12 deletions(-)


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



[tomcat] 01/02: Fix calls to deprecated (Java 14+) code

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 13025120a214193d6352fc6a5d67b1432316c3be
Author: Mark Thomas 
AuthorDate: Thu Jan 12 14:57:39 2023 +

Fix calls to deprecated (Java 14+) code
---
 .../catalina/ha/backend/MultiCastSender.java   |  2 +-
 .../tribes/membership/McastServiceImpl.java| 24 --
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/ha/backend/MultiCastSender.java 
b/java/org/apache/catalina/ha/backend/MultiCastSender.java
index 1e00ee8dc3..2568a0e75b 100644
--- a/java/org/apache/catalina/ha/backend/MultiCastSender.java
+++ b/java/org/apache/catalina/ha/backend/MultiCastSender.java
@@ -60,7 +60,7 @@ public class MultiCastSender
 }
 
 s.setTimeToLive(config.getTtl());
-s.joinGroup(group);
+s.joinGroup(new InetSocketAddress(group, 0), null);
 } catch (Exception ex) {
 log.error(sm.getString("multiCastSender.multiCastFailed"), ex);
 s = null;
diff --git a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java 
b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
index 068a383440..1fac0a4207 100644
--- a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
+++ b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
@@ -23,7 +23,9 @@ import java.net.DatagramPacket;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.MulticastSocket;
+import java.net.NetworkInterface;
 import java.net.SocketTimeoutException;
+import java.net.StandardSocketOptions;
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -217,12 +219,14 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 } else {
 socket = new MulticastSocket(port);
 }
-socket.setLoopbackMode(localLoopbackDisabled); //hint if we want 
disable loop back(local machine) messages
+// Hint if we want disable loop back(local machine) messages
+socket.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.valueOf(!localLoopbackDisabled));
 if (mcastBindAddress != null) {
 if(log.isInfoEnabled()) {
 log.info(sm.getString("mcastServiceImpl.setInterface", 
mcastBindAddress));
 }
-socket.setInterface(mcastBindAddress);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(mcastBindAddress);
+socket.setNetworkInterface(networkInterface);
 } //end if
 //force a so timeout so that we don't block forever
 if (mcastSoTimeout <= 0) {
@@ -258,7 +262,7 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 }
 try {
 if ( sender == null ) {
-socket.joinGroup(address);
+socket.joinGroup(new InetSocketAddress(address, 0), null);
 }
 }catch (IOException iox) {
 log.error(sm.getString("mcastServiceImpl.unable.join"));
@@ -275,7 +279,7 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 throw new 
IllegalStateException(sm.getString("mcastServiceImpl.send.running"));
 }
 if ( receiver == null ) {
-socket.joinGroup(address);
+socket.joinGroup(new InetSocketAddress(address, 0), null);
 }
 //make sure at least one packet gets out there
 send(false);
@@ -343,8 +347,16 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 member.setCommand(Member.SHUTDOWN_PAYLOAD);
 send(false);
 //leave mcast group
-try {socket.leaveGroup(address);}catch ( Exception ignore){}
-try {socket.close();}catch ( Exception ignore){}
+try {
+socket.leaveGroup(new InetSocketAddress(address, 0), null);
+} catch ( Exception ignore) {
+// NO-OP
+}
+try {
+socket.close();
+} catch (Exception ignore) {
+// NO-OP
+}
 member.setServiceStartTime(-1);
 }
 return (startLevel == 0);


-
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: CheckStyle Javadoc checks += JavadocMethod

2023-01-12 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 0ea711ca10 CheckStyle Javadoc checks += JavadocMethod
0ea711ca10 is described below

commit 0ea711ca10f1f9d68a79365209fb8bab22502d76
Author: Mark Thomas 
AuthorDate: Thu Jan 12 16:10:41 2023 +

CheckStyle Javadoc checks += JavadocMethod
---
 java/org/apache/jasper/compiler/Node.java| 4 
 res/checkstyle/checkstyle.xml| 3 +++
 .../classes/compressionFilters/CompressionResponseStream.java| 5 +
 3 files changed, 12 insertions(+)

diff --git a/java/org/apache/jasper/compiler/Node.java 
b/java/org/apache/jasper/compiler/Node.java
index 510fe9edb1..842f150b14 100644
--- a/java/org/apache/jasper/compiler/Node.java
+++ b/java/org/apache/jasper/compiler/Node.java
@@ -2413,6 +2413,8 @@ abstract class Node implements TagConstants {
 /**
  * This method provides a place to put actions that are common to all
  * nodes. Override this in the child visitor class if need to.
+ *
+ * @param n The node to visit
  */
 @SuppressWarnings("unused")
 protected void doVisit(Node n) throws JasperException {
@@ -2421,6 +2423,8 @@ abstract class Node implements TagConstants {
 
 /**
  * Visit the body of a node, using the current visitor
+ *
+ * @param n The node to visit
  */
 protected void visitBody(Node n) throws JasperException {
 if (n.getBody() != null) {
diff --git a/res/checkstyle/checkstyle.xml b/res/checkstyle/checkstyle.xml
index 0965ebc747..e39f19f70e 100644
--- a/res/checkstyle/checkstyle.xml
+++ b/res/checkstyle/checkstyle.xml
@@ -81,6 +81,9 @@
 
 
 
+
+
+
 
 
 

[tomcat] branch main updated: Fix calls to methods deprecated in Java 14

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 7d65d494c7 Fix calls to methods deprecated in Java 14
7d65d494c7 is described below

commit 7d65d494c760bd63897d0b6f67a543b37a639fc2
Author: Mark Thomas 
AuthorDate: Thu Jan 12 16:53:24 2023 +

Fix calls to methods deprecated in Java 14
---
 .../catalina/tribes/membership/McastServiceImpl.java | 20 
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java 
b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
index a64d687efe..1fac0a4207 100644
--- a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
+++ b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
@@ -23,7 +23,9 @@ import java.net.DatagramPacket;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.MulticastSocket;
+import java.net.NetworkInterface;
 import java.net.SocketTimeoutException;
+import java.net.StandardSocketOptions;
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -217,12 +219,14 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 } else {
 socket = new MulticastSocket(port);
 }
-socket.setLoopbackMode(localLoopbackDisabled); //hint if we want 
disable loop back(local machine) messages
+// Hint if we want disable loop back(local machine) messages
+socket.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, 
Boolean.valueOf(!localLoopbackDisabled));
 if (mcastBindAddress != null) {
 if(log.isInfoEnabled()) {
 log.info(sm.getString("mcastServiceImpl.setInterface", 
mcastBindAddress));
 }
-socket.setInterface(mcastBindAddress);
+NetworkInterface networkInterface = 
NetworkInterface.getByInetAddress(mcastBindAddress);
+socket.setNetworkInterface(networkInterface);
 } //end if
 //force a so timeout so that we don't block forever
 if (mcastSoTimeout <= 0) {
@@ -343,8 +347,16 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 member.setCommand(Member.SHUTDOWN_PAYLOAD);
 send(false);
 //leave mcast group
-try {socket.leaveGroup(address);}catch ( Exception ignore){}
-try {socket.close();}catch ( Exception ignore){}
+try {
+socket.leaveGroup(new InetSocketAddress(address, 0), null);
+} catch ( Exception ignore) {
+// NO-OP
+}
+try {
+socket.close();
+} catch (Exception ignore) {
+// NO-OP
+}
 member.setServiceStartTime(-1);
 }
 return (startLevel == 0);


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



[tomcat] branch main updated: Fix calls to methods deprecated in Java 16+

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 4b6ccc2f6e Fix calls to methods deprecated in Java 16+
4b6ccc2f6e is described below

commit 4b6ccc2f6e7b8e6f52aabd73c491e4e9d1679efb
Author: Mark Thomas 
AuthorDate: Thu Jan 12 16:40:41 2023 +

Fix calls to methods deprecated in Java 16+
---
 java/org/apache/catalina/valves/rewrite/ResolverImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java 
b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
index 8e925dcff3..a023c0d1e9 100644
--- a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
+++ b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java
@@ -233,7 +233,7 @@ public class ResolverImpl extends Resolver {
 } else if (key.equals("M_SERIAL")) {
 return certificates[0].getSerialNumber().toString();
 } else if (key.equals("S_DN")) {
-return certificates[0].getSubjectDN().getName();
+return certificates[0].getSubjectX500Principal().getName();
 } else if (key.startsWith("S_DN_")) {
 key = key.substring("S_DN_".length());
 return 
resolveComponent(certificates[0].getSubjectX500Principal().getName(), key);
@@ -246,7 +246,7 @@ public class ResolverImpl extends Resolver {
 key = key.substring("SAN_DNS_".length());
 return resolveAlternateName(certificates[0], 2, 
Integer.parseInt(key));
 } else if (key.equals("I_DN")) {
-return certificates[0].getIssuerDN().getName();
+return certificates[0].getIssuerX500Principal().getName();
 } else if (key.startsWith("I_DN_")) {
 key = key.substring("I_DN_".length());
 return 
resolveComponent(certificates[0].getIssuerX500Principal().getName(), key);


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



[tomcat] branch main updated: Removed unused class

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 8a9ce361bb Removed unused class
8a9ce361bb is described below

commit 8a9ce361bb587b7173efd2e0be8bdedb4e5c1d21
Author: Mark Thomas 
AuthorDate: Thu Jan 12 16:33:28 2023 +

Removed unused class
---
 .../catalina/security/LocalStrings.properties  |   2 -
 .../catalina/security/LocalStrings_es.properties   |   2 -
 .../catalina/security/LocalStrings_fr.properties   |   2 -
 .../catalina/security/LocalStrings_ja.properties   |   2 -
 .../catalina/security/LocalStrings_ko.properties   |   2 -
 .../security/LocalStrings_zh_CN.properties |   2 -
 .../org/apache/catalina/security/SecurityUtil.java | 412 -
 7 files changed, 424 deletions(-)

diff --git a/java/org/apache/catalina/security/LocalStrings.properties 
b/java/org/apache/catalina/security/LocalStrings.properties
index 1c604fd388..f685b9a2ed 100644
--- a/java/org/apache/catalina/security/LocalStrings.properties
+++ b/java/org/apache/catalina/security/LocalStrings.properties
@@ -20,5 +20,3 @@ SecurityListener.checkUmaskNone=No umask setting was found in 
system property [{
 SecurityListener.checkUmaskParseFail=Failed to parse value [{0}] as a valid 
umask.
 SecurityListener.checkUmaskSkip=Unable to determine umask. It appears Tomcat 
is running on Windows so skip the umask check.
 SecurityListener.checkUserWarning=Start attempted while running as user [{0}]. 
Running Tomcat as this user has been blocked by the Lifecycle listener 
org.apache.catalina.security.SecurityListener (usually configured in 
CATALINA_BASE/conf/server.xml)
-
-SecurityUtil.doAsPrivilege=An exception occurs when running the 
PrivilegedExceptionAction block.
diff --git a/java/org/apache/catalina/security/LocalStrings_es.properties 
b/java/org/apache/catalina/security/LocalStrings_es.properties
index a3f2be9b30..fb08237a53 100644
--- a/java/org/apache/catalina/security/LocalStrings_es.properties
+++ b/java/org/apache/catalina/security/LocalStrings_es.properties
@@ -18,5 +18,3 @@ SecurityListener.checkUmaskNone=No se ha hallado valor de 
umask en propiedad de
 SecurityListener.checkUmaskParseFail=No pude anallizar el valor [{0}] como in 
válido umask.
 SecurityListener.checkUmaskSkip=No pude determinar umask. Parece que Tomcat se 
está ejecutando en Windows, por lo que se salta el chequeo de umsak.
 SecurityListener.checkUserWarning=Se ha intentado arrancar mientras se 
ejecutaba como usuario [{0}]. Ejecutando Tomcat como este usuario user ha sido 
bloqueado por el oyente de Ciclos de Vida 
org.apache.catalina.security.SecurityListener (normalmente configurado en  
CATALINA_BASE/conf/server.xml)
-
-SecurityUtil.doAsPrivilege=Ha tenido lugar una excepción al ejecutar el bloque 
PrivilegedExceptionAction.
diff --git a/java/org/apache/catalina/security/LocalStrings_fr.properties 
b/java/org/apache/catalina/security/LocalStrings_fr.properties
index d3861dbbf0..3aff0bed5e 100644
--- a/java/org/apache/catalina/security/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/security/LocalStrings_fr.properties
@@ -19,6 +19,4 @@ SecurityListener.checkUmaskParseFail=Impossible de traiter la 
valeur [{0}] comme
 SecurityListener.checkUmaskSkip=Impossible de déterminer le "umask".  Il 
semble que Tomcat tourne ici sous Windows, donc évitez la vérification du 
"umask".
 SecurityListener.checkUserWarning=Tentative de démarrage avec l''utilisateur 
[{0}}, qui a été bloquée par l''écouteur 
org.apache.catalina.security.SecurityListener (configuré habituellement dans 
CATALINA_BASE/conf/server.xml)
 
-SecurityUtil.doAsPrivilege=Une exception s'est produite lors de l'exécution du 
bloc "PrivilegedExceptionAction".
-
 listener.notServer=Ce listener ne peut être ajouté qu''à des éléments Server, 
mais est dans [{0}]
diff --git a/java/org/apache/catalina/security/LocalStrings_ja.properties 
b/java/org/apache/catalina/security/LocalStrings_ja.properties
index df0614f353..0896f452fc 100644
--- a/java/org/apache/catalina/security/LocalStrings_ja.properties
+++ b/java/org/apache/catalina/security/LocalStrings_ja.properties
@@ -19,6 +19,4 @@ SecurityListener.checkUmaskParseFail=値[{0}]を有効なumaskとして解析で
 SecurityListener.checkUmaskSkip=umask を取得できません。Tomcat を Windows で実行するときは umask 
をチェックしません。
 SecurityListener.checkUserWarning=ユーザー[{0}]として実行中に開始しようとしました。 
このユーザーでのTomcatの実行はライフサイクルリスナーorg.apache.catalina.security.SecurityListener(通常はCATALINA_BASE/conf
 /server.xmlで構成されている)によってブロックされています。
 
-SecurityUtil.doAsPrivilege=PrivilegedExceptionActionブロックを実行中に例外が発生しました。
-
 listener.notServer=このlistenerはServer要素内にのみネストする必要がありますが、[{0}] にあります。
diff --git a/java/org/apache/catalina/security/LocalStrings_ko.properties 
b/java/org/apache/catalina/security/LocalStrings_ko.properties
index 0448fb2dc0..9e93b172ef 100644
--- 

[tomcat] branch main updated: Remove Globals.IS_SECURITY_ENABLED

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 4fa1a1a1b2 Remove Globals.IS_SECURITY_ENABLED
4fa1a1a1b2 is described below

commit 4fa1a1a1b25aabca96c349072d742ae16316b7cc
Author: Mark Thomas 
AuthorDate: Thu Jan 12 16:32:04 2023 +

Remove Globals.IS_SECURITY_ENABLED
---
 java/org/apache/catalina/Globals.java  |   6 -
 java/org/apache/catalina/ant/ValidatorTask.java|   4 +-
 java/org/apache/catalina/connector/Connector.java  |   7 +-
 java/org/apache/catalina/connector/Request.java|  27 -
 .../catalina/core/ApplicationContextFacade.java| 549 +++--
 .../catalina/core/ApplicationFilterConfig.java |  12 +-
 .../catalina/core/ApplicationFilterFactory.java|  11 +-
 .../org/apache/catalina/core/AsyncContextImpl.java |   9 +-
 java/org/apache/catalina/core/StandardHost.java|   3 +-
 .../apache/catalina/core/StandardHostValve.java|   4 +-
 java/org/apache/catalina/core/StandardWrapper.java |  33 +-
 .../org/apache/catalina/security/SecurityUtil.java |  19 -
 .../apache/catalina/servlets/DefaultServlet.java   |  94 +---
 .../apache/catalina/session/DataSourceStore.java   |   9 +-
 java/org/apache/catalina/session/FileStore.java|   5 +-
 java/org/apache/catalina/session/ManagerBase.java  |  16 -
 .../apache/catalina/session/StandardSession.java   |   9 +-
 .../apache/catalina/valves/PersistentValve.java|   5 +-
 18 files changed, 93 insertions(+), 729 deletions(-)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index f04839ff79..5c7eaa6d43 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -262,12 +262,6 @@ public final class Globals {
 
Boolean.parseBoolean(System.getProperty("org.apache.catalina.STRICT_SERVLET_COMPLIANCE",
 "false"));
 
 
-/**
- * Has security been turned on?
- */
-public static final boolean IS_SECURITY_ENABLED = 
(System.getSecurityManager() != null);
-
-
 /**
  * Default domain for MBeans if none can be determined
  */
diff --git a/java/org/apache/catalina/ant/ValidatorTask.java 
b/java/org/apache/catalina/ant/ValidatorTask.java
index d239684d3e..28a145362c 100644
--- a/java/org/apache/catalina/ant/ValidatorTask.java
+++ b/java/org/apache/catalina/ant/ValidatorTask.java
@@ -22,7 +22,6 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
 
-import org.apache.catalina.Globals;
 import org.apache.tomcat.util.descriptor.DigesterFactory;
 import org.apache.tomcat.util.digester.Digester;
 import org.apache.tools.ant.BuildException;
@@ -87,8 +86,7 @@ public class ValidatorTask extends BaseRedirectorHelperTask {
 
 // Called through trusted manager interface. If running under a
 // SecurityManager assume that untrusted applications may be deployed.
-Digester digester = DigesterFactory.newDigester(
-true, true, null, Globals.IS_SECURITY_ENABLED);
+Digester digester = DigesterFactory.newDigester(true, true, null, 
false);
 try (InputStream stream = new BufferedInputStream(new 
FileInputStream(file.getCanonicalFile( {
 InputSource is = new 
InputSource(file.toURI().toURL().toExternalForm());
 is.setByteStream(stream);
diff --git a/java/org/apache/catalina/connector/Connector.java 
b/java/org/apache/catalina/connector/Connector.java
index 3b6d94a788..ad6fde7d32 100644
--- a/java/org/apache/catalina/connector/Connector.java
+++ b/java/org/apache/catalina/connector/Connector.java
@@ -25,7 +25,6 @@ import java.util.HashSet;
 
 import javax.management.ObjectName;
 
-import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleState;
 import org.apache.catalina.Service;
@@ -404,12 +403,10 @@ public class Connector extends LifecycleMBeanBase  {
 
 
 /**
- * @return true if the object facades are discarded, either
- *   when the discardFacades value is true or when the
- *   security manager is enabled.
+ * @return true if the object facades are discarded.
  */
 public boolean getDiscardFacades() {
-return discardFacades || Globals.IS_SECURITY_ENABLED;
+return discardFacades;
 }
 
 
diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 07b40ed463..e35dbcd085 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -1929,37 +1929,10 @@ public class Request implements HttpServletRequest {
  * @param principal The user Principal
  */
 public void setUserPrincipal(final Principal principal) {
-if (Globals.IS_SECURITY_ENABLED && principal != null) {
- 

[tomcat] branch 9.0.x updated: CheckStyle Javadoc checks += JavadocMethod

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new d97b343258 CheckStyle Javadoc checks += JavadocMethod
d97b343258 is described below

commit d97b34325818695527f67b6a920b049d92733683
Author: Mark Thomas 
AuthorDate: Thu Jan 12 16:10:41 2023 +

CheckStyle Javadoc checks += JavadocMethod
---
 java/org/apache/jasper/compiler/Node.java| 4 
 res/checkstyle/checkstyle.xml| 3 +++
 .../classes/compressionFilters/CompressionResponseStream.java| 5 +
 3 files changed, 12 insertions(+)

diff --git a/java/org/apache/jasper/compiler/Node.java 
b/java/org/apache/jasper/compiler/Node.java
index 510fe9edb1..842f150b14 100644
--- a/java/org/apache/jasper/compiler/Node.java
+++ b/java/org/apache/jasper/compiler/Node.java
@@ -2413,6 +2413,8 @@ abstract class Node implements TagConstants {
 /**
  * This method provides a place to put actions that are common to all
  * nodes. Override this in the child visitor class if need to.
+ *
+ * @param n The node to visit
  */
 @SuppressWarnings("unused")
 protected void doVisit(Node n) throws JasperException {
@@ -2421,6 +2423,8 @@ abstract class Node implements TagConstants {
 
 /**
  * Visit the body of a node, using the current visitor
+ *
+ * @param n The node to visit
  */
 protected void visitBody(Node n) throws JasperException {
 if (n.getBody() != null) {
diff --git a/res/checkstyle/checkstyle.xml b/res/checkstyle/checkstyle.xml
index bc25876b03..6d345bc4ef 100644
--- a/res/checkstyle/checkstyle.xml
+++ b/res/checkstyle/checkstyle.xml
@@ -81,6 +81,9 @@
 
 
 
+
+
+
 
 
 

[tomcat] branch main updated: More SecurityManager clean-up

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 8613da855d More SecurityManager clean-up
8613da855d is described below

commit 8613da855d3639c7feb2c27b547a173193ae4602
Author: Mark Thomas 
AuthorDate: Thu Jan 12 16:18:32 2023 +

More SecurityManager clean-up
---
 .../catalina/core/DefaultInstanceManager.java  |  4 +--
 .../catalina/deploy/NamingResourcesImpl.java   |  4 +--
 .../apache/catalina/startup/WebAnnotationSet.java  |  4 +--
 .../membership/cloud/CloudMembershipProvider.java  |  4 +--
 .../catalina/tribes/transport/ReceiverBase.java|  3 +-
 .../catalina/tribes/util/TcclThreadFactory.java| 21 ++--
 java/org/apache/catalina/util/Introspection.java   | 38 --
 7 files changed, 10 insertions(+), 68 deletions(-)

diff --git a/java/org/apache/catalina/core/DefaultInstanceManager.java 
b/java/org/apache/catalina/core/DefaultInstanceManager.java
index 7c196970b2..859043ae9c 100644
--- a/java/org/apache/catalina/core/DefaultInstanceManager.java
+++ b/java/org/apache/catalina/core/DefaultInstanceManager.java
@@ -304,7 +304,7 @@ public class DefaultInstanceManager implements 
InstanceManager {
 }
 
 // Initialize methods annotations
-Method[] methods = Introspection.getDeclaredMethods(clazz);
+Method[] methods = clazz.getDeclaredMethods();
 Method postConstruct = null;
 String postConstructFromXml = 
postConstructMethods.get(clazz.getName());
 Method preDestroy = null;
@@ -395,7 +395,7 @@ public class DefaultInstanceManager implements 
InstanceManager {
 if (context != null) {
 // Initialize fields annotations for resource injection if
 // JNDI is enabled
-Field[] fields = Introspection.getDeclaredFields(clazz);
+Field[] fields = clazz.getDeclaredFields();
 for (Field field : fields) {
 Resource resourceAnnotation;
 Annotation ejbAnnotation;
diff --git a/java/org/apache/catalina/deploy/NamingResourcesImpl.java 
b/java/org/apache/catalina/deploy/NamingResourcesImpl.java
index 1000fc5846..37f90217e2 100644
--- a/java/org/apache/catalina/deploy/NamingResourcesImpl.java
+++ b/java/org/apache/catalina/deploy/NamingResourcesImpl.java
@@ -1238,7 +1238,7 @@ public class NamingResourcesImpl extends 
LifecycleMBeanBase
 }
 
 private Class getSetterType(Class clazz, String name) {
-Method[] methods = Introspection.getDeclaredMethods(clazz);
+Method[] methods = clazz.getDeclaredMethods();
 if (methods != null && methods.length > 0) {
 for (Method method : methods) {
 if (Introspection.isValidSetter(method) &&
@@ -1251,7 +1251,7 @@ public class NamingResourcesImpl extends 
LifecycleMBeanBase
 }
 
 private Class getFieldType(Class clazz, String name) {
-Field[] fields = Introspection.getDeclaredFields(clazz);
+Field[] fields = clazz.getDeclaredFields();
 if (fields != null && fields.length > 0) {
 for (Field field : fields) {
 if (field.getName().equals(name)) {
diff --git a/java/org/apache/catalina/startup/WebAnnotationSet.java 
b/java/org/apache/catalina/startup/WebAnnotationSet.java
index 99e67143b4..e6459094c0 100644
--- a/java/org/apache/catalina/startup/WebAnnotationSet.java
+++ b/java/org/apache/catalina/startup/WebAnnotationSet.java
@@ -269,7 +269,7 @@ public class WebAnnotationSet {
 
 protected static void loadFieldsAnnotation(Context context, Class 
clazz) {
 // Initialize the annotations
-Field[] fields = Introspection.getDeclaredFields(clazz);
+Field[] fields = clazz.getDeclaredFields();
 if (fields != null && fields.length > 0) {
 for (Field field : fields) {
 Resource annotation = field.getAnnotation(Resource.class);
@@ -285,7 +285,7 @@ public class WebAnnotationSet {
 
 protected static void loadMethodsAnnotation(Context context, Class 
clazz) {
 // Initialize the annotations
-Method[] methods = Introspection.getDeclaredMethods(clazz);
+Method[] methods = clazz.getDeclaredMethods();
 if (methods != null && methods.length > 0) {
 for (Method method : methods) {
 Resource annotation = method.getAnnotation(Resource.class);
diff --git 
a/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipProvider.java 
b/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipProvider.java
index 8bab726f87..6b8fdf9cdf 100644
--- 
a/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipProvider.java
+++ 

[tomcat] branch 10.1.x updated: CheckStyle Javadoc checks += JavadocMethod

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new eca5f57c98 CheckStyle Javadoc checks += JavadocMethod
eca5f57c98 is described below

commit eca5f57c98d58d7778d88e1aec9897a3f3d35db3
Author: Mark Thomas 
AuthorDate: Thu Jan 12 16:10:41 2023 +

CheckStyle Javadoc checks += JavadocMethod
---
 java/org/apache/jasper/compiler/Node.java| 4 
 res/checkstyle/checkstyle.xml| 3 +++
 .../classes/compressionFilters/CompressionResponseStream.java| 5 +
 3 files changed, 12 insertions(+)

diff --git a/java/org/apache/jasper/compiler/Node.java 
b/java/org/apache/jasper/compiler/Node.java
index 8f7114b11c..3f7a2f18d2 100644
--- a/java/org/apache/jasper/compiler/Node.java
+++ b/java/org/apache/jasper/compiler/Node.java
@@ -2415,6 +2415,8 @@ abstract class Node implements TagConstants {
 /**
  * This method provides a place to put actions that are common to all
  * nodes. Override this in the child visitor class if need to.
+ *
+ * @param n The node to visit
  */
 @SuppressWarnings("unused")
 protected void doVisit(Node n) throws JasperException {
@@ -2423,6 +2425,8 @@ abstract class Node implements TagConstants {
 
 /**
  * Visit the body of a node, using the current visitor
+ *
+ * @param n The node to visit
  */
 protected void visitBody(Node n) throws JasperException {
 if (n.getBody() != null) {
diff --git a/res/checkstyle/checkstyle.xml b/res/checkstyle/checkstyle.xml
index 26e38c4141..3d285357fd 100644
--- a/res/checkstyle/checkstyle.xml
+++ b/res/checkstyle/checkstyle.xml
@@ -81,6 +81,9 @@
 
 
 
+
+
+
 
 
 

[tomcat] branch main updated: CheckStyle Javadoc checks += JavadocMethod

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new a2dcf8edb2 CheckStyle Javadoc checks += JavadocMethod
a2dcf8edb2 is described below

commit a2dcf8edb2b591982d65a93284e44a68dbeb2475
Author: Mark Thomas 
AuthorDate: Thu Jan 12 16:10:41 2023 +

CheckStyle Javadoc checks += JavadocMethod
---
 java/org/apache/jasper/compiler/Node.java| 4 
 res/checkstyle/checkstyle.xml| 3 +++
 .../classes/compressionFilters/CompressionResponseStream.java| 5 +
 3 files changed, 12 insertions(+)

diff --git a/java/org/apache/jasper/compiler/Node.java 
b/java/org/apache/jasper/compiler/Node.java
index ad4bf76ba9..95f43f5fe4 100644
--- a/java/org/apache/jasper/compiler/Node.java
+++ b/java/org/apache/jasper/compiler/Node.java
@@ -2331,6 +2331,8 @@ abstract class Node implements TagConstants {
 /**
  * This method provides a place to put actions that are common to all
  * nodes. Override this in the child visitor class if need to.
+ *
+ * @param n The node to visit
  */
 @SuppressWarnings("unused")
 protected void doVisit(Node n) throws JasperException {
@@ -2339,6 +2341,8 @@ abstract class Node implements TagConstants {
 
 /**
  * Visit the body of a node, using the current visitor
+ *
+ * @param n The node to visit
  */
 protected void visitBody(Node n) throws JasperException {
 if (n.getBody() != null) {
diff --git a/res/checkstyle/checkstyle.xml b/res/checkstyle/checkstyle.xml
index 26e38c4141..3d285357fd 100644
--- a/res/checkstyle/checkstyle.xml
+++ b/res/checkstyle/checkstyle.xml
@@ -81,6 +81,9 @@
 
 
 
+
+
+
 
 
 

Buildbot success in on tomcat-9.0.x

2023-01-12 Thread buildbot
Build status: Build succeeded!
Worker used: bb2_worker2_ubuntu
URL: https://ci2.apache.org/#builders/37/builds/415
Blamelist: Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 9.0.x] c911f43c63ab50caf2549849a42d1113497440e9


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 0

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



[tomcat] branch main updated: Another batch of SecurityManager related clean-up

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new c43ac6a405 Another batch of SecurityManager related clean-up
c43ac6a405 is described below

commit c43ac6a405af65363c4a80636a980f3615a0ee72
Author: Mark Thomas 
AuthorDate: Thu Jan 12 15:34:30 2023 +

Another batch of SecurityManager related clean-up
---
 .../apache/catalina/servlets/DefaultServlet.java   |  27 +---
 .../catalina/session/PersistentManagerBase.java| 151 +
 .../apache/catalina/session/StandardManager.java   |  93 -
 .../apache/catalina/session/StandardSession.java   |  25 +---
 .../catalina/startup/ClassLoaderFactory.java   |  28 ++--
 5 files changed, 19 insertions(+), 305 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index e859438324..7a647b0804 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -35,7 +35,6 @@ import java.io.StringWriter;
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
-import java.security.AccessController;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Comparator;
@@ -84,8 +83,6 @@ import org.apache.tomcat.util.http.parser.EntityTag;
 import org.apache.tomcat.util.http.parser.Ranges;
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.security.Escape;
-import org.apache.tomcat.util.security.PrivilegedGetTccl;
-import org.apache.tomcat.util.security.PrivilegedSetTccl;
 import org.w3c.dom.Document;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -1713,22 +1710,9 @@ public class DefaultServlet extends HttpServlet {
 
 // Prevent possible memory leak. Ensure Transformer and
 // TransformerFactory are not loaded from the web application.
-ClassLoader original;
-if (Globals.IS_SECURITY_ENABLED) {
-PrivilegedGetTccl pa = new PrivilegedGetTccl();
-original = AccessController.doPrivileged(pa);
-} else {
-original = Thread.currentThread().getContextClassLoader();
-}
+ClassLoader original = Thread.currentThread().getContextClassLoader();
 try {
-if (Globals.IS_SECURITY_ENABLED) {
-PrivilegedSetTccl pa =
-new 
PrivilegedSetTccl(DefaultServlet.class.getClassLoader());
-AccessController.doPrivileged(pa);
-} else {
-Thread.currentThread().setContextClassLoader(
-DefaultServlet.class.getClassLoader());
-}
+
Thread.currentThread().setContextClassLoader(DefaultServlet.class.getClassLoader());
 
 TransformerFactory tFactory = TransformerFactory.newInstance();
 Source xmlSource = new StreamSource(new 
StringReader(sb.toString()));
@@ -1743,12 +1727,7 @@ public class DefaultServlet extends HttpServlet {
 } catch (TransformerException e) {
 throw new 
ServletException(sm.getString("defaultServlet.xslError"), e);
 } finally {
-if (Globals.IS_SECURITY_ENABLED) {
-PrivilegedSetTccl pa = new PrivilegedSetTccl(original);
-AccessController.doPrivileged(pa);
-} else {
-Thread.currentThread().setContextClassLoader(original);
-}
+Thread.currentThread().setContextClassLoader(original);
 }
 }
 
diff --git a/java/org/apache/catalina/session/PersistentManagerBase.java 
b/java/org/apache/catalina/session/PersistentManagerBase.java
index 2c5b01deb9..61f753d6f6 100644
--- a/java/org/apache/catalina/session/PersistentManagerBase.java
+++ b/java/org/apache/catalina/session/PersistentManagerBase.java
@@ -17,9 +17,6 @@
 package org.apache.catalina.session;
 
 import java.io.IOException;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -32,7 +29,6 @@ import org.apache.catalina.LifecycleState;
 import org.apache.catalina.Session;
 import org.apache.catalina.Store;
 import org.apache.catalina.StoreManager;
-import org.apache.catalina.security.SecurityUtil;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 /**
@@ -52,81 +48,6 @@ public abstract class PersistentManagerBase extends 
ManagerBase
 
 private final Log log = LogFactory.getLog(PersistentManagerBase.class); // 
must not be static
 
-//  Security Classes
-
-private class PrivilegedStoreClear
- 

[tomcat] branch main updated: Remove some more SecurityManager references

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 4493b73d73 Remove some more SecurityManager references
4493b73d73 is described below

commit 4493b73d7318b7dc4c5a91d64b6970990b163673
Author: Mark Thomas 
AuthorDate: Thu Jan 12 15:27:53 2023 +

Remove some more SecurityManager references
---
 conf/catalina.properties   |  24 ---
 .../catalina/security/DeployXmlPermission.java |  38 
 .../catalina/security/SecurityClassLoad.java   | 204 -
 .../apache/catalina/security/SecurityConfig.java   | 147 ---
 java/org/apache/catalina/startup/Bootstrap.java|   3 -
 java/org/apache/catalina/startup/Catalina.java |  12 --
 java/org/apache/catalina/startup/HostConfig.java   |  40 +---
 java/org/apache/catalina/startup/Tomcat.java   |   2 -
 8 files changed, 2 insertions(+), 468 deletions(-)

diff --git a/conf/catalina.properties b/conf/catalina.properties
index 6c5cb3eae9..9e53a5 100644
--- a/conf/catalina.properties
+++ b/conf/catalina.properties
@@ -13,26 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageAccess unless the
-# corresponding RuntimePermission ("accessClassInPackage."+package) has
-# been granted.
-package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat.
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageDefinition unless the
-# corresponding RuntimePermission ("defineClassInPackage."+package) has
-# been granted.
-#
-# by default, no packages are restricted for definition, and none of
-# the class loaders supplied with the JDK call checkPackageDefinition.
-#
-package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\
-org.apache.jasper.,org.apache.naming.,org.apache.tomcat.
-
 #
 #
 # List of comma-separated paths defining the contents of the "common"
@@ -209,7 +189,3 @@ tomcat.util.buf.StringCache.byte.enabled=true
 #tomcat.util.buf.StringCache.char.enabled=true
 #tomcat.util.buf.StringCache.trainThreshold=50
 #tomcat.util.buf.StringCache.cacheSize=5000
-
-# Disable use of some privilege blocks Tomcat doesn't need since calls to the
-# code in question are always already inside a privilege block
-org.apache.el.GET_CLASSLOADER_USE_PRIVILEGED=false
diff --git a/java/org/apache/catalina/security/DeployXmlPermission.java 
b/java/org/apache/catalina/security/DeployXmlPermission.java
deleted file mode 100644
index bf8ca273c5..00
--- a/java/org/apache/catalina/security/DeployXmlPermission.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.catalina.security;
-
-import java.security.BasicPermission;
-
-/**
- * Grant this permission to a docBase to permit the web application to use any
- * META-INF/context.xml that might be present with in the
- * application when deployXML has been disabled at the Host level.
- * The name of the permission should be the base name for the web application.
- */
-public class DeployXmlPermission extends BasicPermission {
-
-private static final long serialVersionUID = 1L;
-
-public DeployXmlPermission(String name) {
-super(name);
-}
-
-public DeployXmlPermission(String name, String actions) {
-super(name, actions);
-}
-}
diff --git a/java/org/apache/catalina/security/SecurityClassLoad.java 
b/java/org/apache/catalina/security/SecurityClassLoad.java
deleted file mode 100644
index 67d5f37a97..00
--- a/java/org/apache/catalina/security/SecurityClassLoad.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional 

[tomcat] branch main updated: Replace methods deprecated in Java 16+

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 3a03f46ec0 Replace methods deprecated in Java 16+
3a03f46ec0 is described below

commit 3a03f46ec00a4cadb3bf584308bc675150613a00
Author: Mark Thomas 
AuthorDate: Thu Jan 12 15:25:36 2023 +

Replace methods deprecated in Java 16+
---
 java/org/apache/catalina/realm/CombinedRealm.java | 2 +-
 java/org/apache/catalina/realm/LockOutRealm.java  | 2 +-
 java/org/apache/catalina/realm/RealmBase.java | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/realm/CombinedRealm.java 
b/java/org/apache/catalina/realm/CombinedRealm.java
index eaf46cecd1..0968241e9a 100644
--- a/java/org/apache/catalina/realm/CombinedRealm.java
+++ b/java/org/apache/catalina/realm/CombinedRealm.java
@@ -320,7 +320,7 @@ public class CombinedRealm extends RealmBase {
 Principal authenticatedUser = null;
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectDN().getName();
+username = certs[0].getSubjectX500Principal().getName();
 }
 
 for (Realm realm : realms) {
diff --git a/java/org/apache/catalina/realm/LockOutRealm.java 
b/java/org/apache/catalina/realm/LockOutRealm.java
index 0743df6d6d..90fe1b64e9 100644
--- a/java/org/apache/catalina/realm/LockOutRealm.java
+++ b/java/org/apache/catalina/realm/LockOutRealm.java
@@ -166,7 +166,7 @@ public class LockOutRealm extends CombinedRealm {
 public Principal authenticate(X509Certificate[] certs) {
 String username = null;
 if (certs != null && certs.length >0) {
-username = certs[0].getSubjectDN().getName();
+username = certs[0].getSubjectX500Principal().getName();
 }
 
 Principal authenticatedUser = super.authenticate(certs);
diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index db4226f9e6..3ff9c336e2 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -452,7 +452,7 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 for (X509Certificate cert : certs) {
 if (log.isDebugEnabled()) {
 log.debug(" Checking validity for '" +
-cert.getSubjectDN().getName() + "'");
+cert.getSubjectX500Principal().getName() + "'");
 }
 try {
 cert.checkValidity();


-
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: Expand CheckStyle validation of Javadoc

2023-01-12 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 55ad12cd34 Expand CheckStyle validation of Javadoc
55ad12cd34 is described below

commit 55ad12cd34c8efe29e2c0f7d8c6d8ef8579fa6b5
Author: Mark Thomas 
AuthorDate: Thu Jan 12 14:48:54 2023 +

Expand CheckStyle validation of Javadoc
---
 java/javax/el/ExpressionFactory.java   |  1 -
 java/javax/servlet/Servlet.java|  1 -
 java/javax/servlet/ServletContext.java |  2 +-
 java/javax/servlet/http/HttpUtils.java |  3 --
 java/javax/servlet/jsp/HttpJspPage.java|  3 +-
 java/org/apache/catalina/ant/jmx/Arg.java  |  5 ---
 .../ant/jmx/JMXAccessorEqualsCondition.java|  1 -
 java/org/apache/catalina/connector/Connector.java  |  1 -
 .../catalina/core/ApplicationContextFacade.java|  2 +-
 java/org/apache/catalina/core/StandardContext.java |  4 +-
 .../apache/catalina/ha/session/DeltaManager.java   |  1 -
 .../apache/catalina/ha/session/DeltaSession.java   |  1 -
 .../apache/catalina/ha/session/SessionMessage.java | 10 ++---
 .../catalina/manager/HTMLManagerServlet.java   |  1 -
 .../org/apache/catalina/realm/DataSourceRealm.java |  1 -
 java/org/apache/catalina/realm/JDBCRealm.java  |  1 -
 java/org/apache/catalina/realm/RealmBase.java  | 10 +++--
 .../apache/catalina/tribes/ChannelException.java   |  7 +---
 .../apache/catalina/tribes/ChannelListener.java|  2 -
 .../org/apache/catalina/tribes/ChannelMessage.java |  2 +-
 java/org/apache/catalina/tribes/Member.java|  1 -
 .../catalina/tribes/group/ChannelCoordinator.java  |  1 -
 .../tribes/group/ChannelInterceptorBase.java   |  1 -
 .../apache/catalina/tribes/group/GroupChannel.java | 11 +-
 .../interceptors/FragmentationInterceptor.java |  1 -
 .../group/interceptors/NonBlockingCoordinator.java |  1 -
 .../group/interceptors/OrderInterceptor.java   |  2 -
 .../interceptors/StaticMembershipInterceptor.java  |  1 -
 .../group/interceptors/TcpPingInterceptor.java |  1 -
 java/org/apache/catalina/tribes/io/BufferPool.java |  5 ---
 .../catalina/tribes/io/BufferPool15Impl.java   |  4 --
 .../catalina/tribes/tipis/ReplicatedMapEntry.java  |  1 -
 .../catalina/tribes/transport/ReceiverBase.java|  1 -
 .../catalina/tribes/transport/SenderState.java |  4 --
 java/org/apache/catalina/util/DOMWriter.java   |  6 ++-
 java/org/apache/catalina/util/URLEncoder.java  |  1 -
 java/org/apache/coyote/RequestGroupInfo.java   |  6 +--
 java/org/apache/coyote/RequestInfo.java|  3 +-
 java/org/apache/coyote/Response.java   |  7 ++--
 .../apache/coyote/http11/Http11InputBuffer.java|  1 -
 java/org/apache/jasper/compiler/Node.java  |  2 -
 java/org/apache/jasper/tagplugins/jstl/Util.java   |  5 ++-
 .../org/apache/jasper/util/FastRemovalDequeue.java |  1 -
 java/org/apache/jasper/xmlparser/UCSReader.java|  3 +-
 java/org/apache/tomcat/JarScanFilter.java  |  1 -
 .../tomcat/dbcp/dbcp2/DelegatingStatement.java |  2 -
 .../tomcat/dbcp/dbcp2/PoolableConnection.java  |  2 -
 .../dbcp2/datasources/CPDSConnectionFactory.java   |  1 -
 java/org/apache/tomcat/jni/Address.java|  3 +-
 java/org/apache/tomcat/jni/BIOCallback.java|  3 +-
 java/org/apache/tomcat/jni/Directory.java  |  3 +-
 java/org/apache/tomcat/jni/Error.java  |  3 +-
 java/org/apache/tomcat/jni/File.java   | 21 +++
 java/org/apache/tomcat/jni/FileInfo.java   | 12 --
 java/org/apache/tomcat/jni/Global.java |  3 +-
 java/org/apache/tomcat/jni/Library.java|  4 --
 .../apache/tomcat/jni/LibraryNotFoundError.java|  1 -
 java/org/apache/tomcat/jni/Lock.java   |  3 +-
 java/org/apache/tomcat/jni/Mmap.java   |  3 +-
 java/org/apache/tomcat/jni/Multicast.java  |  3 +-
 java/org/apache/tomcat/jni/OS.java |  3 +-
 java/org/apache/tomcat/jni/PasswordCallback.java   |  3 +-
 java/org/apache/tomcat/jni/Poll.java   |  3 +-
 java/org/apache/tomcat/jni/PoolCallback.java   |  3 +-
 java/org/apache/tomcat/jni/Proc.java   | 44 ++
 java/org/apache/tomcat/jni/ProcErrorCallback.java  |  3 +-
 java/org/apache/tomcat/jni/Procattr.java   |  3 +-
 java/org/apache/tomcat/jni/Registry.java   |  3 +-
 java/org/apache/tomcat/jni/SSL.java|  4 --
 java/org/apache/tomcat/jni/SSLConf.java|  2 -
 java/org/apache/tomcat/jni/SSLContext.java |  4 --
 java/org/apache/tomcat/jni/SSLSocket.java  |  3 +-
 java/org/apache/tomcat/jni/Shm.java|  3 +-
 java/org/apache/tomcat/jni/Sockaddr.java   |  8 ++--
 java/org/apache/tomcat/jni/Socket.java 

Buildbot success in on tomcat-11.0.x

2023-01-12 Thread buildbot
Build status: Build succeeded!
Worker used: bb2_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/114
Blamelist: Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch main] 4bcef76a019a7d87505f081e213c447e0d2a8f8d


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



[tomcat] branch 9.0.x updated: Expand CheckStyle validation of Javadoc

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new f2f5e3ebea Expand CheckStyle validation of Javadoc
f2f5e3ebea is described below

commit f2f5e3ebeaa5bd216a7f25211296148c92e3ec34
Author: Mark Thomas 
AuthorDate: Thu Jan 12 14:48:54 2023 +

Expand CheckStyle validation of Javadoc
---
 java/javax/el/ExpressionFactory.java   |  1 -
 java/javax/servlet/Servlet.java|  1 -
 java/javax/servlet/ServletContext.java |  3 +-
 java/javax/servlet/http/HttpUtils.java |  3 --
 java/javax/servlet/jsp/HttpJspPage.java|  3 +-
 java/org/apache/catalina/ant/jmx/Arg.java  |  5 ---
 .../ant/jmx/JMXAccessorEqualsCondition.java|  1 -
 java/org/apache/catalina/connector/Connector.java  |  1 -
 .../catalina/core/ApplicationContextFacade.java|  2 +-
 java/org/apache/catalina/core/StandardContext.java |  4 +-
 .../apache/catalina/ha/session/DeltaManager.java   |  1 -
 .../apache/catalina/ha/session/DeltaSession.java   |  1 -
 .../apache/catalina/ha/session/SessionMessage.java | 10 ++---
 .../catalina/manager/HTMLManagerServlet.java   |  1 -
 .../org/apache/catalina/realm/DataSourceRealm.java |  1 -
 java/org/apache/catalina/realm/JDBCRealm.java  |  1 -
 java/org/apache/catalina/realm/RealmBase.java  | 10 +++--
 .../apache/catalina/tribes/ChannelException.java   |  7 +---
 .../apache/catalina/tribes/ChannelListener.java|  2 -
 .../org/apache/catalina/tribes/ChannelMessage.java |  2 +-
 java/org/apache/catalina/tribes/Member.java|  1 -
 .../catalina/tribes/group/ChannelCoordinator.java  |  1 -
 .../tribes/group/ChannelInterceptorBase.java   |  1 -
 .../apache/catalina/tribes/group/GroupChannel.java |  2 -
 .../interceptors/FragmentationInterceptor.java |  1 -
 .../group/interceptors/NonBlockingCoordinator.java |  1 -
 .../group/interceptors/OrderInterceptor.java   |  2 -
 .../interceptors/StaticMembershipInterceptor.java  |  1 -
 .../group/interceptors/TcpPingInterceptor.java |  1 -
 java/org/apache/catalina/tribes/io/BufferPool.java |  5 ---
 .../catalina/tribes/io/BufferPool15Impl.java   |  4 --
 .../catalina/tribes/tipis/ReplicatedMapEntry.java  |  1 -
 .../catalina/tribes/transport/ReceiverBase.java|  1 -
 .../catalina/tribes/transport/SenderState.java |  4 --
 java/org/apache/catalina/util/URLEncoder.java  |  1 -
 java/org/apache/coyote/RequestGroupInfo.java   |  6 +--
 java/org/apache/coyote/RequestInfo.java|  3 +-
 java/org/apache/coyote/Response.java   |  7 ++--
 java/org/apache/jasper/compiler/Node.java  |  2 -
 java/org/apache/jasper/tagplugins/jstl/Util.java   |  5 ++-
 .../org/apache/jasper/util/FastRemovalDequeue.java |  1 -
 java/org/apache/tomcat/JarScanFilter.java  |  2 -
 .../tomcat/dbcp/dbcp2/DelegatingStatement.java |  2 -
 .../tomcat/dbcp/dbcp2/PoolableConnection.java  |  2 -
 .../dbcp2/datasources/CPDSConnectionFactory.java   |  1 -
 java/org/apache/tomcat/jni/Address.java|  3 +-
 java/org/apache/tomcat/jni/BIOCallback.java|  3 +-
 java/org/apache/tomcat/jni/Directory.java  |  3 +-
 java/org/apache/tomcat/jni/Error.java  |  3 +-
 java/org/apache/tomcat/jni/File.java   | 21 +++
 java/org/apache/tomcat/jni/FileInfo.java   | 12 --
 java/org/apache/tomcat/jni/Global.java |  3 +-
 java/org/apache/tomcat/jni/Library.java|  4 --
 .../apache/tomcat/jni/LibraryNotFoundError.java|  1 -
 java/org/apache/tomcat/jni/Lock.java   |  3 +-
 java/org/apache/tomcat/jni/Mmap.java   |  3 +-
 java/org/apache/tomcat/jni/Multicast.java  |  3 +-
 java/org/apache/tomcat/jni/OS.java |  3 +-
 java/org/apache/tomcat/jni/PasswordCallback.java   |  3 +-
 java/org/apache/tomcat/jni/Poll.java   |  3 +-
 java/org/apache/tomcat/jni/PoolCallback.java   |  3 +-
 java/org/apache/tomcat/jni/Proc.java   | 44 ++
 java/org/apache/tomcat/jni/ProcErrorCallback.java  |  3 +-
 java/org/apache/tomcat/jni/Procattr.java   |  3 +-
 java/org/apache/tomcat/jni/Registry.java   |  3 +-
 java/org/apache/tomcat/jni/SSL.java|  4 --
 java/org/apache/tomcat/jni/SSLConf.java|  2 -
 java/org/apache/tomcat/jni/SSLContext.java |  4 --
 java/org/apache/tomcat/jni/SSLSocket.java  |  3 +-
 java/org/apache/tomcat/jni/Shm.java|  3 +-
 java/org/apache/tomcat/jni/Sockaddr.java   |  8 ++--
 java/org/apache/tomcat/jni/Socket.java | 18 -
 java/org/apache/tomcat/jni/Status.java |  6 ++-
 java/org/apache/tomcat/jni/Stdlib.java |  3 +-
 java/org/apache/tomcat/jni/Thread.java  

[tomcat] branch main updated: Fix calls to deprecated (Java 14+) code

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 53cc7de04d Fix calls to deprecated (Java 14+) code
53cc7de04d is described below

commit 53cc7de04dbc1ba8f46518f73f3e777e7f366807
Author: Mark Thomas 
AuthorDate: Thu Jan 12 14:57:39 2023 +

Fix calls to deprecated (Java 14+) code
---
 java/org/apache/catalina/ha/backend/MultiCastSender.java | 2 +-
 java/org/apache/catalina/tribes/membership/McastServiceImpl.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/ha/backend/MultiCastSender.java 
b/java/org/apache/catalina/ha/backend/MultiCastSender.java
index 1e00ee8dc3..2568a0e75b 100644
--- a/java/org/apache/catalina/ha/backend/MultiCastSender.java
+++ b/java/org/apache/catalina/ha/backend/MultiCastSender.java
@@ -60,7 +60,7 @@ public class MultiCastSender
 }
 
 s.setTimeToLive(config.getTtl());
-s.joinGroup(group);
+s.joinGroup(new InetSocketAddress(group, 0), null);
 } catch (Exception ex) {
 log.error(sm.getString("multiCastSender.multiCastFailed"), ex);
 s = null;
diff --git a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java 
b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
index 068a383440..a64d687efe 100644
--- a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
+++ b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
@@ -258,7 +258,7 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 }
 try {
 if ( sender == null ) {
-socket.joinGroup(address);
+socket.joinGroup(new InetSocketAddress(address, 0), null);
 }
 }catch (IOException iox) {
 log.error(sm.getString("mcastServiceImpl.unable.join"));
@@ -275,7 +275,7 @@ public class McastServiceImpl extends 
MembershipProviderBase {
 throw new 
IllegalStateException(sm.getString("mcastServiceImpl.send.running"));
 }
 if ( receiver == null ) {
-socket.joinGroup(address);
+socket.joinGroup(new InetSocketAddress(address, 0), null);
 }
 //make sure at least one packet gets out there
 send(false);


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



[tomcat] branch 10.1.x updated: Expand CheckStyle validation of Javadoc

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 8c2ea6e463 Expand CheckStyle validation of Javadoc
8c2ea6e463 is described below

commit 8c2ea6e4634f41dad906f15508f9e83ee82ec8b3
Author: Mark Thomas 
AuthorDate: Thu Jan 12 14:48:54 2023 +

Expand CheckStyle validation of Javadoc
---
 java/jakarta/el/ExpressionFactory.java  |  1 -
 java/jakarta/servlet/Servlet.java   |  1 -
 java/jakarta/servlet/ServletContext.java|  3 ++-
 java/jakarta/servlet/jsp/HttpJspPage.java   |  3 ++-
 java/org/apache/catalina/ant/jmx/Arg.java   |  5 -
 .../ant/jmx/JMXAccessorEqualsCondition.java |  1 -
 java/org/apache/catalina/connector/Connector.java   |  1 -
 .../catalina/core/ApplicationContextFacade.java |  2 +-
 java/org/apache/catalina/core/StandardContext.java  |  4 ++--
 .../apache/catalina/ha/session/DeltaManager.java|  1 -
 .../apache/catalina/ha/session/DeltaSession.java|  1 -
 .../apache/catalina/ha/session/SessionMessage.java  | 10 +++---
 .../apache/catalina/manager/HTMLManagerServlet.java |  1 -
 java/org/apache/catalina/realm/DataSourceRealm.java |  1 -
 java/org/apache/catalina/realm/RealmBase.java   | 10 ++
 .../apache/catalina/tribes/ChannelException.java|  7 ++-
 .../org/apache/catalina/tribes/ChannelListener.java |  2 --
 java/org/apache/catalina/tribes/ChannelMessage.java |  2 +-
 java/org/apache/catalina/tribes/Member.java |  1 -
 .../catalina/tribes/group/ChannelCoordinator.java   |  1 -
 .../tribes/group/ChannelInterceptorBase.java|  1 -
 .../apache/catalina/tribes/group/GroupChannel.java  |  2 --
 .../interceptors/FragmentationInterceptor.java  |  1 -
 .../group/interceptors/NonBlockingCoordinator.java  |  1 -
 .../tribes/group/interceptors/OrderInterceptor.java |  2 --
 .../interceptors/StaticMembershipInterceptor.java   |  1 -
 .../group/interceptors/TcpPingInterceptor.java  |  1 -
 .../catalina/tribes/tipis/ReplicatedMapEntry.java   |  1 -
 .../catalina/tribes/transport/ReceiverBase.java |  1 -
 .../catalina/tribes/transport/SenderState.java  |  4 
 java/org/apache/catalina/util/URLEncoder.java   |  1 -
 java/org/apache/coyote/Request.java |  1 -
 java/org/apache/coyote/RequestGroupInfo.java|  6 +++---
 java/org/apache/coyote/Response.java|  7 ---
 java/org/apache/jasper/compiler/Node.java   |  2 --
 java/org/apache/jasper/tagplugins/jstl/Util.java|  5 +++--
 java/org/apache/jasper/util/FastRemovalDequeue.java |  1 -
 java/org/apache/tomcat/JarScanFilter.java   |  2 --
 .../tomcat/dbcp/dbcp2/DelegatingStatement.java  |  2 --
 .../tomcat/dbcp/dbcp2/PoolableConnection.java   |  2 --
 .../dbcp2/datasources/CPDSConnectionFactory.java|  1 -
 java/org/apache/tomcat/jni/Library.java |  4 
 .../org/apache/tomcat/jni/LibraryNotFoundError.java |  1 -
 java/org/apache/tomcat/jni/SSL.java |  4 
 java/org/apache/tomcat/jni/SSLConf.java |  2 --
 java/org/apache/tomcat/jni/SSLContext.java  |  4 
 java/org/apache/tomcat/util/buf/MessageBytes.java   | 18 --
 .../tomcat/util/digester/DocumentProperties.java|  1 -
 java/org/apache/tomcat/util/http/MimeHeaders.java   | 19 +--
 java/org/apache/tomcat/util/http/Parameters.java|  7 ++-
 .../util/http/fileupload/FileItemIterator.java  | 12 
 .../apache/tomcat/util/modeler/BaseModelMBean.java  |  3 ++-
 .../org/apache/tomcat/util/modeler/ManagedBean.java |  4 ++--
 java/org/apache/tomcat/util/net/SSLSupport.java |  2 --
 .../apache/tomcat/util/net/jsse/JSSESupport.java| 21 +
 .../server/WsRemoteEndpointImplServer.java  |  1 -
 .../apache/tomcat/jdbc/pool/DataSourceProxy.java|  1 -
 .../apache/tomcat/jdbc/pool/FairBlockingQueue.java  |  1 -
 .../apache/tomcat/jdbc/pool/PooledConnection.java   |  1 -
 .../jdbc/pool/interceptor/SlowQueryReport.java  |  7 ---
 res/checkstyle/checkstyle.xml   |  1 +
 .../catalina/filters/TesterHttpServletResponse.java |  1 -
 test/org/apache/catalina/startup/BytesStreamer.java |  3 ---
 .../catalina/startup/NoMappingParamServlet.java |  4 
 test/org/apache/catalina/startup/ParamServlet.java  |  4 
 .../apache/catalina/tribes/demos/EchoRpcTest.java   |  1 -
 66 files changed, 78 insertions(+), 152 deletions(-)

diff --git a/java/jakarta/el/ExpressionFactory.java 
b/java/jakarta/el/ExpressionFactory.java
index aeacc00b8c..4cc8f20897 100644
--- a/java/jakarta/el/ExpressionFactory.java
+++ b/java/jakarta/el/ExpressionFactory.java
@@ -37,7 +37,6 @@ import java.util.concurrent.locks.ReadWriteLock;
 import 

[tomcat] branch main updated: Expand CheckStyle validation of Javadoc

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 32a1ed6ea9 Expand CheckStyle validation of Javadoc
32a1ed6ea9 is described below

commit 32a1ed6ea9368fe8f9c3e2e2128197dda0756d67
Author: Mark Thomas 
AuthorDate: Thu Jan 12 14:48:54 2023 +

Expand CheckStyle validation of Javadoc
---
 java/jakarta/el/ExpressionFactory.java  |  1 -
 java/jakarta/servlet/Servlet.java   |  1 -
 java/jakarta/servlet/ServletContext.java|  3 ++-
 java/jakarta/servlet/jsp/HttpJspPage.java   |  3 ++-
 java/org/apache/catalina/ant/jmx/Arg.java   |  5 -
 .../ant/jmx/JMXAccessorEqualsCondition.java |  1 -
 java/org/apache/catalina/connector/Connector.java   |  1 -
 .../catalina/core/ApplicationContextFacade.java |  2 +-
 java/org/apache/catalina/core/StandardContext.java  |  4 ++--
 .../apache/catalina/ha/session/DeltaManager.java|  1 -
 .../apache/catalina/ha/session/DeltaSession.java|  1 -
 .../apache/catalina/ha/session/SessionMessage.java  | 10 +++---
 .../apache/catalina/manager/HTMLManagerServlet.java |  1 -
 java/org/apache/catalina/realm/DataSourceRealm.java |  1 -
 java/org/apache/catalina/realm/RealmBase.java   | 10 ++
 .../apache/catalina/tribes/ChannelException.java|  7 ++-
 .../org/apache/catalina/tribes/ChannelListener.java |  2 --
 java/org/apache/catalina/tribes/ChannelMessage.java |  2 +-
 java/org/apache/catalina/tribes/Member.java |  1 -
 .../catalina/tribes/group/ChannelCoordinator.java   |  1 -
 .../tribes/group/ChannelInterceptorBase.java|  1 -
 .../apache/catalina/tribes/group/GroupChannel.java  |  2 --
 .../interceptors/FragmentationInterceptor.java  |  1 -
 .../group/interceptors/NonBlockingCoordinator.java  |  1 -
 .../tribes/group/interceptors/OrderInterceptor.java |  2 --
 .../interceptors/StaticMembershipInterceptor.java   |  1 -
 .../group/interceptors/TcpPingInterceptor.java  |  1 -
 .../catalina/tribes/tipis/ReplicatedMapEntry.java   |  1 -
 .../catalina/tribes/transport/ReceiverBase.java |  1 -
 .../catalina/tribes/transport/SenderState.java  |  4 
 java/org/apache/catalina/util/URLEncoder.java   |  1 -
 java/org/apache/coyote/RequestGroupInfo.java|  6 +++---
 java/org/apache/coyote/Response.java|  7 ---
 java/org/apache/jasper/compiler/Node.java   |  2 --
 java/org/apache/jasper/tagplugins/jstl/Util.java|  5 +++--
 java/org/apache/jasper/util/FastRemovalDequeue.java |  1 -
 java/org/apache/tomcat/JarScanFilter.java   |  2 --
 .../tomcat/dbcp/dbcp2/DelegatingStatement.java  |  2 --
 .../tomcat/dbcp/dbcp2/PoolableConnection.java   |  2 --
 .../dbcp2/datasources/CPDSConnectionFactory.java|  1 -
 java/org/apache/tomcat/jni/Library.java |  4 
 .../org/apache/tomcat/jni/LibraryNotFoundError.java |  1 -
 java/org/apache/tomcat/jni/SSL.java |  4 
 java/org/apache/tomcat/jni/SSLConf.java |  2 --
 java/org/apache/tomcat/jni/SSLContext.java  |  4 
 java/org/apache/tomcat/util/buf/MessageBytes.java   | 18 --
 .../tomcat/util/digester/DocumentProperties.java|  1 -
 java/org/apache/tomcat/util/http/MimeHeaders.java   | 19 +--
 java/org/apache/tomcat/util/http/Parameters.java|  7 ++-
 .../util/http/fileupload/FileItemIterator.java  | 12 
 .../apache/tomcat/util/modeler/BaseModelMBean.java  |  3 ++-
 .../org/apache/tomcat/util/modeler/ManagedBean.java |  4 ++--
 java/org/apache/tomcat/util/net/SSLSupport.java |  2 --
 .../apache/tomcat/util/net/jsse/JSSESupport.java| 21 +
 .../server/WsRemoteEndpointImplServer.java  |  1 -
 .../apache/tomcat/jdbc/pool/DataSourceProxy.java|  1 -
 .../apache/tomcat/jdbc/pool/FairBlockingQueue.java  |  1 -
 .../apache/tomcat/jdbc/pool/PooledConnection.java   |  1 -
 .../jdbc/pool/interceptor/SlowQueryReport.java  |  7 ---
 res/checkstyle/checkstyle.xml   |  1 +
 .../catalina/filters/TesterHttpServletResponse.java |  1 -
 test/org/apache/catalina/startup/BytesStreamer.java |  3 ---
 .../catalina/startup/NoMappingParamServlet.java |  4 
 test/org/apache/catalina/startup/ParamServlet.java  |  4 
 .../apache/catalina/tribes/demos/EchoRpcTest.java   |  1 -
 65 files changed, 78 insertions(+), 151 deletions(-)

diff --git a/java/jakarta/el/ExpressionFactory.java 
b/java/jakarta/el/ExpressionFactory.java
index 2eca6205df..a23625d0dc 100644
--- a/java/jakarta/el/ExpressionFactory.java
+++ b/java/jakarta/el/ExpressionFactory.java
@@ -35,7 +35,6 @@ import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 /**
- *
  * @since 2.1
  */
 public 

[tomcat] branch main updated: Remove more SecurityManager and related API references

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 6b95c3b0fa Remove more SecurityManager and related API references
6b95c3b0fa is described below

commit 6b95c3b0fabb1ca290b72ec92ef29f14482a4c8a
Author: Mark Thomas 
AuthorDate: Thu Jan 12 14:21:11 2023 +

Remove more SecurityManager and related API references
---
 .../apache/catalina/loader/LocalStrings.properties |   1 -
 .../catalina/loader/LocalStrings_fr.properties |   1 -
 .../catalina/loader/LocalStrings_ja.properties |   1 -
 .../catalina/loader/LocalStrings_ko.properties |   1 -
 .../catalina/loader/LocalStrings_zh_CN.properties  |   1 -
 .../catalina/loader/WebappClassLoaderBase.java | 228 +
 java/org/apache/catalina/loader/WebappLoader.java  |  41 
 .../org/apache/tomcat/util/IntrospectionUtils.java |  35 +---
 .../util/digester/EnvironmentPropertySource.java   |  18 +-
 .../digester/ServiceBindingPropertySource.java |  26 +--
 .../tomcat/util/digester/SystemPropertySource.java |  21 +-
 .../tomcat/util/security/PermissionCheck.java  |  43 
 12 files changed, 18 insertions(+), 399 deletions(-)

diff --git a/java/org/apache/catalina/loader/LocalStrings.properties 
b/java/org/apache/catalina/loader/LocalStrings.properties
index b861f8b797..0b4792b4ba 100644
--- a/java/org/apache/catalina/loader/LocalStrings.properties
+++ b/java/org/apache/catalina/loader/LocalStrings.properties
@@ -45,7 +45,6 @@ webappClassLoader.readError=Resource read error: Could not 
load [{0}].
 webappClassLoader.removeTransformer=Removed class file transformer [{0}] from 
web application [{1}].
 webappClassLoader.resourceModified=Resource [{0}] has been modified. The last 
modified time was [{1}] and is now [{2}]
 webappClassLoader.restrictedPackage=Security violation, attempt to use 
restricted class [{0}]
-webappClassLoader.securityException=Security exception trying to find class 
[{0}] in findClassInternal [{1}]
 webappClassLoader.stackTrace=The web application [{0}] appears to have started 
a thread named [{1}] but has failed to stop it. This is very likely to create a 
memory leak. Stack trace of thread:{2}
 webappClassLoader.stackTraceRequestThread=The web application [{0}] is still 
processing a request that has yet to finish. This is very likely to create a 
memory leak. You can control the time allowed for requests to finish by using 
the unloadDelay attribute of the standard Context implementation. Stack trace 
of request processing thread:[{2}]
 webappClassLoader.stopThreadFail=Failed to terminate thread named [{0}] for 
web application [{1}]
diff --git a/java/org/apache/catalina/loader/LocalStrings_fr.properties 
b/java/org/apache/catalina/loader/LocalStrings_fr.properties
index 3a685eee4c..a360385b60 100644
--- a/java/org/apache/catalina/loader/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/loader/LocalStrings_fr.properties
@@ -45,7 +45,6 @@ webappClassLoader.readError=Erreur lors de la lecture de la 
resource : impossibl
 webappClassLoader.removeTransformer=Enlevé le transformateur de fichiers de 
classe [{0}] de l''application web [{1}]
 webappClassLoader.resourceModified=La ressource [{0}] a été modifiée, la date 
de dernière modification était [{1}] et est désormais [{2}]
 webappClassLoader.restrictedPackage=Violation de sécurité en essayant 
d''utiliser à une classe à accès restreint [{0}]
-webappClassLoader.securityException=Exception de sécurité en essayant de 
trouver la classe [{0}] dans findClassInternal [{1}]
 webappClassLoader.stackTrace=L''application web [{0}] semble avoir démarré un 
thread nommé [{1}] mais ne l''a pas arrêté, ce qui va probablement créer une 
fuite de mémoire ; la trace du thread est : {2}
 webappClassLoader.stackTraceRequestThread=Une requête de l''application web 
[{0}] est toujours en cours, ce qui causera certainement une fuite de mémoire, 
vous pouvez contrôler le temps alloué en utilisant l''attribut unloadDelay de 
l''implémentation standard de Context ; trace du fil d’exécution de la requête 
: [{2}]
 webappClassLoader.stopThreadFail=Impossible de terminer le thread nommé [{0}] 
pour l''application [{1}]
diff --git a/java/org/apache/catalina/loader/LocalStrings_ja.properties 
b/java/org/apache/catalina/loader/LocalStrings_ja.properties
index 96717e80b7..e64edd1fda 100644
--- a/java/org/apache/catalina/loader/LocalStrings_ja.properties
+++ b/java/org/apache/catalina/loader/LocalStrings_ja.properties
@@ -45,7 +45,6 @@ webappClassLoader.readError=リソース読み込みエラー: [{0}] が読み
 webappClassLoader.removeTransformer=クラスファイル変換器 [{0}] を Web アプリケーション [{1}] 
から削除しました。
 webappClassLoader.resourceModified=リソース [{0}] は変更されています。直前の更新日時は 
[{1}]、最新の更新日時は [{2}] です。
 webappClassLoader.restrictedPackage=セキュリティー違反。制限されたクラス [{0}] を使おうとしました。

[tomcat] branch 8.5.x updated: Expand CheckStyle checks for Javadoc

2023-01-12 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 9f882b290e Expand CheckStyle checks for Javadoc
9f882b290e is described below

commit 9f882b290e391b5dee688c61e313a1eb94e38a7f
Author: Mark Thomas 
AuthorDate: Thu Jan 12 13:55:42 2023 +

Expand CheckStyle checks for Javadoc
---
 java/org/apache/catalina/filters/CorsFilter.java   |  4 ++--
 java/org/apache/catalina/tribes/Channel.java   |  2 +-
 java/org/apache/catalina/util/ExtensionValidator.java  |  2 +-
 java/org/apache/jasper/EmbeddedServletOptions.java |  2 +-
 java/org/apache/jasper/compiler/JspReader.java |  2 +-
 java/org/apache/jasper/compiler/Node.java  |  8 
 java/org/apache/jasper/compiler/Parser.java| 10 +-
 java/org/apache/tomcat/util/buf/UriUtil.java   |  4 ++--
 java/org/apache/tomcat/util/modeler/Registry.java  |  4 ++--
 res/checkstyle/checkstyle.xml  |  1 +
 webapps/docs/appdev/sample/src/mypackage/Hello.java|  2 +-
 webapps/examples/WEB-INF/classes/CookieExample.java|  2 +-
 webapps/examples/WEB-INF/classes/RequestHeaderExample.java |  2 +-
 webapps/examples/WEB-INF/classes/RequestInfoExample.java   |  2 +-
 webapps/examples/WEB-INF/classes/RequestParamExample.java  |  2 +-
 webapps/examples/WEB-INF/classes/SessionExample.java   |  2 +-
 16 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/java/org/apache/catalina/filters/CorsFilter.java 
b/java/org/apache/catalina/filters/CorsFilter.java
index 2ce4e04744..0145e50ff3 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -780,11 +780,11 @@ public class CorsFilter implements Filter {
 }
 
 /**
- * Takes a comma separated list and returns a Set.
+ * Takes a comma separated list and returns a SetString>.
  *
  * @param data
  *A comma separated list of strings.
- * @return Set
+ * @return Set$lt;String>
  */
 private Set parseStringToSet(final String data) {
 String[] splits;
diff --git a/java/org/apache/catalina/tribes/Channel.java 
b/java/org/apache/catalina/tribes/Channel.java
index 14db643a32..2fd8cd667a 100644
--- a/java/org/apache/catalina/tribes/Channel.java
+++ b/java/org/apache/catalina/tribes/Channel.java
@@ -66,7 +66,7 @@ import 
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor;
  *   MembershipService ChannelSender ChannelReceiver   
 [IO layer]
  * 
  *
- * For example usage @see org.apache.catalina.tribes.group.GroupChannel
+ * @see org.apache.catalina.tribes.group.GroupChannel example usage
  */
 public interface Channel {
 
diff --git a/java/org/apache/catalina/util/ExtensionValidator.java 
b/java/org/apache/catalina/util/ExtensionValidator.java
index 759cf6d9c8..7501aa8171 100644
--- a/java/org/apache/catalina/util/ExtensionValidator.java
+++ b/java/org/apache/catalina/util/ExtensionValidator.java
@@ -189,7 +189,7 @@ public final class ExtensionValidator {
  * objects. This method requires an application name (which is the
  * context root of the application at runtime).
  *
- * false is returned if the extension dependencies
+ * false is returned if the extension dependencies
  * represented by any given ManifestResource objects
  * is not met.
  *
diff --git a/java/org/apache/jasper/EmbeddedServletOptions.java 
b/java/org/apache/jasper/EmbeddedServletOptions.java
index 7113115140..5a8664c32f 100644
--- a/java/org/apache/jasper/EmbeddedServletOptions.java
+++ b/java/org/apache/jasper/EmbeddedServletOptions.java
@@ -114,7 +114,7 @@ public final class EmbeddedServletOptions implements 
Options {
 /**
  * Need to have this as is for versions 4 and 5 of IE. Can be set from
  * the initParams so if it changes in the future all that is needed is
- * to have a jsp initParam of type ieClassId=""
+ * to have a jsp initParam of type ieClassId="value>"
  */
 private String ieClassId = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93";
 
diff --git a/java/org/apache/jasper/compiler/JspReader.java 
b/java/org/apache/jasper/compiler/JspReader.java
index c2c86cec6c..94ff0675af 100644
--- a/java/org/apache/jasper/compiler/JspReader.java
+++ b/java/org/apache/jasper/compiler/JspReader.java
@@ -487,7 +487,7 @@ class JspReader {
  * Skip until the given end tag is matched in the stream.
  * When returned, the context is positioned past the end of the tag.
  *
- * @param tag The name of the tag whose ETag () to match.
+ * @param tag The name of the tag whose ETag (/tag>) to match.
  * @return A non-null Mark instance (positioned immediately
  *   

Re: CI, Java 17 and Javadoc

2023-01-12 Thread Mark Thomas

On 12/01/2023 13:41, Rémy Maucherat wrote:

On Thu, Jan 12, 2023 at 1:19 PM Mark Thomas  wrote:


I tried switching the CI over to use Java 17 last night. This exposed an
unexpected Javadoc behaviour that is currently breaking the 9.0.x and
8.5.x builds.

Ant is configured to run Javadoc with failonwarning="true"

When running the Javadoc task with Java 17:

- if source="11" (Tomcat 10.1.x and 11.0.x) no warnings are generated
regarding SecurityManager use

- if source="8" (Tomcat 9.0.x) warnings are generated for
SecurityManager use

- if source="7" (Tomcat 8.5.x) warnings are generated for
SecurityManager use

I don't understand why the warning generation is only generated for
older source values. It would make more sense to me if it were only
generated for newer values.


Yes, ok, that looks very odd ...


Possible options:
- only use Java 17 for 11.0.x builds
- use failonwarning="false"


Yes please. If you remember, I sent an update earlier on Javadoc 18+.
There will now be some warnings that will make it counterproductive
for us (in particular, having to have an empty constructor on
everything just so that it can be javadoc-ed). We should keep the
setting around however to see how these things evolve, maybe it would
be improved/fixed eventually ...


Ah yes. I remember that now. I'll parameterise the setting and default 
it to false. Early indications are that the CheckStyle checks are more 
useful anyway. They have already uncovered a bunch of issues. Some are 
cosmetic but others are more significant such as whole sets of constants 
having the wrong descriptions.


Mark



Rémy


- something else

I'll switch the CI system back to Java 11 while we discuss options. I
also plan to look at CheckStyle options for Javadoc validation to see if
they could be an alternative approach if we use failonwarning="false"

Thoughts?





Mark

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



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



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



[tomcat] branch 9.0.x updated: Expand CheckStyle checks for Javadoc

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new c911f43c63 Expand CheckStyle checks for Javadoc
c911f43c63 is described below

commit c911f43c63ab50caf2549849a42d1113497440e9
Author: Mark Thomas 
AuthorDate: Thu Jan 12 13:55:42 2023 +

Expand CheckStyle checks for Javadoc
---
 java/org/apache/catalina/filters/CorsFilter.java   |  4 ++--
 java/org/apache/catalina/tribes/Channel.java   |  2 +-
 java/org/apache/catalina/util/ExtensionValidator.java  |  2 +-
 java/org/apache/jasper/EmbeddedServletOptions.java |  2 +-
 java/org/apache/jasper/compiler/JspReader.java |  2 +-
 java/org/apache/jasper/compiler/Node.java  |  8 
 java/org/apache/jasper/compiler/Parser.java| 10 +-
 java/org/apache/tomcat/util/buf/UriUtil.java   |  4 ++--
 java/org/apache/tomcat/util/modeler/Registry.java  |  4 ++--
 res/checkstyle/checkstyle.xml  |  1 +
 webapps/docs/appdev/sample/src/mypackage/Hello.java|  2 +-
 webapps/examples/WEB-INF/classes/CookieExample.java|  2 +-
 webapps/examples/WEB-INF/classes/RequestHeaderExample.java |  2 +-
 webapps/examples/WEB-INF/classes/RequestInfoExample.java   |  2 +-
 webapps/examples/WEB-INF/classes/RequestParamExample.java  |  2 +-
 webapps/examples/WEB-INF/classes/SessionExample.java   |  2 +-
 16 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/java/org/apache/catalina/filters/CorsFilter.java 
b/java/org/apache/catalina/filters/CorsFilter.java
index 5ad6dbb3e3..8b80287f51 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -763,11 +763,11 @@ public class CorsFilter extends GenericFilter {
 }
 
 /**
- * Takes a comma separated list and returns a Set.
+ * Takes a comma separated list and returns a SetString>.
  *
  * @param data
  *A comma separated list of strings.
- * @return Set
+ * @return Set$lt;String>
  */
 private Set parseStringToSet(final String data) {
 String[] splits;
diff --git a/java/org/apache/catalina/tribes/Channel.java 
b/java/org/apache/catalina/tribes/Channel.java
index 16b426c611..f55b8dd06c 100644
--- a/java/org/apache/catalina/tribes/Channel.java
+++ b/java/org/apache/catalina/tribes/Channel.java
@@ -70,7 +70,7 @@ import org.apache.juli.logging.LogFactory;
  *   MembershipService ChannelSender ChannelReceiver   
 [IO layer]
  * 
  *
- * For example usage @see org.apache.catalina.tribes.group.GroupChannel
+ * @see org.apache.catalina.tribes.group.GroupChannel example usage
  */
 public interface Channel {
 
diff --git a/java/org/apache/catalina/util/ExtensionValidator.java 
b/java/org/apache/catalina/util/ExtensionValidator.java
index f5cfa6a02b..ca9a28ab55 100644
--- a/java/org/apache/catalina/util/ExtensionValidator.java
+++ b/java/org/apache/catalina/util/ExtensionValidator.java
@@ -189,7 +189,7 @@ public final class ExtensionValidator {
  * objects. This method requires an application name (which is the
  * context root of the application at runtime).
  *
- * false is returned if the extension dependencies
+ * false is returned if the extension dependencies
  * represented by any given ManifestResource objects
  * is not met.
  *
diff --git a/java/org/apache/jasper/EmbeddedServletOptions.java 
b/java/org/apache/jasper/EmbeddedServletOptions.java
index 91813aba79..a53c35c268 100644
--- a/java/org/apache/jasper/EmbeddedServletOptions.java
+++ b/java/org/apache/jasper/EmbeddedServletOptions.java
@@ -114,7 +114,7 @@ public final class EmbeddedServletOptions implements 
Options {
 /**
  * Need to have this as is for versions 4 and 5 of IE. Can be set from
  * the initParams so if it changes in the future all that is needed is
- * to have a jsp initParam of type ieClassId=""
+ * to have a jsp initParam of type ieClassId="value>"
  */
 private String ieClassId = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93";
 
diff --git a/java/org/apache/jasper/compiler/JspReader.java 
b/java/org/apache/jasper/compiler/JspReader.java
index c2c86cec6c..94ff0675af 100644
--- a/java/org/apache/jasper/compiler/JspReader.java
+++ b/java/org/apache/jasper/compiler/JspReader.java
@@ -487,7 +487,7 @@ class JspReader {
  * Skip until the given end tag is matched in the stream.
  * When returned, the context is positioned past the end of the tag.
  *
- * @param tag The name of the tag whose ETag () to match.
+ * @param tag The name of the tag whose ETag (/tag>) to match.
  * @return A non-null Mark instance (positioned immediately
  *   before the ETag) if found, null 

[tomcat] branch 10.1.x updated: Expand CheckStyle checks for Javadoc

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 1b9ef3b106 Expand CheckStyle checks for Javadoc
1b9ef3b106 is described below

commit 1b9ef3b10614c407e7b84480347b68ce41e80441
Author: Mark Thomas 
AuthorDate: Thu Jan 12 13:55:42 2023 +

Expand CheckStyle checks for Javadoc
---
 java/org/apache/catalina/filters/CorsFilter.java   |  4 ++--
 java/org/apache/catalina/tribes/Channel.java   |  2 +-
 java/org/apache/jasper/compiler/JspReader.java |  2 +-
 java/org/apache/jasper/compiler/Node.java  |  8 
 java/org/apache/jasper/compiler/Parser.java| 10 +-
 java/org/apache/tomcat/util/buf/UriUtil.java   |  4 ++--
 java/org/apache/tomcat/util/modeler/Registry.java  |  4 ++--
 res/checkstyle/checkstyle.xml  |  1 +
 webapps/docs/appdev/sample/src/mypackage/Hello.java|  2 +-
 webapps/examples/WEB-INF/classes/CookieExample.java|  2 +-
 webapps/examples/WEB-INF/classes/RequestHeaderExample.java |  2 +-
 webapps/examples/WEB-INF/classes/RequestInfoExample.java   |  2 +-
 webapps/examples/WEB-INF/classes/RequestParamExample.java  |  2 +-
 webapps/examples/WEB-INF/classes/SessionExample.java   |  2 +-
 14 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/catalina/filters/CorsFilter.java 
b/java/org/apache/catalina/filters/CorsFilter.java
index 618ffb0eeb..0b76b1e83d 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -763,11 +763,11 @@ public class CorsFilter extends GenericFilter {
 }
 
 /**
- * Takes a comma separated list and returns a Set.
+ * Takes a comma separated list and returns a SetString>.
  *
  * @param data
  *A comma separated list of strings.
- * @return Set
+ * @return Set$lt;String>
  */
 private Set parseStringToSet(final String data) {
 String[] splits;
diff --git a/java/org/apache/catalina/tribes/Channel.java 
b/java/org/apache/catalina/tribes/Channel.java
index 16b426c611..f55b8dd06c 100644
--- a/java/org/apache/catalina/tribes/Channel.java
+++ b/java/org/apache/catalina/tribes/Channel.java
@@ -70,7 +70,7 @@ import org.apache.juli.logging.LogFactory;
  *   MembershipService ChannelSender ChannelReceiver   
 [IO layer]
  * 
  *
- * For example usage @see org.apache.catalina.tribes.group.GroupChannel
+ * @see org.apache.catalina.tribes.group.GroupChannel example usage
  */
 public interface Channel {
 
diff --git a/java/org/apache/jasper/compiler/JspReader.java 
b/java/org/apache/jasper/compiler/JspReader.java
index c2c86cec6c..94ff0675af 100644
--- a/java/org/apache/jasper/compiler/JspReader.java
+++ b/java/org/apache/jasper/compiler/JspReader.java
@@ -487,7 +487,7 @@ class JspReader {
  * Skip until the given end tag is matched in the stream.
  * When returned, the context is positioned past the end of the tag.
  *
- * @param tag The name of the tag whose ETag () to match.
+ * @param tag The name of the tag whose ETag (/tag>) to match.
  * @return A non-null Mark instance (positioned immediately
  *   before the ETag) if found, null 
otherwise.
  */
diff --git a/java/org/apache/jasper/compiler/Node.java 
b/java/org/apache/jasper/compiler/Node.java
index 3d28cce2a0..ae3559d205 100644
--- a/java/org/apache/jasper/compiler/Node.java
+++ b/java/org/apache/jasper/compiler/Node.java
@@ -757,7 +757,7 @@ abstract class Node implements TagConstants {
 }
 
 /**
- * Represents a  tag file action
+ * Represents a jsp:invoke> tag file action
  */
 public static class InvokeAction extends Node {
 
@@ -779,7 +779,7 @@ abstract class Node implements TagConstants {
 }
 
 /**
- * Represents a  tag file action
+ * Represents a jsp:doBody> tag file action
  */
 public static class DoBodyAction extends Node {
 
@@ -1265,7 +1265,7 @@ abstract class Node implements TagConstants {
 }
 
 /**
- * Represents a .
+ * Represents a jsp:element>.
  */
 public static class JspElement extends Node {
 
@@ -1313,7 +1313,7 @@ abstract class Node implements TagConstants {
 }
 
 /**
- * Represents a .
+ * Represents a jsp:output>.
  */
 public static class JspOutput extends Node {
 
diff --git a/java/org/apache/jasper/compiler/Parser.java 
b/java/org/apache/jasper/compiler/Parser.java
index c05ce36979..cc0be77c64 100644
--- a/java/org/apache/jasper/compiler/Parser.java
+++ b/java/org/apache/jasper/compiler/Parser.java
@@ -268,7 +268,7 @@ class Parser implements TagConstants {
 }
 
 /**
- * AttributeValueDouble ::= (QuotedChar - '"')* ('"' | )
+ * 

[tomcat] branch main updated: Expand CheckStyle checks for Javadoc

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 4bcef76a01 Expand CheckStyle checks for Javadoc
4bcef76a01 is described below

commit 4bcef76a019a7d87505f081e213c447e0d2a8f8d
Author: Mark Thomas 
AuthorDate: Thu Jan 12 13:55:42 2023 +

Expand CheckStyle checks for Javadoc
---
 java/org/apache/catalina/filters/CorsFilter.java   |  4 ++--
 java/org/apache/catalina/tribes/Channel.java   |  2 +-
 java/org/apache/jasper/compiler/JspReader.java |  2 +-
 java/org/apache/jasper/compiler/Node.java  |  8 
 java/org/apache/jasper/compiler/Parser.java| 10 +-
 java/org/apache/tomcat/util/buf/UriUtil.java   |  4 ++--
 java/org/apache/tomcat/util/modeler/Registry.java  |  4 ++--
 res/checkstyle/checkstyle.xml  |  1 +
 webapps/docs/appdev/sample/src/mypackage/Hello.java|  2 +-
 webapps/examples/WEB-INF/classes/CookieExample.java|  2 +-
 webapps/examples/WEB-INF/classes/RequestHeaderExample.java |  2 +-
 webapps/examples/WEB-INF/classes/RequestInfoExample.java   |  2 +-
 webapps/examples/WEB-INF/classes/RequestParamExample.java  |  2 +-
 webapps/examples/WEB-INF/classes/SessionExample.java   |  2 +-
 14 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/catalina/filters/CorsFilter.java 
b/java/org/apache/catalina/filters/CorsFilter.java
index 618ffb0eeb..0b76b1e83d 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -763,11 +763,11 @@ public class CorsFilter extends GenericFilter {
 }
 
 /**
- * Takes a comma separated list and returns a Set.
+ * Takes a comma separated list and returns a SetString>.
  *
  * @param data
  *A comma separated list of strings.
- * @return Set
+ * @return Set$lt;String>
  */
 private Set parseStringToSet(final String data) {
 String[] splits;
diff --git a/java/org/apache/catalina/tribes/Channel.java 
b/java/org/apache/catalina/tribes/Channel.java
index 16b426c611..f55b8dd06c 100644
--- a/java/org/apache/catalina/tribes/Channel.java
+++ b/java/org/apache/catalina/tribes/Channel.java
@@ -70,7 +70,7 @@ import org.apache.juli.logging.LogFactory;
  *   MembershipService ChannelSender ChannelReceiver   
 [IO layer]
  * 
  *
- * For example usage @see org.apache.catalina.tribes.group.GroupChannel
+ * @see org.apache.catalina.tribes.group.GroupChannel example usage
  */
 public interface Channel {
 
diff --git a/java/org/apache/jasper/compiler/JspReader.java 
b/java/org/apache/jasper/compiler/JspReader.java
index c2c86cec6c..94ff0675af 100644
--- a/java/org/apache/jasper/compiler/JspReader.java
+++ b/java/org/apache/jasper/compiler/JspReader.java
@@ -487,7 +487,7 @@ class JspReader {
  * Skip until the given end tag is matched in the stream.
  * When returned, the context is positioned past the end of the tag.
  *
- * @param tag The name of the tag whose ETag () to match.
+ * @param tag The name of the tag whose ETag (/tag>) to match.
  * @return A non-null Mark instance (positioned immediately
  *   before the ETag) if found, null 
otherwise.
  */
diff --git a/java/org/apache/jasper/compiler/Node.java 
b/java/org/apache/jasper/compiler/Node.java
index b80221d4c4..03855c2939 100644
--- a/java/org/apache/jasper/compiler/Node.java
+++ b/java/org/apache/jasper/compiler/Node.java
@@ -757,7 +757,7 @@ abstract class Node implements TagConstants {
 }
 
 /**
- * Represents a  tag file action
+ * Represents a jsp:invoke> tag file action
  */
 public static class InvokeAction extends Node {
 
@@ -779,7 +779,7 @@ abstract class Node implements TagConstants {
 }
 
 /**
- * Represents a  tag file action
+ * Represents a jsp:doBody> tag file action
  */
 public static class DoBodyAction extends Node {
 
@@ -1181,7 +1181,7 @@ abstract class Node implements TagConstants {
 }
 
 /**
- * Represents a .
+ * Represents a jsp:element>.
  */
 public static class JspElement extends Node {
 
@@ -1229,7 +1229,7 @@ abstract class Node implements TagConstants {
 }
 
 /**
- * Represents a .
+ * Represents a jsp:output>.
  */
 public static class JspOutput extends Node {
 
diff --git a/java/org/apache/jasper/compiler/Parser.java 
b/java/org/apache/jasper/compiler/Parser.java
index 3d4714daaa..444aa8736c 100644
--- a/java/org/apache/jasper/compiler/Parser.java
+++ b/java/org/apache/jasper/compiler/Parser.java
@@ -265,7 +265,7 @@ class Parser implements TagConstants {
 }
 
 /**
- * AttributeValueDouble ::= (QuotedChar - '"')* ('"' | )
+ * 

[tomcat] branch main updated: Remove SecurityManager related test that is currently failing

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 6b172aefd6 Remove SecurityManager related test that is currently 
failing
6b172aefd6 is described below

commit 6b172aefd644466bcf53b7bcd886fcb1727861ed
Author: Mark Thomas 
AuthorDate: Thu Jan 12 13:45:54 2023 +

Remove SecurityManager related test that is currently failing

The failure is due to classes that have already been removed and
eventually, the SecurityClassLoad class will be removed.
---
 .../catalina/security/TestSecurityClassLoad.java   | 27 --
 1 file changed, 27 deletions(-)

diff --git a/test/org/apache/catalina/security/TestSecurityClassLoad.java 
b/test/org/apache/catalina/security/TestSecurityClassLoad.java
deleted file mode 100644
index a318486366..00
--- a/test/org/apache/catalina/security/TestSecurityClassLoad.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.catalina.security;
-
-import org.junit.Test;
-
-public class TestSecurityClassLoad {
-
-@Test
-public void testLoad() throws Exception {
-
SecurityClassLoad.securityClassLoad(Thread.currentThread().getContextClassLoader(),
 false);
-}
-}


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



Re: CI, Java 17 and Javadoc

2023-01-12 Thread Rémy Maucherat
On Thu, Jan 12, 2023 at 1:19 PM Mark Thomas  wrote:
>
> I tried switching the CI over to use Java 17 last night. This exposed an
> unexpected Javadoc behaviour that is currently breaking the 9.0.x and
> 8.5.x builds.
>
> Ant is configured to run Javadoc with failonwarning="true"
>
> When running the Javadoc task with Java 17:
>
> - if source="11" (Tomcat 10.1.x and 11.0.x) no warnings are generated
>regarding SecurityManager use
>
> - if source="8" (Tomcat 9.0.x) warnings are generated for
>SecurityManager use
>
> - if source="7" (Tomcat 8.5.x) warnings are generated for
>SecurityManager use
>
> I don't understand why the warning generation is only generated for
> older source values. It would make more sense to me if it were only
> generated for newer values.

Yes, ok, that looks very odd ...

> Possible options:
> - only use Java 17 for 11.0.x builds
> - use failonwarning="false"

Yes please. If you remember, I sent an update earlier on Javadoc 18+.
There will now be some warnings that will make it counterproductive
for us (in particular, having to have an empty constructor on
everything just so that it can be javadoc-ed). We should keep the
setting around however to see how these things evolve, maybe it would
be improved/fixed eventually ...

Rémy

> - something else
>
> I'll switch the CI system back to Java 11 while we discuss options. I
> also plan to look at CheckStyle options for Javadoc validation to see if
> they could be an alternative approach if we use failonwarning="false"
>
> Thoughts?



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

-
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: Start to add CheckStyle validation of Javadoc

2023-01-12 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 85ecd7dddc Start to add CheckStyle validation of Javadoc
85ecd7dddc is described below

commit 85ecd7dddc1feca972dce9d4be658b9d52693926
Author: Mark Thomas 
AuthorDate: Thu Jan 12 12:40:48 2023 +

Start to add CheckStyle validation of Javadoc
---
 .../apache/catalina/authenticator/Constants.java   |  27 ++---
 .../apache/catalina/ha/session/DeltaRequest.java   |  14 ++-
 .../apache/catalina/session/StandardSession.java   |   2 +-
 .../tribes/transport/bio/BioReplicationTask.java   |   4 +-
 .../tribes/transport/nio/NioReplicationTask.java   |   4 +-
 .../apache/catalina/util/ExtensionValidator.java   |   2 +-
 java/org/apache/catalina/util/Strftime.java|   2 +-
 .../catalina/valves/AbstractAccessLogValve.java|   2 +-
 .../catalina/valves/rewrite/RewriteRule.java   |   4 +-
 java/org/apache/jasper/JspCompilationContext.java  |   6 +-
 java/org/apache/jasper/compiler/Node.java  |   7 --
 java/org/apache/jasper/compiler/SmapUtil.java  |   4 +-
 .../apache/jasper/servlet/JasperInitializer.java   |   2 +-
 .../jasper/xmlparser/XMLEncodingDetector.java  |  13 ++-
 java/org/apache/tomcat/jni/File.java   | 118 ++---
 java/org/apache/tomcat/jni/Lock.java   |  20 ++--
 java/org/apache/tomcat/jni/Poll.java   |  18 ++--
 java/org/apache/tomcat/jni/Socket.java |  47 +---
 .../tomcat/util/bcel/classfile/ClassParser.java|   7 +-
 .../apache/tomcat/util/codec/binary/Base64.java|   2 +-
 java/org/apache/tomcat/util/compat/JreVendor.java  |   2 +-
 .../tomcat/util/http/LegacyCookieProcessor.java|   2 +-
 java/org/apache/tomcat/util/http/MimeHeaders.java  |   2 +-
 .../apache/tomcat/jdbc/test/DefaultTestCase.java   |   2 +-
 res/checkstyle/checkstyle.xml  |   3 +
 .../apache/tomcat/util/net/TestXxxEndpoint.java|   4 +-
 26 files changed, 183 insertions(+), 137 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/Constants.java 
b/java/org/apache/catalina/authenticator/Constants.java
index 5a316ef341..394d132f57 100644
--- a/java/org/apache/catalina/authenticator/Constants.java
+++ b/java/org/apache/catalina/authenticator/Constants.java
@@ -65,28 +65,22 @@ public class Constants {
 
 
 /**
- * If the cache property of our authenticator is set, and
- * the current request is part of a session, authentication information
- * will be cached to avoid the need for repeated calls to
- * Realm.authenticate(), under the following keys:
- */
-
-/**
- * The notes key for the password used to authenticate this user.
+ * If the cache property of the authenticator is set, and the
+ * current request is part of a session, the password used to authenticate
+ * this user will be cached under this key to avoid the need for repeated
+ * calls to Realm.authenticate().
  */
 public static final String SESS_PASSWORD_NOTE = 
"org.apache.catalina.session.PASSWORD";
 
 /**
- * The notes key for the username used to authenticate this user.
+ * If the cache property of the authenticator is set, and the
+ * current request is part of a session, the user name used to authenticate
+ * this user will be cached under this key to avoid the need for repeated
+ * calls to Realm.authenticate().
  */
 public static final String SESS_USERNAME_NOTE = 
"org.apache.catalina.session.USERNAME";
 
 
-/**
- * The following note keys are used during form login processing to
- * cache required information prior to the completion of authentication.
- */
-
 /**
  * The previously authenticated principal (if caching is disabled).
  *
@@ -96,8 +90,9 @@ public class Constants {
 public static final String FORM_PRINCIPAL_NOTE = 
"org.apache.catalina.authenticator.PRINCIPAL";
 
 /**
- * The original request information, to which the user will be
- * redirected if authentication succeeds.
+ * The original request information, to which the user will be redirected 
if
+ * authentication succeeds, is cached in the notes under this key during 
the
+ * authentication process.
  */
 public static final String FORM_REQUEST_NOTE = 
"org.apache.catalina.authenticator.REQUEST";
 }
diff --git a/java/org/apache/catalina/ha/session/DeltaRequest.java 
b/java/org/apache/catalina/ha/session/DeltaRequest.java
index 1f5b481818..57154a8e3c 100644
--- a/java/org/apache/catalina/ha/session/DeltaRequest.java
+++ b/java/org/apache/catalina/ha/session/DeltaRequest.java
@@ -16,13 +16,6 @@
  */
 package org.apache.catalina.ha.session;
 
-/**
- * This class is used to track the series of actions that happens when
- * a request is executed. These actions will 

[tomcat] branch 9.0.x updated: Start to add CheckStyle validation of Javadoc

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 1b48bc6d94 Start to add CheckStyle validation of Javadoc
1b48bc6d94 is described below

commit 1b48bc6d946e11afcf992342a43a73465f519d72
Author: Mark Thomas 
AuthorDate: Thu Jan 12 12:40:48 2023 +

Start to add CheckStyle validation of Javadoc
---
 .../apache/catalina/authenticator/Constants.java   |  27 ++---
 .../apache/catalina/ha/session/DeltaRequest.java   |  14 ++-
 .../apache/catalina/session/StandardSession.java   |   2 +-
 .../tribes/transport/bio/BioReplicationTask.java   |   4 +-
 .../tribes/transport/nio/NioReplicationTask.java   |   4 +-
 .../apache/catalina/util/ExtensionValidator.java   |   2 +-
 java/org/apache/catalina/util/Strftime.java|   2 +-
 .../catalina/valves/AbstractAccessLogValve.java|   2 +-
 .../catalina/valves/rewrite/RewriteRule.java   |   4 +-
 java/org/apache/jasper/JspCompilationContext.java  |   6 +-
 java/org/apache/jasper/compiler/Node.java  |   7 --
 .../apache/jasper/servlet/JasperInitializer.java   |   2 +-
 java/org/apache/tomcat/jni/File.java   | 118 ++---
 java/org/apache/tomcat/jni/Lock.java   |  20 ++--
 java/org/apache/tomcat/jni/Poll.java   |  18 ++--
 java/org/apache/tomcat/jni/Socket.java |  47 +---
 .../tomcat/util/bcel/classfile/ClassParser.java|   7 +-
 .../apache/tomcat/util/codec/binary/Base64.java|   2 +-
 java/org/apache/tomcat/util/compat/JreVendor.java  |   2 +-
 .../tomcat/util/http/LegacyCookieProcessor.java|   2 +-
 java/org/apache/tomcat/util/http/MimeHeaders.java  |   2 +-
 .../apache/tomcat/jdbc/test/DefaultTestCase.java   |   2 +-
 res/checkstyle/checkstyle.xml  |   3 +
 .../apache/tomcat/util/net/TestXxxEndpoint.java|   4 +-
 24 files changed, 175 insertions(+), 128 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/Constants.java 
b/java/org/apache/catalina/authenticator/Constants.java
index d7482297d5..3b649f8ebf 100644
--- a/java/org/apache/catalina/authenticator/Constants.java
+++ b/java/org/apache/catalina/authenticator/Constants.java
@@ -60,28 +60,22 @@ public class Constants {
 
 
 /**
- * If the cache property of our authenticator is set, and
- * the current request is part of a session, authentication information
- * will be cached to avoid the need for repeated calls to
- * Realm.authenticate(), under the following keys:
- */
-
-/**
- * The notes key for the password used to authenticate this user.
+ * If the cache property of the authenticator is set, and the
+ * current request is part of a session, the password used to authenticate
+ * this user will be cached under this key to avoid the need for repeated
+ * calls to Realm.authenticate().
  */
 public static final String SESS_PASSWORD_NOTE = 
"org.apache.catalina.session.PASSWORD";
 
 /**
- * The notes key for the username used to authenticate this user.
+ * If the cache property of the authenticator is set, and the
+ * current request is part of a session, the user name used to authenticate
+ * this user will be cached under this key to avoid the need for repeated
+ * calls to Realm.authenticate().
  */
 public static final String SESS_USERNAME_NOTE = 
"org.apache.catalina.session.USERNAME";
 
 
-/**
- * The following note keys are used during form login processing to
- * cache required information prior to the completion of authentication.
- */
-
 /**
  * The previously authenticated principal (if caching is disabled).
  *
@@ -91,8 +85,9 @@ public class Constants {
 public static final String FORM_PRINCIPAL_NOTE = 
"org.apache.catalina.authenticator.PRINCIPAL";
 
 /**
- * The original request information, to which the user will be
- * redirected if authentication succeeds.
+ * The original request information, to which the user will be redirected 
if
+ * authentication succeeds, is cached in the notes under this key during 
the
+ * authentication process.
  */
 public static final String FORM_REQUEST_NOTE = 
"org.apache.catalina.authenticator.REQUEST";
 }
diff --git a/java/org/apache/catalina/ha/session/DeltaRequest.java 
b/java/org/apache/catalina/ha/session/DeltaRequest.java
index 1f5b481818..57154a8e3c 100644
--- a/java/org/apache/catalina/ha/session/DeltaRequest.java
+++ b/java/org/apache/catalina/ha/session/DeltaRequest.java
@@ -16,13 +16,6 @@
  */
 package org.apache.catalina.ha.session;
 
-/**
- * This class is used to track the series of actions that happens when
- * a request is executed. These actions will then translate into invocations 
of methods
- * on the actual session.
- * This class is NOT thread safe. One DeltaRequest 

[tomcat] branch main updated: Start to add CheckStyle validation of Javadoc

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 36ea09c7fc Start to add CheckStyle validation of Javadoc
36ea09c7fc is described below

commit 36ea09c7fc1912239bd7e61115b5020d9dda9977
Author: Mark Thomas 
AuthorDate: Thu Jan 12 12:40:48 2023 +

Start to add CheckStyle validation of Javadoc
---
 .../apache/catalina/authenticator/Constants.java   | 27 +-
 .../apache/catalina/ha/session/DeltaRequest.java   | 14 +--
 .../apache/catalina/session/StandardSession.java   |  2 +-
 .../tribes/transport/nio/NioReplicationTask.java   |  4 ++--
 java/org/apache/catalina/util/Strftime.java|  2 +-
 .../catalina/valves/rewrite/RewriteRule.java   |  4 ++--
 java/org/apache/jasper/JspCompilationContext.java  |  6 ++---
 java/org/apache/jasper/compiler/Node.java  |  7 --
 .../apache/jasper/servlet/JasperInitializer.java   |  2 +-
 .../tomcat/util/bcel/classfile/ClassParser.java|  7 +++---
 .../apache/tomcat/util/codec/binary/Base64.java|  2 +-
 java/org/apache/tomcat/util/compat/JreVendor.java  |  2 +-
 java/org/apache/tomcat/util/http/MimeHeaders.java  |  2 +-
 .../apache/tomcat/jdbc/test/DefaultTestCase.java   |  2 +-
 res/checkstyle/checkstyle.xml  |  3 +++
 15 files changed, 37 insertions(+), 49 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/Constants.java 
b/java/org/apache/catalina/authenticator/Constants.java
index 1bb5809d79..bb59fd93f7 100644
--- a/java/org/apache/catalina/authenticator/Constants.java
+++ b/java/org/apache/catalina/authenticator/Constants.java
@@ -58,31 +58,26 @@ public class Constants {
 
 
 /**
- * If the cache property of our authenticator is set, and
- * the current request is part of a session, authentication information
- * will be cached to avoid the need for repeated calls to
- * Realm.authenticate(), under the following keys:
- */
-
-/**
- * The notes key for the password used to authenticate this user.
+ * If the cache property of the authenticator is set, and the
+ * current request is part of a session, the password used to authenticate
+ * this user will be cached under this key to avoid the need for repeated
+ * calls to Realm.authenticate().
  */
 public static final String SESS_PASSWORD_NOTE = 
"org.apache.catalina.session.PASSWORD";
 
 /**
- * The notes key for the username used to authenticate this user.
+ * If the cache property of the authenticator is set, and the
+ * current request is part of a session, the user name used to authenticate
+ * this user will be cached under this key to avoid the need for repeated
+ * calls to Realm.authenticate().
  */
 public static final String SESS_USERNAME_NOTE = 
"org.apache.catalina.session.USERNAME";
 
 
 /**
- * The following note keys are used during form login processing to
- * cache required information prior to the completion of authentication.
- */
-
-/**
- * The original request information, to which the user will be
- * redirected if authentication succeeds.
+ * The original request information, to which the user will be redirected 
if
+ * authentication succeeds, is cached in the notes under this key during 
the
+ * authentication process.
  */
 public static final String FORM_REQUEST_NOTE = 
"org.apache.catalina.authenticator.REQUEST";
 }
diff --git a/java/org/apache/catalina/ha/session/DeltaRequest.java 
b/java/org/apache/catalina/ha/session/DeltaRequest.java
index 1f5b481818..57154a8e3c 100644
--- a/java/org/apache/catalina/ha/session/DeltaRequest.java
+++ b/java/org/apache/catalina/ha/session/DeltaRequest.java
@@ -16,13 +16,6 @@
  */
 package org.apache.catalina.ha.session;
 
-/**
- * This class is used to track the series of actions that happens when
- * a request is executed. These actions will then translate into invocations 
of methods
- * on the actual session.
- * This class is NOT thread safe. One DeltaRequest per session
- */
-
 import java.io.ByteArrayOutputStream;
 import java.io.Externalizable;
 import java.io.IOException;
@@ -37,7 +30,12 @@ import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
 
-
+/**
+ * This class is used to track the series of actions that happens when
+ * a request is executed. These actions will then translate into invocations 
of methods
+ * on the actual session.
+ * This class is NOT thread safe. One DeltaRequest per session
+ */
 public class DeltaRequest implements Externalizable {
 
 public static final Log log = LogFactory.getLog(DeltaRequest.class);
diff --git a/java/org/apache/catalina/session/StandardSession.java 
b/java/org/apache/catalina/session/StandardSession.java

[tomcat] branch 10.1.x updated: Start to add CheckStyle validation of Javadoc

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 815f264e19 Start to add CheckStyle validation of Javadoc
815f264e19 is described below

commit 815f264e19bb1c457d7dd07d56abbbc99fc19050
Author: Mark Thomas 
AuthorDate: Thu Jan 12 12:40:48 2023 +

Start to add CheckStyle validation of Javadoc
---
 .../apache/catalina/authenticator/Constants.java   | 27 +-
 .../apache/catalina/ha/session/DeltaRequest.java   | 14 +--
 .../apache/catalina/session/StandardSession.java   |  2 +-
 .../tribes/transport/nio/NioReplicationTask.java   |  4 ++--
 java/org/apache/catalina/util/Strftime.java|  2 +-
 .../catalina/valves/rewrite/RewriteRule.java   |  4 ++--
 java/org/apache/jasper/JspCompilationContext.java  |  6 ++---
 java/org/apache/jasper/compiler/Node.java  |  7 --
 .../apache/jasper/servlet/JasperInitializer.java   |  2 +-
 .../tomcat/util/bcel/classfile/ClassParser.java|  7 +++---
 .../apache/tomcat/util/codec/binary/Base64.java|  2 +-
 java/org/apache/tomcat/util/compat/JreVendor.java  |  2 +-
 java/org/apache/tomcat/util/http/MimeHeaders.java  |  2 +-
 .../apache/tomcat/jdbc/test/DefaultTestCase.java   |  2 +-
 res/checkstyle/checkstyle.xml  |  3 +++
 15 files changed, 37 insertions(+), 49 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/Constants.java 
b/java/org/apache/catalina/authenticator/Constants.java
index 1bb5809d79..bb59fd93f7 100644
--- a/java/org/apache/catalina/authenticator/Constants.java
+++ b/java/org/apache/catalina/authenticator/Constants.java
@@ -58,31 +58,26 @@ public class Constants {
 
 
 /**
- * If the cache property of our authenticator is set, and
- * the current request is part of a session, authentication information
- * will be cached to avoid the need for repeated calls to
- * Realm.authenticate(), under the following keys:
- */
-
-/**
- * The notes key for the password used to authenticate this user.
+ * If the cache property of the authenticator is set, and the
+ * current request is part of a session, the password used to authenticate
+ * this user will be cached under this key to avoid the need for repeated
+ * calls to Realm.authenticate().
  */
 public static final String SESS_PASSWORD_NOTE = 
"org.apache.catalina.session.PASSWORD";
 
 /**
- * The notes key for the username used to authenticate this user.
+ * If the cache property of the authenticator is set, and the
+ * current request is part of a session, the user name used to authenticate
+ * this user will be cached under this key to avoid the need for repeated
+ * calls to Realm.authenticate().
  */
 public static final String SESS_USERNAME_NOTE = 
"org.apache.catalina.session.USERNAME";
 
 
 /**
- * The following note keys are used during form login processing to
- * cache required information prior to the completion of authentication.
- */
-
-/**
- * The original request information, to which the user will be
- * redirected if authentication succeeds.
+ * The original request information, to which the user will be redirected 
if
+ * authentication succeeds, is cached in the notes under this key during 
the
+ * authentication process.
  */
 public static final String FORM_REQUEST_NOTE = 
"org.apache.catalina.authenticator.REQUEST";
 }
diff --git a/java/org/apache/catalina/ha/session/DeltaRequest.java 
b/java/org/apache/catalina/ha/session/DeltaRequest.java
index 1f5b481818..57154a8e3c 100644
--- a/java/org/apache/catalina/ha/session/DeltaRequest.java
+++ b/java/org/apache/catalina/ha/session/DeltaRequest.java
@@ -16,13 +16,6 @@
  */
 package org.apache.catalina.ha.session;
 
-/**
- * This class is used to track the series of actions that happens when
- * a request is executed. These actions will then translate into invocations 
of methods
- * on the actual session.
- * This class is NOT thread safe. One DeltaRequest per session
- */
-
 import java.io.ByteArrayOutputStream;
 import java.io.Externalizable;
 import java.io.IOException;
@@ -37,7 +30,12 @@ import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
 
-
+/**
+ * This class is used to track the series of actions that happens when
+ * a request is executed. These actions will then translate into invocations 
of methods
+ * on the actual session.
+ * This class is NOT thread safe. One DeltaRequest per session
+ */
 public class DeltaRequest implements Externalizable {
 
 public static final Log log = LogFactory.getLog(DeltaRequest.class);
diff --git a/java/org/apache/catalina/session/StandardSession.java 

CI, Java 17 and Javadoc

2023-01-12 Thread Mark Thomas
I tried switching the CI over to use Java 17 last night. This exposed an 
unexpected Javadoc behaviour that is currently breaking the 9.0.x and 
8.5.x builds.


Ant is configured to run Javadoc with failonwarning="true"

When running the Javadoc task with Java 17:

- if source="11" (Tomcat 10.1.x and 11.0.x) no warnings are generated
  regarding SecurityManager use

- if source="8" (Tomcat 9.0.x) warnings are generated for
  SecurityManager use

- if source="7" (Tomcat 8.5.x) warnings are generated for
  SecurityManager use

I don't understand why the warning generation is only generated for 
older source values. It would make more sense to me if it were only 
generated for newer values.


Possible options:
- only use Java 17 for 11.0.x builds
- use failonwarning="false"
- something else

I'll switch the CI system back to Java 11 while we discuss options. I 
also plan to look at CheckStyle options for Javadoc validation to see if 
they could be an alternative approach if we use failonwarning="false"


Thoughts?

Mark

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



[Bug 66420] Change in Tomcat 9.0.69 has caused regression issue with httpClient 4.5.13

2023-01-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66420

--- Comment #4 from Pratik Kadhi  ---
Ok thanks for your inputs. Will raise issue with httpclient.

-- 
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



[Bug 66420] Change in Tomcat 9.0.69 has caused regression issue with httpClient 4.5.13

2023-01-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66420

--- Comment #3 from Mark Thomas  ---
No, the issue is that httpClient is not compliant with RFC 6265. If httpClient
was compatible with RFC 6265 it would have worked with both the old, broken
Tomcat behaviour and the current, correct behaviour.

-- 
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 main updated: Remove SecurityManager and related API references in the core package

2023-01-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 2f09af1291 Remove SecurityManager and related API references in the 
core package
2f09af1291 is described below

commit 2f09af12913e0c1a2369b5d6579730eae443a471
Author: Mark Thomas 
AuthorDate: Thu Jan 12 11:46:30 2023 +

Remove SecurityManager and related API references in the core package
---
 .../apache/catalina/core/ApplicationContext.java   |  18 +--
 .../catalina/core/ApplicationContextFacade.java|  48 +---
 .../catalina/core/ApplicationDispatcher.java   | 126 +
 .../catalina/core/ApplicationFilterChain.java  |  86 +-
 java/org/apache/catalina/core/ContainerBase.java   |  37 --
 .../catalina/core/DefaultInstanceManager.java  | 112 ++
 .../apache/catalina/core/LocalStrings.properties   |   1 -
 .../catalina/core/LocalStrings_fr.properties   |   1 -
 .../catalina/core/LocalStrings_ja.properties   |   1 -
 .../catalina/core/LocalStrings_ko.properties   |   1 -
 .../catalina/core/LocalStrings_zh_CN.properties|   1 -
 java/org/apache/catalina/core/StandardContext.java |  25 +---
 java/org/apache/catalina/core/StandardServer.java  |   4 -
 13 files changed, 22 insertions(+), 439 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationContext.java 
b/java/org/apache/catalina/core/ApplicationContext.java
index 5cd5ad23a1..e43d7c6343 100644
--- a/java/org/apache/catalina/core/ApplicationContext.java
+++ b/java/org/apache/catalina/core/ApplicationContext.java
@@ -1172,23 +1172,7 @@ public class ApplicationContext implements 
ServletContext {
 
 @Override
 public ClassLoader getClassLoader() {
-ClassLoader result = context.getLoader().getClassLoader();
-if (Globals.IS_SECURITY_ENABLED) {
-ClassLoader tccl = Thread.currentThread().getContextClassLoader();
-ClassLoader parent = result;
-while (parent != null) {
-if (parent == tccl) {
-break;
-}
-parent = parent.getParent();
-}
-if (parent == null) {
-System.getSecurityManager().checkPermission(
-new RuntimePermission("getClassLoader"));
-}
-}
-
-return result;
+return context.getLoader().getClassLoader();
 }
 
 
diff --git a/java/org/apache/catalina/core/ApplicationContextFacade.java 
b/java/org/apache/catalina/core/ApplicationContextFacade.java
index f61be51cb1..9f26890677 100644
--- a/java/org/apache/catalina/core/ApplicationContextFacade.java
+++ b/java/org/apache/catalina/core/ApplicationContextFacade.java
@@ -22,9 +22,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.security.AccessController;
 import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
 import java.util.Enumeration;
 import java.util.EventListener;
 import java.util.HashMap;
@@ -811,7 +809,7 @@ public class ApplicationContextFacade implements 
ServletContext {
 objectCache.put(methodName, method);
 }
 
-return executeMethod(method,appContext,params);
+return method.invoke(context, params);
 } catch (Exception ex){
 handleException(ex);
 return null;
@@ -833,7 +831,7 @@ public class ApplicationContextFacade implements 
ServletContext {
 
 try{
 Method method = context.getClass().getMethod(methodName, clazz);
-return executeMethod(method,context,params);
+return method.invoke(context, params);
 } catch (Exception ex){
 try {
 handleException(ex);
@@ -848,29 +846,6 @@ public class ApplicationContextFacade implements 
ServletContext {
 }
 
 
-/**
- * Executes the method of the specified ApplicationContext
- * @param method The method object to be invoked.
- * @param context The ApplicationContext object on which the method
- *   will be invoked
- * @param params The arguments passed to the called method.
- */
-private Object executeMethod(final Method method,
- final ApplicationContext context,
- final Object[] params)
-throws PrivilegedActionException,
-   IllegalAccessException,
-   InvocationTargetException {
-
-if (SecurityUtil.isPackageProtectionEnabled()){
-   return AccessController.doPrivileged(
-   new PrivilegedExecuteMethod(method, context,  params));
-} else {
-return 

[Bug 66420] Change in Tomcat 9.0.69 has caused regression issue with httpClient 4.5.13

2023-01-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66420

--- Comment #2 from Pratik Kadhi  ---
Issue is the change that has been done in coyote is not backward compatible.

-- 
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



[Bug 66420] Change in Tomcat 9.0.69 has caused regression issue with httpClient 4.5.13

2023-01-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66420

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Mark Thomas  ---
You need to raise a bug in httpClient

-- 
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



[Bug 66420] Change in Tomcat 9.0.69 has caused regression issue with httpClient 4.5.13

2023-01-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66420

Pratik Kadhi  changed:

   What|Removed |Added

 OS||All
 CC||pratikkumar.kadhi@sailpoint
   ||.com

-- 
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



  1   2   >