Buildbot success in on tomcat-11.0.x

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


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-10.1.x

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


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



RE: [VOTE][RESULT] Release Apache Tomcat 10.1.5

2023-01-23 Thread jonmcalexander
Thank you!

Dream * Excel * Explore * Inspire
Jon McAlexander
Senior Infrastructure Engineer
Asst. Vice President
He/His

Middleware Product Engineering
Enterprise CIO | EAS | Middleware | Infrastructure Solutions

8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508

jonmcalexan...@wellsfargo.com
This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.


> -Original Message-
> From: Mark Thomas 
> Sent: Monday, January 23, 2023 2:41 PM
> To: dev@tomcat.apache.org
> Subject: Re: [VOTE][RESULT] Release Apache Tomcat 10.1.5
> 
> On 23/01/2023 17:44, jonmcalexan...@wellsfargo.com.INVALID wrote:
> > Has this actually been released?
> 
> Yes. Looks like I forgot to send out the announcement. I'll do that now.
> 
> Mark
> 
> 
> >
> > Dream * Excel * Explore * Inspire
> > Jon McAlexander
> > Senior Infrastructure Engineer
> > Asst. Vice President
> > He/His
> >
> > Middleware Product Engineering
> > Enterprise CIO | EAS | Middleware | Infrastructure Solutions
> >
> > 8080 Cobblestone Rd | Urbandale, IA 50322
> > MAC: F4469-010
> > Tel 515-988-2508 | Cell 515-988-2508
> >
> > jonmcalexan...@wellsfargo.com
> > This message may contain confidential and/or privileged information. If you
> are not the addressee or authorized to receive this for the addressee, you
> must not use, copy, disclose, or take any action based on this message or any
> information herein. If you have received this message in error, please advise
> the sender immediately by reply e-mail and delete this message. Thank you
> for your cooperation.
> >
> >> -Original Message-
> >> From: Mark Thomas 
> >> Sent: Friday, January 13, 2023 7:48 AM
> >> To: dev@tomcat.apache.org
> >> Subject: [VOTE][RESULT] Release Apache Tomcat 10.1.5
> >>
> >> The following votes were cast:
> >>
> >> Binding:
> >> +1: markt, remm, jfclere
> >> +0: schultz
> >>
> >> Non-binding:
> >> +1: lihan
> >>
> >> The vote therefore passes. Thanks to everyone who contributed to this
> >> release.
> >>
> >> 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



[ANN] Apache Tomcat 10.1.5 available

2023-01-23 Thread Mark Thomas

The Apache Tomcat team announces the immediate availability of Apache
Tomcat 10.1.5.

Apache Tomcat 10 is an open source software implementation of the
Jakarta Servlet, Jakarta Server Pages, Jakarta Expression Language,
Jakarta WebSocket, Jakarta Authentication and Jakarta Annotations
specifications.

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. This conversion is performed using the Apache Tomcat 
migration tool for Jakarta EE tool which is also available as a separate 
download for off-line use.


The notable changes compared to 10.1.4 include:

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

Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/tomcat-10.1-doc/changelog.html

Downloads:
http://tomcat.apache.org/download-10.cgi

Migration guides from Apache Tomcat 8.5.x and 9.0.x:
http://tomcat.apache.org/migration.html

Enjoy!

- The Apache Tomcat team

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



Re: [VOTE][RESULT] Release Apache Tomcat 10.1.5

2023-01-23 Thread Mark Thomas

On 23/01/2023 17:44, jonmcalexan...@wellsfargo.com.INVALID wrote:

Has this actually been released?


Yes. Looks like I forgot to send out the announcement. I'll do that now.

Mark




Dream * Excel * Explore * Inspire
Jon McAlexander
Senior Infrastructure Engineer
Asst. Vice President
He/His

Middleware Product Engineering
Enterprise CIO | EAS | Middleware | Infrastructure Solutions

8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508

jonmcalexan...@wellsfargo.com
This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.


-Original Message-
From: Mark Thomas 
Sent: Friday, January 13, 2023 7:48 AM
To: dev@tomcat.apache.org
Subject: [VOTE][RESULT] Release Apache Tomcat 10.1.5

The following votes were cast:

Binding:
+1: markt, remm, jfclere
+0: schultz

Non-binding:
+1: lihan

The vote therefore passes. Thanks to everyone who contributed to this
release.

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



[Bug 66419] Function with varargs argument fails for single argument

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

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #2 from Mark Thomas  ---
Thanks for the report.

Fixed in:
- 11.0.x for 11.0.0-M3 onwards
- 10.1.x for 10.1.6 onwards
-  9.0.x for  9.0.72 onwards
-  8.5.x for  8.5.86 onwards

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

2023-01-23 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 4c70a12e8a Remove deprecated code
4c70a12e8a is described below

commit 4c70a12e8aac4081a11f200a7e70f0db30a6c79b
Author: Mark Thomas 
AuthorDate: Mon Jan 23 20:39:14 2023 +

Remove deprecated code
---
 .../catalina/loader/WebappClassLoaderBase.java |   4 -
 .../TomcatURLStreamHandlerFactory.java | 169 -
 .../TomcatURLStreamHandlerProvider.java|  11 +-
 .../TestTomcatURLStreamHandlerFactory.java |  41 -
 4 files changed, 2 insertions(+), 223 deletions(-)

diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java 
b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index d8edd4..c334e1bf19 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -1492,7 +1492,6 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 /**
  * Clear references.
  */
-@SuppressWarnings("deprecation")
 protected void clearReferences() {
 
 // If the JVM is shutting down, skip the memory leak checks
@@ -1543,9 +1542,6 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 
 // Clear the classloader reference in the VM's bean introspector
 java.beans.Introspector.flushCaches();
-
-// Clear any custom URLStreamHandlers
-
org.apache.catalina.webresources.TomcatURLStreamHandlerFactory.release(this);
 }
 
 
diff --git 
a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java 
b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
deleted file mode 100644
index 830858e774..00
--- a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
+++ /dev/null
@@ -1,169 +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.webresources;
-
-import java.net.URL;
-import java.net.URLStreamHandler;
-import java.net.URLStreamHandlerFactory;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-/**
- * @deprecated Unused. Use the ServiceLoader mechanism to define additional
- * handlers. Will be removed in Tomcat 11 onwards.
- */
-@Deprecated
-public class TomcatURLStreamHandlerFactory implements URLStreamHandlerFactory {
-
-// Singleton instance
-private static volatile TomcatURLStreamHandlerFactory instance = null;
-
-/**
- * Obtain a reference to the singleton instance. It is recommended that
- * callers check the value of {@link #isRegistered()} before using the
- * returned instance.
- *
- * @return A reference to the singleton instance
- */
-public static TomcatURLStreamHandlerFactory getInstance() {
-getInstanceInternal(true);
-return instance;
-}
-
-
-private static TomcatURLStreamHandlerFactory getInstanceInternal(boolean 
register) {
-// Double checked locking. OK because instance is volatile.
-if (instance == null) {
-synchronized (TomcatURLStreamHandlerFactory.class) {
-if (instance == null) {
-instance = new TomcatURLStreamHandlerFactory(register);
-}
-}
-}
-return instance;
-}
-
-
-private final boolean registered;
-
-// List of factories for application defined stream handler factories.
-private final List userFactories =
-new CopyOnWriteArrayList<>();
-
-/**
- * Register this factory with the JVM. May be called more than once. The
- * implementation ensures that registration only occurs once.
- *
- * @return true if the factory is already registered with the
- * JVM or was successfully registered as a result of this call.
- * false if the factory was disabled prior to this
- * call.
- */
-public static boolean register() {
-return getInstanceInternal(true).isRegistered();
-  

[tomcat] 03/03: Skip additional JARs (mostly ones used in Tomcat tests)

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

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

commit 267f006160397b25cbeda599fba5af7c09e028fd
Author: Mark Thomas 
AuthorDate: Mon Jan 23 17:07:37 2023 +

Skip additional JARs (mostly ones used in Tomcat tests)

This speeds up test runs
---
 conf/catalina.properties | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/conf/catalina.properties b/conf/catalina.properties
index 7a7184551e..c64d60ec67 100644
--- a/conf/catalina.properties
+++ b/conf/catalina.properties
@@ -108,10 +108,12 @@ shared.loader=
 tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
 annotations-api.jar,\
 ant-junit*.jar,\
-ant-launcher.jar,\
-ant.jar,\
+ant-launcher*.jar,\
+ant*.jar,\
 asm-*.jar,\
 aspectj*.jar,\
+bcel*.jar,\
+biz.aQute.bnd*.jar,\
 bootstrap.jar,\
 catalina-ant.jar,\
 catalina-ha.jar,\
@@ -125,6 +127,7 @@ cobertura-*.jar,\
 commons-beanutils*.jar,\
 commons-codec*.jar,\
 commons-collections*.jar,\
+commons-compress*.jar,\
 commons-daemon.jar,\
 commons-dbcp*.jar,\
 commons-digester*.jar,\
@@ -166,6 +169,8 @@ log4j*.jar,\
 mail*.jar,\
 objenesis-*.jar,\
 oraclepki.jar,\
+org.hamcrest.core_*.jar,\
+org.junit_*.jar,\
 oro-*.jar,\
 servlet-api-*.jar,\
 servlet-api.jar,\
@@ -184,6 +189,7 @@ tomcat-util-scan.jar,\
 tomcat-util.jar,\
 tomcat-websocket.jar,\
 tools.jar,\
+unboundid-ldapsdk-*.jar,\
 websocket-api.jar,\
 wsdl4j*.jar,\
 xercesImpl.jar,\


-
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 (4f84a8d2fc -> 267f006160)

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

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


from 4f84a8d2fc Fix typo in changelog.
 new 645f1099aa Re-format. No functional change.
 new ef2b7b8d64 Fix BZ 66419 - handle varargs call with single argument
 new 267f006160 Skip additional JARs (mostly ones used in Tomcat tests)

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


Summary of changes:
 conf/catalina.properties   | 10 +++-
 java/org/apache/el/parser/AstFunction.java | 64 --
 test/org/apache/el/parser/TestAstFunction.java | 25 +-
 webapps/docs/changelog.xml |  8 
 4 files changed, 68 insertions(+), 39 deletions(-)


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



[tomcat] 02/03: Fix BZ 66419 - handle varargs call with single argument

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

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

commit ef2b7b8d64a8b3b1a51dbf95106953ad12633ecf
Author: Mark Thomas 
AuthorDate: Mon Jan 23 19:54:46 2023 +

Fix BZ 66419 - handle varargs call with single argument
---
 java/org/apache/el/parser/AstFunction.java | 11 ++-
 test/org/apache/el/parser/TestAstFunction.java | 22 ++
 webapps/docs/changelog.xml |  8 
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/el/parser/AstFunction.java 
b/java/org/apache/el/parser/AstFunction.java
index 833468e9d5..1e6eeacc34 100644
--- a/java/org/apache/el/parser/AstFunction.java
+++ b/java/org/apache/el/parser/AstFunction.java
@@ -162,7 +162,7 @@ public final class AstFunction extends SimpleNode {
 if (m.isVarArgs() && i == methodParameterCount - 1) {
 if (inputParameterCount < methodParameterCount) {
 params[i] = new Object[] { null };
-} else if (inputParameterCount == methodParameterCount 
&& paramTypes[i].isArray()) {
+} else if (inputParameterCount == methodParameterCount 
&& isArray(parameters.jjtGetChild(i).getValue(ctx))) {
 params[i] = 
parameters.jjtGetChild(i).getValue(ctx);
 } else {
 Object[] varargs = new Object[inputParameterCount 
- methodParameterCount + 1];
@@ -199,6 +199,15 @@ public final class AstFunction extends SimpleNode {
 return result;
 }
 
+
+private boolean isArray(Object obj) {
+if (obj == null) {
+return false;
+}
+return obj.getClass().isArray();
+}
+
+
 public void setLocalName(String localName) {
 this.localName = localName;
 }
diff --git a/test/org/apache/el/parser/TestAstFunction.java 
b/test/org/apache/el/parser/TestAstFunction.java
index 70a2a22f61..138ecade40 100644
--- a/test/org/apache/el/parser/TestAstFunction.java
+++ b/test/org/apache/el/parser/TestAstFunction.java
@@ -16,7 +16,10 @@
  */
 package org.apache.el.parser;
 
+import javax.el.ELContext;
 import javax.el.ELProcessor;
+import javax.el.ExpressionFactory;
+import javax.el.StandardELContext;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -37,4 +40,23 @@ public class TestAstFunction {
 Object result = processor.getValue("valueOf(1000)", Integer.class);
 Assert.assertEquals(Integer.valueOf(1000), result);
 }
+
+@Test
+public void testVarargMethod() throws NoSuchMethodException, 
SecurityException {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+ELContext context = new StandardELContext(factory);
+context.getFunctionMapper().mapFunction("fn", "format",
+String.class.getMethod("format", String.class, 
Object[].class));
+
+//Object result = factory.createValueExpression(context, 
"${fn:format('%s-%s','one','two')}", String.class)
+//.getValue(context);
+//Assert.assertEquals("one-two", result);
+
+Object result = factory.createValueExpression(context, 
"${fn:format('%s-%s','one,two'.split(','))}", String.class)
+.getValue(context);
+Assert.assertEquals("one-two", result);
+
+result = factory.createValueExpression(context, 
"${fn:format('%s','one')}", String.class).getValue(context);
+Assert.assertEquals("one", result);
+}
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 06ce5b368f..5bcc002b2a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -121,6 +121,14 @@
   
 
   
+  
+
+  
+66419: Fix calls from expression language to a method that
+accepts varargs when only one argument was passed. (markt)
+  
+
+  
 
 
   


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



[tomcat] 01/03: Re-format. No functional change.

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

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

commit 645f1099aa073211f934325431e8bdff23e6e705
Author: Mark Thomas 
AuthorDate: Fri Jan 20 20:13:18 2023 +

Re-format. No functional change.
---
 java/org/apache/el/parser/AstFunction.java | 55 ++
 test/org/apache/el/parser/TestAstFunction.java |  3 +-
 2 files changed, 21 insertions(+), 37 deletions(-)

diff --git a/java/org/apache/el/parser/AstFunction.java 
b/java/org/apache/el/parser/AstFunction.java
index e054349220..833468e9d5 100644
--- a/java/org/apache/el/parser/AstFunction.java
+++ b/java/org/apache/el/parser/AstFunction.java
@@ -61,8 +61,7 @@ public final class AstFunction extends SimpleNode {
 }
 
 @Override
-public Class getType(EvaluationContext ctx)
-throws ELException {
+public Class getType(EvaluationContext ctx) throws ELException {
 
 FunctionMapper fnMapper = ctx.getFunctionMapper();
 
@@ -72,15 +71,13 @@ public final class AstFunction extends SimpleNode {
 }
 Method m = fnMapper.resolveFunction(this.prefix, this.localName);
 if (m == null) {
-throw new ELException(MessageFactory.get("error.fnMapper.method",
-this.getOutputName()));
+throw new ELException(MessageFactory.get("error.fnMapper.method", 
this.getOutputName()));
 }
 return m.getReturnType();
 }
 
 @Override
-public Object getValue(EvaluationContext ctx)
-throws ELException {
+public Object getValue(EvaluationContext ctx) throws ELException {
 
 FunctionMapper fnMapper = ctx.getFunctionMapper();
 
@@ -92,8 +89,8 @@ public final class AstFunction extends SimpleNode {
 
 if (m == null && this.prefix.length() == 0) {
 // TODO: Do we need to think about precedence of the various ways
-//   a lambda expression may be obtained from something that
-//   the parser thinks is a function?
+// a lambda expression may be obtained from something that
+// the parser thinks is a function?
 Object obj = null;
 if (ctx.isLambdaArgument(this.localName)) {
 obj = ctx.getLambdaArgument(this.localName);
@@ -114,18 +111,15 @@ public final class AstFunction extends SimpleNode {
 if (obj instanceof LambdaExpression) {
 // Build arguments
 int i = 0;
-while (obj instanceof LambdaExpression &&
-i < jjtGetNumChildren()) {
+while (obj instanceof LambdaExpression && i < 
jjtGetNumChildren()) {
 Node args = jjtGetChild(i);
-obj = ((LambdaExpression) obj).invoke(
-((AstMethodParameters) args).getParameters(ctx));
+obj = ((LambdaExpression) 
obj).invoke(((AstMethodParameters) args).getParameters(ctx));
 i++;
 }
 if (i < jjtGetNumChildren()) {
 // Haven't consumed all the sets of parameters therefore
 // there were too many sets of parameters
-throw new ELException(MessageFactory.get(
-"error.lambda.tooManyMethodParameterSets"));
+throw new 
ELException(MessageFactory.get("error.lambda.tooManyMethodParameterSets"));
 }
 return obj;
 }
@@ -138,22 +132,19 @@ public final class AstFunction extends SimpleNode {
 }
 obj = ctx.getImportHandler().resolveStatic(this.localName);
 if (obj != null) {
-return ctx.getELResolver().invoke(ctx, new ELClass((Class) 
obj), this.localName,
-null, ((AstMethodParameters) 
this.children[0]).getParameters(ctx));
+return ctx.getELResolver().invoke(ctx, new ELClass((Class) 
obj), this.localName, null,
+((AstMethodParameters) 
this.children[0]).getParameters(ctx));
 }
 }
 
 if (m == null) {
-throw new ELException(MessageFactory.get("error.fnMapper.method",
-this.getOutputName()));
+throw new ELException(MessageFactory.get("error.fnMapper.method", 
this.getOutputName()));
 }
 
 // Not a lambda expression so must be a function. Check there is just a
 // single set of method parameters
 if (this.jjtGetNumChildren() != 1) {
-throw new ELException(MessageFactory.get(
-"error.function.tooManyMethodParameterSets",
-getOutputName()));
+throw new 
ELException(MessageFactory.get("error.function.tooManyMethodParameterSets", 
getOutputName()));
 }
 
 Node parameters = jjtGetChild(0);
@@ -171,16 

[tomcat] 02/03: Fix BZ 66419 - handle varargs call with single argument

2023-01-23 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 b6f1bef80061e6b851a894f2f1372f98e6484578
Author: Mark Thomas 
AuthorDate: Mon Jan 23 19:54:46 2023 +

Fix BZ 66419 - handle varargs call with single argument
---
 java/org/apache/el/parser/AstFunction.java | 11 ++-
 test/org/apache/el/parser/TestAstFunction.java | 22 ++
 webapps/docs/changelog.xml |  8 
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/el/parser/AstFunction.java 
b/java/org/apache/el/parser/AstFunction.java
index 833468e9d5..1e6eeacc34 100644
--- a/java/org/apache/el/parser/AstFunction.java
+++ b/java/org/apache/el/parser/AstFunction.java
@@ -162,7 +162,7 @@ public final class AstFunction extends SimpleNode {
 if (m.isVarArgs() && i == methodParameterCount - 1) {
 if (inputParameterCount < methodParameterCount) {
 params[i] = new Object[] { null };
-} else if (inputParameterCount == methodParameterCount 
&& paramTypes[i].isArray()) {
+} else if (inputParameterCount == methodParameterCount 
&& isArray(parameters.jjtGetChild(i).getValue(ctx))) {
 params[i] = 
parameters.jjtGetChild(i).getValue(ctx);
 } else {
 Object[] varargs = new Object[inputParameterCount 
- methodParameterCount + 1];
@@ -199,6 +199,15 @@ public final class AstFunction extends SimpleNode {
 return result;
 }
 
+
+private boolean isArray(Object obj) {
+if (obj == null) {
+return false;
+}
+return obj.getClass().isArray();
+}
+
+
 public void setLocalName(String localName) {
 this.localName = localName;
 }
diff --git a/test/org/apache/el/parser/TestAstFunction.java 
b/test/org/apache/el/parser/TestAstFunction.java
index 70a2a22f61..138ecade40 100644
--- a/test/org/apache/el/parser/TestAstFunction.java
+++ b/test/org/apache/el/parser/TestAstFunction.java
@@ -16,7 +16,10 @@
  */
 package org.apache.el.parser;
 
+import javax.el.ELContext;
 import javax.el.ELProcessor;
+import javax.el.ExpressionFactory;
+import javax.el.StandardELContext;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -37,4 +40,23 @@ public class TestAstFunction {
 Object result = processor.getValue("valueOf(1000)", Integer.class);
 Assert.assertEquals(Integer.valueOf(1000), result);
 }
+
+@Test
+public void testVarargMethod() throws NoSuchMethodException, 
SecurityException {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+ELContext context = new StandardELContext(factory);
+context.getFunctionMapper().mapFunction("fn", "format",
+String.class.getMethod("format", String.class, 
Object[].class));
+
+//Object result = factory.createValueExpression(context, 
"${fn:format('%s-%s','one','two')}", String.class)
+//.getValue(context);
+//Assert.assertEquals("one-two", result);
+
+Object result = factory.createValueExpression(context, 
"${fn:format('%s-%s','one,two'.split(','))}", String.class)
+.getValue(context);
+Assert.assertEquals("one-two", result);
+
+result = factory.createValueExpression(context, 
"${fn:format('%s','one')}", String.class).getValue(context);
+Assert.assertEquals("one", result);
+}
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ded49284b6..c8b34cd1e8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -121,6 +121,14 @@
   
 
   
+  
+
+  
+66419: Fix calls from expression language to a method that
+accepts varargs when only one argument was passed. (markt)
+  
+
+  
   
 
   


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



[tomcat] 03/03: Skip additional JARs (mostly ones used in Tomcat tests)

2023-01-23 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 ddcb285fb7ad0f6e2bc03511208b136cb5950438
Author: Mark Thomas 
AuthorDate: Mon Jan 23 17:07:37 2023 +

Skip additional JARs (mostly ones used in Tomcat tests)

This speeds up test runs
---
 conf/catalina.properties | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/conf/catalina.properties b/conf/catalina.properties
index 779f761ca1..38ce4c1063 100644
--- a/conf/catalina.properties
+++ b/conf/catalina.properties
@@ -108,10 +108,12 @@ shared.loader=
 tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
 annotations-api.jar,\
 ant-junit*.jar,\
-ant-launcher.jar,\
-ant.jar,\
+ant-launcher*.jar,\
+ant*.jar,\
 asm-*.jar,\
 aspectj*.jar,\
+bcel*.jar,\
+biz.aQute.bnd*.jar,\
 bootstrap.jar,\
 catalina-ant.jar,\
 catalina-ha.jar,\
@@ -124,6 +126,7 @@ cobertura-*.jar,\
 commons-beanutils*.jar,\
 commons-codec*.jar,\
 commons-collections*.jar,\
+commons-compress*.jar,\
 commons-daemon.jar,\
 commons-dbcp*.jar,\
 commons-digester*.jar,\
@@ -165,6 +168,8 @@ log4j*.jar,\
 mail*.jar,\
 objenesis-*.jar,\
 oraclepki.jar,\
+org.hamcrest.core_*.jar,\
+org.junit_*.jar,\
 oro-*.jar,\
 servlet-api-*.jar,\
 servlet-api.jar,\
@@ -183,6 +188,7 @@ tomcat-util-scan.jar,\
 tomcat-util.jar,\
 tomcat-websocket.jar,\
 tools.jar,\
+unboundid-ldapsdk-*.jar,\
 websocket-api.jar,\
 wsdl4j*.jar,\
 xercesImpl.jar,\


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



[tomcat] 01/03: Re-format. No functional change.

2023-01-23 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 3c6dbcdce486105b3f0fa39129b78f4c3a6645d2
Author: Mark Thomas 
AuthorDate: Fri Jan 20 20:13:18 2023 +

Re-format. No functional change.
---
 java/org/apache/el/parser/AstFunction.java | 55 ++
 test/org/apache/el/parser/TestAstFunction.java |  3 +-
 2 files changed, 21 insertions(+), 37 deletions(-)

diff --git a/java/org/apache/el/parser/AstFunction.java 
b/java/org/apache/el/parser/AstFunction.java
index e054349220..833468e9d5 100644
--- a/java/org/apache/el/parser/AstFunction.java
+++ b/java/org/apache/el/parser/AstFunction.java
@@ -61,8 +61,7 @@ public final class AstFunction extends SimpleNode {
 }
 
 @Override
-public Class getType(EvaluationContext ctx)
-throws ELException {
+public Class getType(EvaluationContext ctx) throws ELException {
 
 FunctionMapper fnMapper = ctx.getFunctionMapper();
 
@@ -72,15 +71,13 @@ public final class AstFunction extends SimpleNode {
 }
 Method m = fnMapper.resolveFunction(this.prefix, this.localName);
 if (m == null) {
-throw new ELException(MessageFactory.get("error.fnMapper.method",
-this.getOutputName()));
+throw new ELException(MessageFactory.get("error.fnMapper.method", 
this.getOutputName()));
 }
 return m.getReturnType();
 }
 
 @Override
-public Object getValue(EvaluationContext ctx)
-throws ELException {
+public Object getValue(EvaluationContext ctx) throws ELException {
 
 FunctionMapper fnMapper = ctx.getFunctionMapper();
 
@@ -92,8 +89,8 @@ public final class AstFunction extends SimpleNode {
 
 if (m == null && this.prefix.length() == 0) {
 // TODO: Do we need to think about precedence of the various ways
-//   a lambda expression may be obtained from something that
-//   the parser thinks is a function?
+// a lambda expression may be obtained from something that
+// the parser thinks is a function?
 Object obj = null;
 if (ctx.isLambdaArgument(this.localName)) {
 obj = ctx.getLambdaArgument(this.localName);
@@ -114,18 +111,15 @@ public final class AstFunction extends SimpleNode {
 if (obj instanceof LambdaExpression) {
 // Build arguments
 int i = 0;
-while (obj instanceof LambdaExpression &&
-i < jjtGetNumChildren()) {
+while (obj instanceof LambdaExpression && i < 
jjtGetNumChildren()) {
 Node args = jjtGetChild(i);
-obj = ((LambdaExpression) obj).invoke(
-((AstMethodParameters) args).getParameters(ctx));
+obj = ((LambdaExpression) 
obj).invoke(((AstMethodParameters) args).getParameters(ctx));
 i++;
 }
 if (i < jjtGetNumChildren()) {
 // Haven't consumed all the sets of parameters therefore
 // there were too many sets of parameters
-throw new ELException(MessageFactory.get(
-"error.lambda.tooManyMethodParameterSets"));
+throw new 
ELException(MessageFactory.get("error.lambda.tooManyMethodParameterSets"));
 }
 return obj;
 }
@@ -138,22 +132,19 @@ public final class AstFunction extends SimpleNode {
 }
 obj = ctx.getImportHandler().resolveStatic(this.localName);
 if (obj != null) {
-return ctx.getELResolver().invoke(ctx, new ELClass((Class) 
obj), this.localName,
-null, ((AstMethodParameters) 
this.children[0]).getParameters(ctx));
+return ctx.getELResolver().invoke(ctx, new ELClass((Class) 
obj), this.localName, null,
+((AstMethodParameters) 
this.children[0]).getParameters(ctx));
 }
 }
 
 if (m == null) {
-throw new ELException(MessageFactory.get("error.fnMapper.method",
-this.getOutputName()));
+throw new ELException(MessageFactory.get("error.fnMapper.method", 
this.getOutputName()));
 }
 
 // Not a lambda expression so must be a function. Check there is just a
 // single set of method parameters
 if (this.jjtGetNumChildren() != 1) {
-throw new ELException(MessageFactory.get(
-"error.function.tooManyMethodParameterSets",
-getOutputName()));
+throw new 
ELException(MessageFactory.get("error.function.tooManyMethodParameterSets", 
getOutputName()));
 }
 
 Node parameters = jjtGetChild(0);
@@ -171,16 

[tomcat] branch 9.0.x updated (929153dacd -> ddcb285fb7)

2023-01-23 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 929153dacd Fix typo in changelog.
 new 3c6dbcdce4 Re-format. No functional change.
 new b6f1bef800 Fix BZ 66419 - handle varargs call with single argument
 new ddcb285fb7 Skip additional JARs (mostly ones used in Tomcat tests)

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


Summary of changes:
 conf/catalina.properties   | 10 +++-
 java/org/apache/el/parser/AstFunction.java | 64 --
 test/org/apache/el/parser/TestAstFunction.java | 25 +-
 webapps/docs/changelog.xml |  8 
 4 files changed, 68 insertions(+), 39 deletions(-)


-
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: Right idea, wrong attribute name

2023-01-23 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 5e2df4bf9d Right idea, wrong attribute name
5e2df4bf9d is described below

commit 5e2df4bf9d8ebd14886756217086d1bfd261f730
Author: Mark Thomas 
AuthorDate: Mon Jan 23 20:09:54 2023 +

Right idea, wrong attribute name
---
 build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index d445abb842..61a9f86c09 100644
--- a/build.xml
+++ b/build.xml
@@ -1683,9 +1683,9 @@
 

[tomcat] branch main updated: Typo

2023-01-23 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 3a2db66ffd Typo
3a2db66ffd is described below

commit 3a2db66ffd4efb9f9d8f5c7b916477f62f32441c
Author: Mark Thomas 
AuthorDate: Mon Jan 23 20:11:09 2023 +

Typo
---
 build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index 33a9f6ff15..aba58136b3 100644
--- a/build.xml
+++ b/build.xml
@@ -1682,7 +1682,7 @@
filesId="files.tomcat-embed-core"
notice="${tomcat.manifests}/servlet-api.jar.notice"
license="${tomcat.manifests}/servlet-api.jar.license"
-   metainf="${tomcat.manifests}/tomcat-embed-core.jar"
+   meta-inf="${tomcat.manifests}/tomcat-embed-core.jar"
addOSGi="true"
addGraal="true"
graalPrefix="org.apache.tomcat.embed/tomcat-embed-core"


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



[tomcat] branch main updated: Right idea, wrong attribute name

2023-01-23 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 6b4d6ba0fa Right idea, wrong attribute name
6b4d6ba0fa is described below

commit 6b4d6ba0fad9f233e492618ea0bbcbaa307605fc
Author: Mark Thomas 
AuthorDate: Mon Jan 23 20:09:54 2023 +

Right idea, wrong attribute name
---
 build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index 94e0fc7bdd..33a9f6ff15 100644
--- a/build.xml
+++ b/build.xml
@@ -1680,9 +1680,9 @@
 

Buildbot failure in on tomcat-10.1.x

2023-01-23 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb2_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/641
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch 10.1.x] 5fdaada8e41ddd113b5034b1fba59dc7efd9568a


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 2


-- ASF Buildbot


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



[tomcat] 02/03: Skip additional JARs (mostly ones used in Tomcat tests)

2023-01-23 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 470312b76483450619e3af0f4d15de402c71fa95
Author: Mark Thomas 
AuthorDate: Mon Jan 23 17:07:37 2023 +

Skip additional JARs (mostly ones used in Tomcat tests)

This speeds up test runs
---
 conf/catalina.properties | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/conf/catalina.properties b/conf/catalina.properties
index 6c5cb3eae9..edf1a909b6 100644
--- a/conf/catalina.properties
+++ b/conf/catalina.properties
@@ -108,10 +108,12 @@ shared.loader=
 tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
 annotations-api.jar,\
 ant-junit*.jar,\
-ant-launcher.jar,\
-ant.jar,\
+ant-launcher*.jar,\
+ant*.jar,\
 asm-*.jar,\
 aspectj*.jar,\
+bcel*.jar,\
+biz.aQute.bnd*.jar,\
 bootstrap.jar,\
 catalina-ant.jar,\
 catalina-ha.jar,\
@@ -124,6 +126,7 @@ cobertura-*.jar,\
 commons-beanutils*.jar,\
 commons-codec*.jar,\
 commons-collections*.jar,\
+commons-compress*.jar,\
 commons-daemon.jar,\
 commons-dbcp*.jar,\
 commons-digester*.jar,\
@@ -166,6 +169,8 @@ log4j*.jar,\
 mail*.jar,\
 objenesis-*.jar,\
 oraclepki.jar,\
+org.hamcrest.core_*.jar,\
+org.junit_*.jar,\
 oro-*.jar,\
 servlet-api-*.jar,\
 servlet-api.jar,\
@@ -184,6 +189,7 @@ tomcat-util-scan.jar,\
 tomcat-util.jar,\
 tomcat-websocket.jar,\
 tools.jar,\
+unboundid-ldapsdk-*.jar,\
 websocket-api.jar,\
 websocket-client-api.jar,\
 wsdl4j*.jar,\


-
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 (8e8dca0504 -> 5fdaada8e4)

2023-01-23 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 8e8dca0504 Re-format. No functional change.
 new 3aeb20d7b2 Fix BZ 66419 - handle varargs call with single argument
 new 470312b764 Skip additional JARs (mostly ones used in Tomcat tests)
 new 5fdaada8e4 Refactcor custom URL handler to use ServiceLoader

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


Summary of changes:
 bin/catalina.bat   |  4 --
 bin/catalina.sh|  4 --
 build.xml  |  2 +
 conf/catalina.properties   | 10 -
 .../catalina/loader/WebappClassLoaderBase.java |  4 +-
 .../apache/catalina/webresources/StandardRoot.java | 11 +++--
 .../TomcatURLStreamHandlerFactory.java | 17 +++-
 .../TomcatURLStreamHandlerProvider.java| 47 ++
 java/org/apache/el/parser/AstFunction.java | 11 -
 .../services/java.net.spi.URLStreamHandlerProvider |  2 +-
 .../services/java.net.spi.URLStreamHandlerProvider |  2 +-
 .../services/java.net.spi.URLStreamHandlerProvider |  3 +-
 .../TestClasspathUrlStreamHandler.java |  6 ---
 .../webresources/TestJarWarResourceSet.java|  7 
 .../TestTomcatURLStreamHandlerFactory.java | 10 ++---
 .../catalina/webresources/war/TestHandler.java |  9 -
 .../webresources/war/TestWarURLConnection.java |  9 -
 test/org/apache/el/parser/TestAstFunction.java | 22 ++
 .../apache/tomcat/util/buf/TesterUriUtilBase.java  |  3 --
 .../tomcat/util/file/TestConfigFileLoader.java |  2 -
 .../util/scan/TestAbstractInputStreamJar.java  |  8 
 webapps/docs/changelog.xml | 12 ++
 22 files changed, 121 insertions(+), 84 deletions(-)
 create mode 100644 
java/org/apache/catalina/webresources/TomcatURLStreamHandlerProvider.java
 copy java/jakarta/servlet/jsp/LocalStrings.properties => 
res/META-INF/catalina.jar/services/java.net.spi.URLStreamHandlerProvider (92%)
 copy java/jakarta/servlet/jsp/LocalStrings.properties => 
res/META-INF/tomcat-embed-core.jar/services/java.net.spi.URLStreamHandlerProvider
 (92%)
 copy java/jakarta/servlet/jsp/LocalStrings.properties => 
test/META-INF/services/java.net.spi.URLStreamHandlerProvider (88%)


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



[tomcat] 03/03: Refactcor custom URL handler to use ServiceLoader

2023-01-23 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 5fdaada8e41ddd113b5034b1fba59dc7efd9568a
Author: Mark Thomas 
AuthorDate: Mon Jan 23 14:56:29 2023 +

Refactcor custom URL handler to use ServiceLoader
---
 bin/catalina.bat   |  4 --
 bin/catalina.sh|  4 --
 build.xml  |  2 +
 .../catalina/loader/WebappClassLoaderBase.java |  4 +-
 .../apache/catalina/webresources/StandardRoot.java | 11 +++--
 .../TomcatURLStreamHandlerFactory.java | 17 +++-
 .../TomcatURLStreamHandlerProvider.java| 47 ++
 .../services/java.net.spi.URLStreamHandlerProvider | 16 
 .../services/java.net.spi.URLStreamHandlerProvider | 16 
 .../services/java.net.spi.URLStreamHandlerProvider | 17 
 .../TestClasspathUrlStreamHandler.java |  6 ---
 .../webresources/TestJarWarResourceSet.java|  7 
 .../TestTomcatURLStreamHandlerFactory.java | 10 ++---
 .../catalina/webresources/war/TestHandler.java |  9 -
 .../webresources/war/TestWarURLConnection.java |  9 -
 .../apache/tomcat/util/buf/TesterUriUtilBase.java  |  3 --
 .../tomcat/util/file/TestConfigFileLoader.java |  2 -
 .../util/scan/TestAbstractInputStreamJar.java  |  8 
 webapps/docs/changelog.xml |  4 ++
 19 files changed, 118 insertions(+), 78 deletions(-)

diff --git a/bin/catalina.bat b/bin/catalina.bat
index 824773b460..b00c20c5fa 100755
--- a/bin/catalina.bat
+++ b/bin/catalina.bat
@@ -203,10 +203,6 @@ set "JSSE_OPTS=-Djdk.tls.ephemeralDHKeySize=2048"
 :gotJsseOpts
 set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"
 
-rem Register custom URL handlers
-rem Do this here so custom URL handles (specifically 'war:...') can be used in 
the security policy
-set "JAVA_OPTS=%JAVA_OPTS% 
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources"
-
 if not "%CATALINA_LOGGING_CONFIG%" == "" goto noJuliConfig
 set CATALINA_LOGGING_CONFIG=-Dnop
 if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
diff --git a/bin/catalina.sh b/bin/catalina.sh
index a15accbdb5..6d13d7ab1a 100755
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -251,10 +251,6 @@ if [ -z "$JSSE_OPTS" ] ; then
 fi
 JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS"
 
-# Register custom URL handlers
-# Do this here so custom URL handles (specifically 'war:...') can be used in 
the security policy
-JAVA_OPTS="$JAVA_OPTS 
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources"
-
 # Set juli LogManager config file if it is present and an override has not 
been issued
 if [ -z "$CATALINA_LOGGING_CONFIG" ]; then
   if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
diff --git a/build.xml b/build.xml
index cc5bdddada..d445abb842 100644
--- a/build.xml
+++ b/build.xml
@@ -1156,6 +1156,7 @@
 
 
 
@@ -1682,6 +1683,7 @@
 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.webresources;
+
+import java.net.URLStreamHandler;
+import java.net.spi.URLStreamHandlerProvider;
+
+import org.apache.catalina.webresources.war.Handler;
+
+@SuppressWarnings("deprecation")
+public class TomcatURLStreamHandlerProvider extends URLStreamHandlerProvider {
+
+private static final String WAR_PROTOCOL = "war";
+private static final String CLASSPATH_PROTOCOL = "classpath";
+
+static {
+// Create an instance without calling URL.setURLStreamHandlerFactory
+TomcatURLStreamHandlerFactory.disable();
+}
+
+
+@Override
+public URLStreamHandler createURLStreamHandler(String protocol) {
+if (WAR_PROTOCOL.equals(protocol)) {
+return new Handler();
+} else if (CLASSPATH_PROTOCOL.equals(protocol)) {
+return new ClasspathURLStreamHandler();
+}
+
+// Possible user handler defined via Tomcat's custom API
+return 
TomcatURLStreamHandlerFactory.getInstance().createURLStreamHandler(protocol);
+}
+}
diff --git 
a/res/META-INF/catalina.jar/services/java.net.spi.URLStreamHandlerProvider 
b/res/META-INF/catalina.jar/services/java.net.spi.URLStreamHandlerProvider
new file mode 100644
index 00..60438bdb23
--- /dev/null
+++ b/res/META-INF/catalina.jar/services/java.net.spi.URLStreamHandlerProvider
@@ -0,0 +1,16 @@
+# 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 

[tomcat] 01/03: Fix BZ 66419 - handle varargs call with single argument

2023-01-23 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 3aeb20d7b2cf41fb62f734271357e9f521636442
Author: Mark Thomas 
AuthorDate: Mon Jan 23 19:54:46 2023 +

Fix BZ 66419 - handle varargs call with single argument
---
 java/org/apache/el/parser/AstFunction.java | 11 ++-
 test/org/apache/el/parser/TestAstFunction.java | 22 ++
 webapps/docs/changelog.xml |  8 
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/el/parser/AstFunction.java 
b/java/org/apache/el/parser/AstFunction.java
index 4d67cfec36..bac8db1be9 100644
--- a/java/org/apache/el/parser/AstFunction.java
+++ b/java/org/apache/el/parser/AstFunction.java
@@ -163,7 +163,7 @@ public final class AstFunction extends SimpleNode {
 if (m.isVarArgs() && i == methodParameterCount - 1) {
 if (inputParameterCount < methodParameterCount) {
 params[i] = new Object[] { null };
-} else if (inputParameterCount == methodParameterCount 
&& paramTypes[i].isArray()) {
+} else if (inputParameterCount == methodParameterCount 
&& isArray(parameters.jjtGetChild(i).getValue(ctx))) {
 params[i] = 
parameters.jjtGetChild(i).getValue(ctx);
 } else {
 Object[] varargs = new Object[inputParameterCount 
- methodParameterCount + 1];
@@ -200,6 +200,15 @@ public final class AstFunction extends SimpleNode {
 return result;
 }
 
+
+private boolean isArray(Object obj) {
+if (obj == null) {
+return false;
+}
+return obj.getClass().isArray();
+}
+
+
 public void setLocalName(String localName) {
 this.localName = localName;
 }
diff --git a/test/org/apache/el/parser/TestAstFunction.java 
b/test/org/apache/el/parser/TestAstFunction.java
index 5697f020e3..4b3a6572bd 100644
--- a/test/org/apache/el/parser/TestAstFunction.java
+++ b/test/org/apache/el/parser/TestAstFunction.java
@@ -16,7 +16,10 @@
  */
 package org.apache.el.parser;
 
+import jakarta.el.ELContext;
 import jakarta.el.ELProcessor;
+import jakarta.el.ExpressionFactory;
+import jakarta.el.StandardELContext;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -37,4 +40,23 @@ public class TestAstFunction {
 Object result = processor.getValue("valueOf(1000)", Integer.class);
 Assert.assertEquals(Integer.valueOf(1000), result);
 }
+
+@Test
+public void testVarargMethod() throws NoSuchMethodException, 
SecurityException {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+ELContext context = new StandardELContext(factory);
+context.getFunctionMapper().mapFunction("fn", "format",
+String.class.getMethod("format", String.class, 
Object[].class));
+
+//Object result = factory.createValueExpression(context, 
"${fn:format('%s-%s','one','two')}", String.class)
+//.getValue(context);
+//Assert.assertEquals("one-two", result);
+
+Object result = factory.createValueExpression(context, 
"${fn:format('%s-%s','one,two'.split(','))}", String.class)
+.getValue(context);
+Assert.assertEquals("one-two", result);
+
+result = factory.createValueExpression(context, 
"${fn:format('%s','one')}", String.class).getValue(context);
+Assert.assertEquals("one", result);
+}
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a6b3175469..a5678489de 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -125,6 +125,14 @@
   
 
   
+  
+
+  
+66419: Fix calls from expression language to a method that
+accepts varargs when only one argument was passed. (markt)
+  
+
+  
   
 
   


-
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: Re-format. No functional change.

2023-01-23 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 8e8dca0504 Re-format. No functional change.
8e8dca0504 is described below

commit 8e8dca0504573fc5c9502f362654b44d84a4634b
Author: Mark Thomas 
AuthorDate: Fri Jan 20 20:13:18 2023 +

Re-format. No functional change.
---
 java/org/apache/el/parser/AstFunction.java | 55 ++
 test/org/apache/el/parser/TestAstFunction.java |  3 +-
 2 files changed, 21 insertions(+), 37 deletions(-)

diff --git a/java/org/apache/el/parser/AstFunction.java 
b/java/org/apache/el/parser/AstFunction.java
index 3ce652f768..4d67cfec36 100644
--- a/java/org/apache/el/parser/AstFunction.java
+++ b/java/org/apache/el/parser/AstFunction.java
@@ -62,8 +62,7 @@ public final class AstFunction extends SimpleNode {
 }
 
 @Override
-public Class getType(EvaluationContext ctx)
-throws ELException {
+public Class getType(EvaluationContext ctx) throws ELException {
 
 FunctionMapper fnMapper = ctx.getFunctionMapper();
 
@@ -73,15 +72,13 @@ public final class AstFunction extends SimpleNode {
 }
 Method m = fnMapper.resolveFunction(this.prefix, this.localName);
 if (m == null) {
-throw new ELException(MessageFactory.get("error.fnMapper.method",
-this.getOutputName()));
+throw new ELException(MessageFactory.get("error.fnMapper.method", 
this.getOutputName()));
 }
 return m.getReturnType();
 }
 
 @Override
-public Object getValue(EvaluationContext ctx)
-throws ELException {
+public Object getValue(EvaluationContext ctx) throws ELException {
 
 FunctionMapper fnMapper = ctx.getFunctionMapper();
 
@@ -93,8 +90,8 @@ public final class AstFunction extends SimpleNode {
 
 if (m == null && this.prefix.length() == 0) {
 // TODO: Do we need to think about precedence of the various ways
-//   a lambda expression may be obtained from something that
-//   the parser thinks is a function?
+// a lambda expression may be obtained from something that
+// the parser thinks is a function?
 Object obj = null;
 if (ctx.isLambdaArgument(this.localName)) {
 obj = ctx.getLambdaArgument(this.localName);
@@ -115,18 +112,15 @@ public final class AstFunction extends SimpleNode {
 if (obj instanceof LambdaExpression) {
 // Build arguments
 int i = 0;
-while (obj instanceof LambdaExpression &&
-i < jjtGetNumChildren()) {
+while (obj instanceof LambdaExpression && i < 
jjtGetNumChildren()) {
 Node args = jjtGetChild(i);
-obj = ((LambdaExpression) obj).invoke(
-((AstMethodParameters) args).getParameters(ctx));
+obj = ((LambdaExpression) 
obj).invoke(((AstMethodParameters) args).getParameters(ctx));
 i++;
 }
 if (i < jjtGetNumChildren()) {
 // Haven't consumed all the sets of parameters therefore
 // there were too many sets of parameters
-throw new ELException(MessageFactory.get(
-"error.lambda.tooManyMethodParameterSets"));
+throw new 
ELException(MessageFactory.get("error.lambda.tooManyMethodParameterSets"));
 }
 return obj;
 }
@@ -139,22 +133,19 @@ public final class AstFunction extends SimpleNode {
 }
 obj = ctx.getImportHandler().resolveStatic(this.localName);
 if (obj != null) {
-return ctx.getELResolver().invoke(ctx, new ELClass((Class) 
obj), this.localName,
-null, ((AstMethodParameters) 
this.children[0]).getParameters(ctx));
+return ctx.getELResolver().invoke(ctx, new ELClass((Class) 
obj), this.localName, null,
+((AstMethodParameters) 
this.children[0]).getParameters(ctx));
 }
 }
 
 if (m == null) {
-throw new ELException(MessageFactory.get("error.fnMapper.method",
-this.getOutputName()));
+throw new ELException(MessageFactory.get("error.fnMapper.method", 
this.getOutputName()));
 }
 
 // Not a lambda expression so must be a function. Check there is just a
 // single set of method parameters
 if (this.jjtGetNumChildren() != 1) {
-throw new ELException(MessageFactory.get(
-"error.function.tooManyMethodParameterSets",
-getOutputName()));
+throw new 

[Bug 66438] Tomcat has broken module-info.class files

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

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
Thanks for the report.

Fixed in:
- 11.0.x for 11.0.0-M3 onwards
- 10.1.x for 10.1.6 onwards

-- 
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: Fix BZ 66419 - handle varargs call with single argument

2023-01-23 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 8c6f2972be Fix BZ 66419 - handle varargs call with single argument
8c6f2972be is described below

commit 8c6f2972beb5f4c7809dddf5633b696e3f069b4a
Author: Mark Thomas 
AuthorDate: Mon Jan 23 19:54:46 2023 +

Fix BZ 66419 - handle varargs call with single argument
---
 java/org/apache/el/parser/AstFunction.java | 11 ++-
 test/org/apache/el/parser/TestAstFunction.java | 22 ++
 webapps/docs/changelog.xml |  8 
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/el/parser/AstFunction.java 
b/java/org/apache/el/parser/AstFunction.java
index 4d67cfec36..bac8db1be9 100644
--- a/java/org/apache/el/parser/AstFunction.java
+++ b/java/org/apache/el/parser/AstFunction.java
@@ -163,7 +163,7 @@ public final class AstFunction extends SimpleNode {
 if (m.isVarArgs() && i == methodParameterCount - 1) {
 if (inputParameterCount < methodParameterCount) {
 params[i] = new Object[] { null };
-} else if (inputParameterCount == methodParameterCount 
&& paramTypes[i].isArray()) {
+} else if (inputParameterCount == methodParameterCount 
&& isArray(parameters.jjtGetChild(i).getValue(ctx))) {
 params[i] = 
parameters.jjtGetChild(i).getValue(ctx);
 } else {
 Object[] varargs = new Object[inputParameterCount 
- methodParameterCount + 1];
@@ -200,6 +200,15 @@ public final class AstFunction extends SimpleNode {
 return result;
 }
 
+
+private boolean isArray(Object obj) {
+if (obj == null) {
+return false;
+}
+return obj.getClass().isArray();
+}
+
+
 public void setLocalName(String localName) {
 this.localName = localName;
 }
diff --git a/test/org/apache/el/parser/TestAstFunction.java 
b/test/org/apache/el/parser/TestAstFunction.java
index 5697f020e3..4b3a6572bd 100644
--- a/test/org/apache/el/parser/TestAstFunction.java
+++ b/test/org/apache/el/parser/TestAstFunction.java
@@ -16,7 +16,10 @@
  */
 package org.apache.el.parser;
 
+import jakarta.el.ELContext;
 import jakarta.el.ELProcessor;
+import jakarta.el.ExpressionFactory;
+import jakarta.el.StandardELContext;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -37,4 +40,23 @@ public class TestAstFunction {
 Object result = processor.getValue("valueOf(1000)", Integer.class);
 Assert.assertEquals(Integer.valueOf(1000), result);
 }
+
+@Test
+public void testVarargMethod() throws NoSuchMethodException, 
SecurityException {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+ELContext context = new StandardELContext(factory);
+context.getFunctionMapper().mapFunction("fn", "format",
+String.class.getMethod("format", String.class, 
Object[].class));
+
+//Object result = factory.createValueExpression(context, 
"${fn:format('%s-%s','one','two')}", String.class)
+//.getValue(context);
+//Assert.assertEquals("one-two", result);
+
+Object result = factory.createValueExpression(context, 
"${fn:format('%s-%s','one,two'.split(','))}", String.class)
+.getValue(context);
+Assert.assertEquals("one-two", result);
+
+result = factory.createValueExpression(context, 
"${fn:format('%s','one')}", String.class).getValue(context);
+Assert.assertEquals("one", result);
+}
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index fec228945e..9fba57e37f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -148,6 +148,14 @@
   
 
   
+  
+
+  
+66419: Fix calls from expression language to a method that
+accepts varargs when only one argument was passed. (markt)
+  
+
+  
   
 
   


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



[tomcat] branch main updated: Fix warnings

2023-01-23 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 f949ac1cd0 Fix warnings
f949ac1cd0 is described below

commit f949ac1cd08004d1a149d3a411b079c7712e44bb
Author: Mark Thomas 
AuthorDate: Mon Jan 23 19:44:06 2023 +

Fix warnings
---
 .../webresources/TomcatURLStreamHandlerFactory.java  |  1 +
 .../webresources/TomcatURLStreamHandlerProvider.java | 16 
 2 files changed, 17 insertions(+)

diff --git 
a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java 
b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
index 408ad8dce7..830858e774 100644
--- a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
+++ b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java
@@ -26,6 +26,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
  * @deprecated Unused. Use the ServiceLoader mechanism to define additional
  * handlers. Will be removed in Tomcat 11 onwards.
  */
+@Deprecated
 public class TomcatURLStreamHandlerFactory implements URLStreamHandlerFactory {
 
 // Singleton instance
diff --git 
a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerProvider.java 
b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerProvider.java
index ac3ac47acb..971e5ea4f8 100644
--- a/java/org/apache/catalina/webresources/TomcatURLStreamHandlerProvider.java
+++ b/java/org/apache/catalina/webresources/TomcatURLStreamHandlerProvider.java
@@ -1,3 +1,19 @@
+/*
+ * 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.webresources;
 
 import java.net.URLStreamHandler;


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



Java 17, MacOS and Apple silicon

2023-01-23 Thread Mark Thomas

Hi all,

Having switched to Java 17 on my $work laptop (MacOS, Apple silicon), I 
noticed the unit tests were significantly slower. A quick test with 
11.0.0-M1 with Java 11 vs Java 17 indicated the issue was related to 
Java 17.


I haven't dug into it yet. I plan to do that once I have completed 
back-ports for the various things I have been working on today (the unit 
test slowness made me reluctant to backport. Now I am back at by desktop 
I can run the tests).


Mark

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



Buildbot failure in on tomcat-11.0.x

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


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 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: Refactcor custom URL handler to use ServiceLoader

2023-01-23 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 0782f0b919 Refactcor custom URL handler to use ServiceLoader
0782f0b919 is described below

commit 0782f0b919b5131a9423c91333f7c557954336a3
Author: Mark Thomas 
AuthorDate: Mon Jan 23 14:56:29 2023 +

Refactcor custom URL handler to use ServiceLoader
---
 bin/catalina.bat   |  3 ---
 bin/catalina.sh|  3 ---
 build.xml  |  2 ++
 .../catalina/loader/WebappClassLoaderBase.java |  4 +--
 .../apache/catalina/webresources/StandardRoot.java | 11 
 .../TomcatURLStreamHandlerFactory.java | 16 +++
 .../TomcatURLStreamHandlerProvider.java| 31 ++
 .../services/java.net.spi.URLStreamHandlerProvider | 16 +++
 .../services/java.net.spi.URLStreamHandlerProvider | 16 +++
 .../services/java.net.spi.URLStreamHandlerProvider | 17 
 .../TestClasspathUrlStreamHandler.java |  6 -
 .../webresources/TestJarWarResourceSet.java|  7 -
 .../TestTomcatURLStreamHandlerFactory.java | 10 +++
 .../catalina/webresources/war/TestHandler.java |  9 ---
 .../webresources/war/TestWarURLConnection.java |  9 ---
 .../apache/tomcat/util/buf/TesterUriUtilBase.java  |  3 ---
 .../tomcat/util/file/TestConfigFileLoader.java |  2 --
 .../util/scan/TestAbstractInputStreamJar.java  |  8 --
 webapps/docs/changelog.xml |  4 +++
 19 files changed, 101 insertions(+), 76 deletions(-)

diff --git a/bin/catalina.bat b/bin/catalina.bat
index ce73b88044..068cd283bc 100755
--- a/bin/catalina.bat
+++ b/bin/catalina.bat
@@ -203,9 +203,6 @@ set "JSSE_OPTS=-Djdk.tls.ephemeralDHKeySize=2048"
 :gotJsseOpts
 set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"
 
-rem Register custom URL handlers
-set "JAVA_OPTS=%JAVA_OPTS% 
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources"
-
 if not "%CATALINA_LOGGING_CONFIG%" == "" goto noJuliConfig
 set CATALINA_LOGGING_CONFIG=-Dnop
 if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
diff --git a/bin/catalina.sh b/bin/catalina.sh
index d987738b27..a7b14b6957 100755
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -251,9 +251,6 @@ if [ -z "$JSSE_OPTS" ] ; then
 fi
 JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS"
 
-# Register custom URL handlers
-JAVA_OPTS="$JAVA_OPTS 
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources"
-
 # Set juli LogManager config file if it is present and an override has not 
been issued
 if [ -z "$CATALINA_LOGGING_CONFIG" ]; then
   if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
diff --git a/build.xml b/build.xml
index b640f3a0a7..94e0fc7bdd 100644
--- a/build.xml
+++ b/build.xml
@@ -1153,6 +1153,7 @@
 
 
 
@@ -1679,6 +1680,7 @@
 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.
+
+org.apache.catalina.webresources.TomcatURLStreamHandlerProvider
\ No newline at end of file
diff --git 
a/res/META-INF/tomcat-embed-core.jar/services/java.net.spi.URLStreamHandlerProvider
 
b/res/META-INF/tomcat-embed-core.jar/services/java.net.spi.URLStreamHandlerProvider
new file mode 100644
index 00..60438bdb23
--- /dev/null
+++ 
b/res/META-INF/tomcat-embed-core.jar/services/java.net.spi.URLStreamHandlerProvider
@@ -0,0 +1,16 @@
+# 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.
+
+org.apache.catalina.webresources.TomcatURLStreamHandlerProvider
\ No newline at end of file
diff --git a/test/META-INF/services/java.net.spi.URLStreamHandlerProvider 
b/test/META-INF/services/java.net.spi.URLStreamHandlerProvider
new file mode 100644
index 00..e0b27f914f
--- /dev/null
+++ 

RE: [VOTE][RESULT] Release Apache Tomcat 10.1.5

2023-01-23 Thread jonmcalexander
Has this actually been released?

Dream * Excel * Explore * Inspire
Jon McAlexander
Senior Infrastructure Engineer
Asst. Vice President
He/His

Middleware Product Engineering
Enterprise CIO | EAS | Middleware | Infrastructure Solutions

8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508

jonmcalexan...@wellsfargo.com
This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.

> -Original Message-
> From: Mark Thomas 
> Sent: Friday, January 13, 2023 7:48 AM
> To: dev@tomcat.apache.org
> Subject: [VOTE][RESULT] Release Apache Tomcat 10.1.5
> 
> The following votes were cast:
> 
> Binding:
> +1: markt, remm, jfclere
> +0: schultz
> 
> Non-binding:
> +1: lihan
> 
> The vote therefore passes. Thanks to everyone who contributed to this
> release.
> 
> Mark
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional
> commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 03/03: Skip additional JARs (mostly ones used in Tomcat tests)

2023-01-23 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

commit 3c0af3f20141ccab4c09446831c36723be3a41a0
Author: Mark Thomas 
AuthorDate: Mon Jan 23 17:07:37 2023 +

Skip additional JARs (mostly ones used in Tomcat tests)

This speeds up test runs
---
 conf/catalina.properties | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/conf/catalina.properties b/conf/catalina.properties
index 9e53a5..ea1b3c119d 100644
--- a/conf/catalina.properties
+++ b/conf/catalina.properties
@@ -88,10 +88,12 @@ shared.loader=
 tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
 annotations-api.jar,\
 ant-junit*.jar,\
-ant-launcher.jar,\
-ant.jar,\
+ant-launcher*.jar,\
+ant*.jar,\
 asm-*.jar,\
 aspectj*.jar,\
+bcel*.jar,\
+biz.aQute.bnd*.jar,\
 bootstrap.jar,\
 catalina-ant.jar,\
 catalina-ha.jar,\
@@ -104,6 +106,7 @@ cobertura-*.jar,\
 commons-beanutils*.jar,\
 commons-codec*.jar,\
 commons-collections*.jar,\
+commons-compress*.jar,\
 commons-daemon.jar,\
 commons-dbcp*.jar,\
 commons-digester*.jar,\
@@ -146,6 +149,8 @@ log4j*.jar,\
 mail*.jar,\
 objenesis-*.jar,\
 oraclepki.jar,\
+org.hamcrest.core_*.jar,\
+org.junit_*.jar,\
 oro-*.jar,\
 servlet-api-*.jar,\
 servlet-api.jar,\
@@ -164,6 +169,7 @@ tomcat-util-scan.jar,\
 tomcat-util.jar,\
 tomcat-websocket.jar,\
 tools.jar,\
+unboundid-ldapsdk-*.jar,\
 websocket-api.jar,\
 websocket-client-api.jar,\
 wsdl4j*.jar,\


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



[tomcat] 02/03: s

2023-01-23 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

commit 08391944dedf2439381ac867a824b60ed9522b35
Author: Mark Thomas 
AuthorDate: Fri Jan 20 20:16:48 2023 +

s
---
 java/org/apache/el/parser/AstFunction.java | 55 +++---
 1 file changed, 20 insertions(+), 35 deletions(-)

diff --git a/java/org/apache/el/parser/AstFunction.java 
b/java/org/apache/el/parser/AstFunction.java
index 3ce652f768..4d67cfec36 100644
--- a/java/org/apache/el/parser/AstFunction.java
+++ b/java/org/apache/el/parser/AstFunction.java
@@ -62,8 +62,7 @@ public final class AstFunction extends SimpleNode {
 }
 
 @Override
-public Class getType(EvaluationContext ctx)
-throws ELException {
+public Class getType(EvaluationContext ctx) throws ELException {
 
 FunctionMapper fnMapper = ctx.getFunctionMapper();
 
@@ -73,15 +72,13 @@ public final class AstFunction extends SimpleNode {
 }
 Method m = fnMapper.resolveFunction(this.prefix, this.localName);
 if (m == null) {
-throw new ELException(MessageFactory.get("error.fnMapper.method",
-this.getOutputName()));
+throw new ELException(MessageFactory.get("error.fnMapper.method", 
this.getOutputName()));
 }
 return m.getReturnType();
 }
 
 @Override
-public Object getValue(EvaluationContext ctx)
-throws ELException {
+public Object getValue(EvaluationContext ctx) throws ELException {
 
 FunctionMapper fnMapper = ctx.getFunctionMapper();
 
@@ -93,8 +90,8 @@ public final class AstFunction extends SimpleNode {
 
 if (m == null && this.prefix.length() == 0) {
 // TODO: Do we need to think about precedence of the various ways
-//   a lambda expression may be obtained from something that
-//   the parser thinks is a function?
+// a lambda expression may be obtained from something that
+// the parser thinks is a function?
 Object obj = null;
 if (ctx.isLambdaArgument(this.localName)) {
 obj = ctx.getLambdaArgument(this.localName);
@@ -115,18 +112,15 @@ public final class AstFunction extends SimpleNode {
 if (obj instanceof LambdaExpression) {
 // Build arguments
 int i = 0;
-while (obj instanceof LambdaExpression &&
-i < jjtGetNumChildren()) {
+while (obj instanceof LambdaExpression && i < 
jjtGetNumChildren()) {
 Node args = jjtGetChild(i);
-obj = ((LambdaExpression) obj).invoke(
-((AstMethodParameters) args).getParameters(ctx));
+obj = ((LambdaExpression) 
obj).invoke(((AstMethodParameters) args).getParameters(ctx));
 i++;
 }
 if (i < jjtGetNumChildren()) {
 // Haven't consumed all the sets of parameters therefore
 // there were too many sets of parameters
-throw new ELException(MessageFactory.get(
-"error.lambda.tooManyMethodParameterSets"));
+throw new 
ELException(MessageFactory.get("error.lambda.tooManyMethodParameterSets"));
 }
 return obj;
 }
@@ -139,22 +133,19 @@ public final class AstFunction extends SimpleNode {
 }
 obj = ctx.getImportHandler().resolveStatic(this.localName);
 if (obj != null) {
-return ctx.getELResolver().invoke(ctx, new ELClass((Class) 
obj), this.localName,
-null, ((AstMethodParameters) 
this.children[0]).getParameters(ctx));
+return ctx.getELResolver().invoke(ctx, new ELClass((Class) 
obj), this.localName, null,
+((AstMethodParameters) 
this.children[0]).getParameters(ctx));
 }
 }
 
 if (m == null) {
-throw new ELException(MessageFactory.get("error.fnMapper.method",
-this.getOutputName()));
+throw new ELException(MessageFactory.get("error.fnMapper.method", 
this.getOutputName()));
 }
 
 // Not a lambda expression so must be a function. Check there is just a
 // single set of method parameters
 if (this.jjtGetNumChildren() != 1) {
-throw new ELException(MessageFactory.get(
-"error.function.tooManyMethodParameterSets",
-getOutputName()));
+throw new 
ELException(MessageFactory.get("error.function.tooManyMethodParameterSets", 
getOutputName()));
 }
 
 Node parameters = jjtGetChild(0);
@@ -172,16 +163,14 @@ public final class AstFunction extends SimpleNode {
 if 

[tomcat] branch main updated (14f28ffcd1 -> 3c0af3f201)

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

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


from 14f28ffcd1 Add deprecated
 new 9dc8b4c8e2 Re-format. No functional change.
 new 08391944de s
 new 3c0af3f201 Skip additional JARs (mostly ones used in Tomcat tests)

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


Summary of changes:
 conf/catalina.properties   | 10 -
 java/org/apache/el/parser/AstFunction.java | 55 ++
 test/org/apache/el/parser/TestAstFunction.java |  3 +-
 3 files changed, 29 insertions(+), 39 deletions(-)


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



[tomcat] 01/03: Re-format. No functional change.

2023-01-23 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

commit 9dc8b4c8e2682d09cf5a7ec83ac8436e006643f8
Author: Mark Thomas 
AuthorDate: Fri Jan 20 20:13:18 2023 +

Re-format. No functional change.
---
 test/org/apache/el/parser/TestAstFunction.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/test/org/apache/el/parser/TestAstFunction.java 
b/test/org/apache/el/parser/TestAstFunction.java
index c4d72b8c43..5697f020e3 100644
--- a/test/org/apache/el/parser/TestAstFunction.java
+++ b/test/org/apache/el/parser/TestAstFunction.java
@@ -33,8 +33,7 @@ public class TestAstFunction {
 @Test
 public void testImport02() {
 ELProcessor processor = new ELProcessor();
-processor.getELManager().getELContext().getImportHandler()
-.importStatic("java.lang.Integer.valueOf");
+
processor.getELManager().getELContext().getImportHandler().importStatic("java.lang.Integer.valueOf");
 Object result = processor.getValue("valueOf(1000)", Integer.class);
 Assert.assertEquals(Integer.valueOf(1000), result);
 }


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



[tomcat] branch main updated: Add deprecated

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

remm 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 14f28ffcd1 Add deprecated
14f28ffcd1 is described below

commit 14f28ffcd1c42f875b3176304e5150ef3a9d7e67
Author: remm 
AuthorDate: Mon Jan 23 14:37:47 2023 +0100

Add deprecated
---
 .../apache/tomcat/util/net/openssl/panama/OpenSSLX509Certificate.java   | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLX509Certificate.java
 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLX509Certificate.java
index b4e6f381bf..d0133637e4 100644
--- 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLX509Certificate.java
+++ 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/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();
 }


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



Re: RFC 9218 priorities - back-port?

2023-01-23 Thread Rémy Maucherat
On Mon, Jan 23, 2023 at 11:39 AM Mark Thomas  wrote:
>
>
>
> On 21/01/2023 14:33, Christopher Schultz wrote:
> > Mark,
> >
> > On 1/20/23 14:11, Mark Thomas wrote:
> >> Hi all,
> >>
> >> You will have seen I've just committed the updated priorities
> >> implementation for HTTP/2. The open question is whether or not we want
> >> to back-port this and if so, how far.
> >>
> >> Thoughts?
> >
> > Shall we let a release or two of Tomcat 11 go by to see if there are any
> > problems reported in the wild before back-porting?
>
> Assuming the next release vote for 11 passes, I'd be fine with that. I'm
> not sure there is much pick-up of Tomcat 11 yet. I'd probably leave a
> gap between the 10.1.x to 9.0.x back-port as well.
>
> I'm likely being over cautious since I'd be surprised if this code was
> used much in the real world anyway. Priotising requests is hard in
> normal circumstances and even harder in the Tomcat case where the
> content is dymanically generated and the client likely has little idea
> of the relative costs of genertaing the responses. In essence, all this
> code does is in the case of connection window exhaustion, it uses
> priorities to determine which responses to advance when the next window
> update arrives.

Yes, I have read the new priority specification, which is much nicer
and does a good job at explaining everything. I agree with you: the
big problem is it is still extremely powerful and at the same time
figuring out how to best use it seems still as impossible as before.
It has been demonstrated that h2 now lowers latency consistently in
the real world (JF can finally ace his demo these days !), but it
would be much harder to use the priority system to actually net a
further benefit.

> > Or is this the kind
> > of thing that will be much easier to back-port today than, say, in
> > March/April?
>
> The HTTP/2 is pretty consistent between all versions. I'm not expecting
> any major issues back-porting this in a few months time.

+1


Rémy

> 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 main updated: Remove code that provides a workaround required with a security manager

2023-01-23 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 5754810bd7 Remove code that provides a workaround required with a 
security manager
5754810bd7 is described below

commit 5754810bd7f5eebd728d36129423547a1ea6ad82
Author: Mark Thomas 
AuthorDate: Mon Jan 23 11:22:05 2023 +

Remove code that provides a workaround required with a security manager
---
 java/org/apache/catalina/webresources/war/Handler.java | 16 
 1 file changed, 16 deletions(-)

diff --git a/java/org/apache/catalina/webresources/war/Handler.java 
b/java/org/apache/catalina/webresources/war/Handler.java
index d2a09d155b..fea82d0ba6 100644
--- a/java/org/apache/catalina/webresources/war/Handler.java
+++ b/java/org/apache/catalina/webresources/war/Handler.java
@@ -27,20 +27,4 @@ public class Handler extends URLStreamHandler {
 protected URLConnection openConnection(URL u) throws IOException {
 return new WarURLConnection(u);
 }
-
-@Override
-protected void setURL(URL u, String protocol, String host, int port, 
String authority, String userInfo, String path,
-String query, String ref) {
-if (path.startsWith("file:") && !path.startsWith("file:/")) {
-// Work around a problem with the URLs in the security policy file.
-// On Windows, the use of ${catalina.[home|base]} in the policy 
file
-// results in codebase URLs of the form file:C:/... when they 
should
-// be file:/C:/...
-// For file: and jar: URLs, the JRE compensates for this. It does 
not
-// compensate for this for war:file:... URLs. Therefore, we do that
-// here
-path = "file:/" + path.substring(5);
-}
-super.setURL(u, protocol, host, port, authority, userInfo, path, 
query, ref);
-}
 }


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



Re: RFC 9218 priorities - back-port?

2023-01-23 Thread Mark Thomas




On 21/01/2023 14:33, Christopher Schultz wrote:

Mark,

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

Hi all,

You will have seen I've just committed the updated priorities 
implementation for HTTP/2. The open question is whether or not we want 
to back-port this and if so, how far.


Thoughts?


Shall we let a release or two of Tomcat 11 go by to see if there are any 
problems reported in the wild before back-porting?


Assuming the next release vote for 11 passes, I'd be fine with that. I'm 
not sure there is much pick-up of Tomcat 11 yet. I'd probably leave a 
gap between the 10.1.x to 9.0.x back-port as well.


I'm likely being over cautious since I'd be surprised if this code was 
used much in the real world anyway. Priotising requests is hard in 
normal circumstances and even harder in the Tomcat case where the 
content is dymanically generated and the client likely has little idea 
of the relative costs of genertaing the responses. In essence, all this 
code does is in the case of connection window exhaustion, it uses 
priorities to determine which responses to advance when the next window 
update arrives.


Or is this the kind 
of thing that will be much easier to back-port today than, say, in 
March/April?


The HTTP/2 is pretty consistent between all versions. I'm not expecting 
any major issues back-porting this in a few months time.


Mark

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



[tomcat] branch main updated: The 11.0.0-M2 release vote did not pass

2023-01-23 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 3d0adc2e72 The 11.0.0-M2 release vote did not pass
3d0adc2e72 is described below

commit 3d0adc2e7244e582b8f9399c09e915b34b582467
Author: Mark Thomas 
AuthorDate: Mon Jan 23 10:17:47 2023 +

The 11.0.0-M2 release vote did not pass
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 3b676c9e21..2f3694254b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -155,7 +155,7 @@
 
   
 
-
+
   
 
   


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



svn commit: r59537 - /dev/tomcat/tomcat-11/v11.0.0-M2/

2023-01-23 Thread markt
Author: markt
Date: Mon Jan 23 10:19:16 2023
New Revision: 59537

Log:
Drop 11.0.0-M2 as release vote did not pass

Removed:
dev/tomcat/tomcat-11/v11.0.0-M2/


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



[VOTE][RESULT] Release Apache Tomcat 11.0.0-M2

2023-01-23 Thread Mark Thomas

The following votes were cast:

Binding:
+1: markt, remm

Non-binding:
+1: lihan

The vote therefore does not pass. I will update the changelog accordingly.

Mark

-
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 BZ 66438 - correct names of Jakarta modules in JPMS metadata

2023-01-23 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 1e3e338873 Fix BZ 66438 - correct names of Jakarta modules in JPMS 
metadata
1e3e338873 is described below

commit 1e3e338873a2e5ee1126dd07bcda94dd07508d99
Author: Mark Thomas 
AuthorDate: Mon Jan 23 09:56:55 2023 +

Fix BZ 66438 - correct names of Jakarta modules in JPMS metadata
---
 res/bnd/catalina.jar.tmp.bnd  | 12 ++--
 res/bnd/tomcat-embed-core.jar.tmp.bnd | 12 ++--
 webapps/docs/changelog.xml|  4 
 3 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/res/bnd/catalina.jar.tmp.bnd b/res/bnd/catalina.jar.tmp.bnd
index 181e69fe8b..8720b37d7f 100644
--- a/res/bnd/catalina.jar.tmp.bnd
+++ b/res/bnd/catalina.jar.tmp.bnd
@@ -54,15 +54,15 @@ Export-Package: \
 access=32;\
 version=${Bundle-Version};\
 modules='\
-jakarta.ejb-api,\
+jakarta.ejb,\
 jakarta.mail,\
-jakarta.persistence-api,\
-jakarta.xml.rpc-api,\
+jakarta.persistence,\
+jakarta.xml.ws,\
 java.xml.ws'
 -jpms-module-info-options: \
 ${module.name};substitute=catalina,\
-jakarta.ejb-api;static=true,\
+jakarta.ejb;static=true,\
 jakarta.mail;static=true,\
-jakarta.persistence-api;static=true,\
-jakarta.xml.rpc-api;static=true,\
+jakarta.persistence;static=true,\
+jakarta.xml.ws;static=true,\
 java.xml.ws;static=true
\ No newline at end of file
diff --git a/res/bnd/tomcat-embed-core.jar.tmp.bnd 
b/res/bnd/tomcat-embed-core.jar.tmp.bnd
index 314f672019..7e83e60f56 100644
--- a/res/bnd/tomcat-embed-core.jar.tmp.bnd
+++ b/res/bnd/tomcat-embed-core.jar.tmp.bnd
@@ -129,15 +129,15 @@ Provide-Capability: \
 access=32;\
 version=${Bundle-Version};\
 modules='\
-jakarta.ejb-api,\
+jakarta.ejb,\
 jakarta.mail,\
-jakarta.persistence-api,\
-jakarta.xml.rpc-api,\
+jakarta.persistence,\
+jakarta.xml.ws,\
 java.xml.ws'
 -jpms-module-info-options: \
 ${module.name};substitute=tomcat-embed-core,\
-jakarta.ejb-api;static=true,\
+jakarta.ejb;static=true,\
 jakarta.mail;static=true,\
-jakarta.persistence-api;static=true,\
-jakarta.xml.rpc-api;static=true,\
+jakarta.persistence;static=true,\
+jakarta.xml.ws;static=true,\
 java.xml.ws;static=true
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 066872b6f7..a6b3175469 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -111,6 +111,10 @@
 Allow a Valve to access cookies from a request that cannot be mapped to
 a Context. (markt)
   
+  
+66438: Correct names of Jakarta modules in JPMS metadata.
+(markt)
+  
 
   
   


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



[tomcat] branch main updated: Fix BZ 66438 - correct names of Jakarta modules in JPMS metadata

2023-01-23 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 80d81137e0 Fix BZ 66438 - correct names of Jakarta modules in JPMS 
metadata
80d81137e0 is described below

commit 80d81137e0e349ffcd5d24b4ebd65e18f5726fd3
Author: Mark Thomas 
AuthorDate: Mon Jan 23 09:56:55 2023 +

Fix BZ 66438 - correct names of Jakarta modules in JPMS metadata
---
 res/bnd/catalina.jar.tmp.bnd  | 12 ++--
 res/bnd/tomcat-embed-core.jar.tmp.bnd | 12 ++--
 webapps/docs/changelog.xml|  4 
 3 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/res/bnd/catalina.jar.tmp.bnd b/res/bnd/catalina.jar.tmp.bnd
index 181e69fe8b..8720b37d7f 100644
--- a/res/bnd/catalina.jar.tmp.bnd
+++ b/res/bnd/catalina.jar.tmp.bnd
@@ -54,15 +54,15 @@ Export-Package: \
 access=32;\
 version=${Bundle-Version};\
 modules='\
-jakarta.ejb-api,\
+jakarta.ejb,\
 jakarta.mail,\
-jakarta.persistence-api,\
-jakarta.xml.rpc-api,\
+jakarta.persistence,\
+jakarta.xml.ws,\
 java.xml.ws'
 -jpms-module-info-options: \
 ${module.name};substitute=catalina,\
-jakarta.ejb-api;static=true,\
+jakarta.ejb;static=true,\
 jakarta.mail;static=true,\
-jakarta.persistence-api;static=true,\
-jakarta.xml.rpc-api;static=true,\
+jakarta.persistence;static=true,\
+jakarta.xml.ws;static=true,\
 java.xml.ws;static=true
\ No newline at end of file
diff --git a/res/bnd/tomcat-embed-core.jar.tmp.bnd 
b/res/bnd/tomcat-embed-core.jar.tmp.bnd
index 314f672019..7e83e60f56 100644
--- a/res/bnd/tomcat-embed-core.jar.tmp.bnd
+++ b/res/bnd/tomcat-embed-core.jar.tmp.bnd
@@ -129,15 +129,15 @@ Provide-Capability: \
 access=32;\
 version=${Bundle-Version};\
 modules='\
-jakarta.ejb-api,\
+jakarta.ejb,\
 jakarta.mail,\
-jakarta.persistence-api,\
-jakarta.xml.rpc-api,\
+jakarta.persistence,\
+jakarta.xml.ws,\
 java.xml.ws'
 -jpms-module-info-options: \
 ${module.name};substitute=tomcat-embed-core,\
-jakarta.ejb-api;static=true,\
+jakarta.ejb;static=true,\
 jakarta.mail;static=true,\
-jakarta.persistence-api;static=true,\
-jakarta.xml.rpc-api;static=true,\
+jakarta.persistence;static=true,\
+jakarta.xml.ws;static=true,\
 java.xml.ws;static=true
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 38d2b08b10..3b676c9e21 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -130,6 +130,10 @@
 where the value is determined only while generating the content as per
 section 9.3.2 of RFC 9110. (markt)
   
+  
+66438: Correct names of Jakarta modules in JPMS metadata.
+(markt)
+  
 
   
   


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



[Bug 66439] Update from 8.5.84 to 8.5.85 makes custom Valve dysfunctional

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Mark Thomas  ---
There is insufficient information in this report for anyone to figure out what
might be going wrong.

Please provide the simplest possible PoC (with source code) that demonstrates
the problem.

-- 
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 57830] Add support for ProxyProtocol

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

Lapo Luchini  changed:

   What|Removed |Added

 CC||l...@lapo.it

-- 
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 66439] New: Update from 8.5.84 to 8.5.85 makes custom Valve dysfunctional

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

Bug ID: 66439
   Summary: Update from 8.5.84 to 8.5.85 makes custom Valve
dysfunctional
   Product: Tomcat 8
   Version: 8.5.85
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: alexand...@gmx.net
  Target Milestone: 

After update from Tomcat 8.5.84 to 8.5.85 a custom Valve deployed below the
Context element in the ROOT.xml no longer works.



The Valve is basically a custom RewriteValve for certain application specific
paths. With Tomcat 8.5.85 it seems to be called as before but the rewritten
paths do not have an effect. Instead of serving content from the rewritten
location Tomcat answers with a 404 status code. 

Tomcat runs in embedded mode.

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