[Bug 69016] HttpURLConnection getOutputStream createCapacityException

2024-06-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69016

--- Comment #6 from Raffaele Tripodo  ---
I've been busy and away from office in these weeks. When I posted this issue, I
just wanted to submit the problem to the community.

Anyway I confirm the presence of this problem in the releases after 9.0.87
(last one working). I experiend the same problem with 9.0.89 and 9.0.90.

Beacuse you have closed this request as resolved, I guess you have found the
problem too. I hope you'll address the situation and release the fix in the
next releases.

Thanks for your support

-- 
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 69016] HttpURLConnection getOutputStream createCapacityException

2024-06-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69016

--- Comment #7 from Remy Maucherat  ---
The cause of the "bug" is that marTrailerSize is configured to -1. This used to
be allowed and used to set a "no limit" as documented, so the trailers would
really be unlimited in size. This is usually not a very good idea BTW.

However, following the last major refactoring to improve functionality (
https://github.com/apache/tomcat/commit/cbed8e1836962d43120b81ae99d8d1b349265749
), -1 is no longer an allowed value. The documentation was not fixed probably
as a result of not realizing the commit introduced that change. I'll have to
fix the documentation since there's no way to restore the previous capability.

-- 
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: maxTrailerSize can no longer be -1 after refactoring

2024-06-25 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 90dcf26ddb maxTrailerSize can no longer be -1 after refactoring
90dcf26ddb is described below

commit 90dcf26ddb64eb50ee5a97c6a49e25a4091769a4
Author: remm 
AuthorDate: Tue Jun 25 10:12:26 2024 +0200

maxTrailerSize can no longer be -1 after refactoring
---
 webapps/docs/changelog.xml   | 5 +
 webapps/docs/config/http.xml | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 97770e93e4..b8375abefe 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -136,6 +136,11 @@
 triggered if AsyncListener.onError() dispatches to a 
target
 that throws an exception. (markt)
   
+  
+Following the trailer header field refactoring, -1 is no
+longer an allowed value for maxTrailerSize. Adjust
+documentation accordingly. (remm)
+  
 
   
   
diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml
index 0b90338156..da15b3900a 100644
--- a/webapps/docs/config/http.xml
+++ b/webapps/docs/config/http.xml
@@ -573,8 +573,8 @@
 
 
   Limits the total length of trailing headers in the last chunk of
-  a chunked HTTP request. If the value is -1, no limit will be
-  imposed. If not specified, the default value of 8192 will be
+  a chunked HTTP request. This must be a positive integer value.
+  If not specified, the default value of 8192 will be
   used.
 
 


-
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: maxTrailerSize can no longer be -1 after refactoring

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 922782e60e maxTrailerSize can no longer be -1 after refactoring
922782e60e is described below

commit 922782e60edc31bae1750a36b8b2c0b2b92d7baf
Author: remm 
AuthorDate: Tue Jun 25 10:12:26 2024 +0200

maxTrailerSize can no longer be -1 after refactoring
---
 webapps/docs/changelog.xml   | 5 +
 webapps/docs/config/http.xml | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a092d2b553..a66dce58cc 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -124,6 +124,11 @@
 triggered if AsyncListener.onError() dispatches to a 
target
 that throws an exception. (markt)
   
+  
+Following the trailer header field refactoring, -1 is no
+longer an allowed value for maxTrailerSize. Adjust
+documentation accordingly. (remm)
+  
 
   
   
diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml
index 86d93ce27d..80ad9ef769 100644
--- a/webapps/docs/config/http.xml
+++ b/webapps/docs/config/http.xml
@@ -587,8 +587,8 @@
 
 
   Limits the total length of trailing headers in the last chunk of
-  a chunked HTTP request. If the value is -1, no limit will be
-  imposed. If not specified, the default value of 8192 will be
+  a chunked HTTP request. This must be a positive integer value.
+  If not specified, the default value of 8192 will be
   used.
 
 


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



(tomcat) branch 9.0.x updated: maxTrailerSize can no longer be -1 after refactoring

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 5079f614dd maxTrailerSize can no longer be -1 after refactoring
5079f614dd is described below

commit 5079f614dd45723c2d077a6c2562ac5c18c93c14
Author: remm 
AuthorDate: Tue Jun 25 10:12:26 2024 +0200

maxTrailerSize can no longer be -1 after refactoring
---
 webapps/docs/changelog.xml   | 5 +
 webapps/docs/config/http.xml | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 8248679a4d..9ed6fd0827 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -126,6 +126,11 @@
 triggered if AsyncListener.onError() dispatches to a 
target
 that throws an exception. (markt)
   
+  
+Following the trailer header field refactoring, -1 is no
+longer an allowed value for maxTrailerSize. Adjust
+documentation accordingly. (remm)
+  
 
   
   
diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml
index dd5944b63a..e591e9fc6d 100644
--- a/webapps/docs/config/http.xml
+++ b/webapps/docs/config/http.xml
@@ -593,8 +593,8 @@
 
 
   Limits the total length of trailing headers in the last chunk of
-  a chunked HTTP request. If the value is -1, no limit will be
-  imposed. If not specified, the default value of 8192 will be
+  a chunked HTTP request. This must be a positive integer value.
+  If not specified, the default value of 8192 will be
   used.
 
 


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



(tomcat) branch main updated: Add missing algorithm callback

2024-06-25 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 65131a77bc Add missing algorithm callback
65131a77bc is described below

commit 65131a77bc40c8707c77428ca2b233823c2e1ac3
Author: remm 
AuthorDate: Tue Jun 25 11:24:00 2024 +0200

Add missing algorithm callback
---
 .../apache/catalina/realm/JAASCallbackHandler.java |  8 
 test/org/apache/catalina/realm/TestJAASRealm.java  | 43 ++
 webapps/docs/changelog.xml |  4 ++
 3 files changed, 55 insertions(+)

diff --git a/java/org/apache/catalina/realm/JAASCallbackHandler.java 
b/java/org/apache/catalina/realm/JAASCallbackHandler.java
index 5d540b01d0..77de1246eb 100644
--- a/java/org/apache/catalina/realm/JAASCallbackHandler.java
+++ b/java/org/apache/catalina/realm/JAASCallbackHandler.java
@@ -97,6 +97,7 @@ public class JAASCallbackHandler implements CallbackHandler {
 this.realmName = realmName;
 this.digestA2 = digestA2;
 this.authMethod = authMethod;
+this.algorithm = algorithm;
 }
 
 // - Instance Variables
@@ -157,6 +158,11 @@ public class JAASCallbackHandler implements 
CallbackHandler {
  */
 protected final String authMethod;
 
+/**
+ * Algorithm.
+ */
+protected final String algorithm;
+
 // - Public Methods
 
 
@@ -204,6 +210,8 @@ public class JAASCallbackHandler implements CallbackHandler 
{
 cb.setText(digestA2);
 } else if (cb.getPrompt().equals("authMethod")) {
 cb.setText(authMethod);
+} else if (cb.getPrompt().equals("algorithm")) {
+cb.setText(algorithm);
 } else if (cb.getPrompt().equals("catalinaBase")) {
 
cb.setText(realm.getContainer().getCatalinaBase().getAbsolutePath());
 } else {
diff --git a/test/org/apache/catalina/realm/TestJAASRealm.java 
b/test/org/apache/catalina/realm/TestJAASRealm.java
index 8cee07d7dc..f77239ae49 100644
--- a/test/org/apache/catalina/realm/TestJAASRealm.java
+++ b/test/org/apache/catalina/realm/TestJAASRealm.java
@@ -35,6 +35,12 @@ public class TestJAASRealm extends TomcatBaseTest {
 "sufficient;\n" +
 "};";
 
+private static final String CONFIG_MEMORY =
+"MemoryLogin {\n" +
+"org.apache.catalina.realm.JAASMemoryLoginModule\n" +
+"sufficient pathname=\"tomcat-users-lm.xml\";\n" +
+"};";
+
 @Test
 public void testRealm() throws Exception {
 
@@ -67,4 +73,41 @@ public class TestJAASRealm extends TomcatBaseTest {
 Assert.assertTrue(gp.hasRole("role1"));
 }
 
+@Test
+public void testMemoryLoginModule() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File tomcatUsersXml = new File(getTemporaryDirectory(), 
"tomcat-users-lm.xml");
+try (PrintWriter writer = new PrintWriter(tomcatUsersXml)) {
+writer.write(TestMemoryRealm.CONFIG);
+}
+addDeleteOnTearDown(tomcatUsersXml);
+
+// Write login config to the temp path
+File loginConfFile = new File(getTemporaryDirectory(), 
"memoryLoginConfig.conf");
+try (PrintWriter writer = new PrintWriter(loginConfFile)) {
+writer.write(CONFIG_MEMORY.replace("tomcat-users-lm.xml", 
tomcatUsersXml.getAbsolutePath()));
+}
+addDeleteOnTearDown(loginConfFile);
+
+JAASRealm jaasRealm = new JAASRealm();
+jaasRealm.setAppName("MemoryLogin");
+jaasRealm.setCredentialHandler(new MessageDigestCredentialHandler());
+jaasRealm.setUserClassNames(GenericPrincipal.class.getName());
+jaasRealm.setRoleClassNames(GenericPrincipal.class.getName());
+jaasRealm.setConfigFile(loginConfFile.getAbsolutePath());
+Context context = tomcat.addContext("/jaastest", null);
+context.setRealm(jaasRealm);
+
+tomcat.start();
+
+Principal p = jaasRealm.authenticate("foo", "bar");
+Assert.assertNull(p);
+p = jaasRealm.authenticate("admin", "sekr3t");
+Assert.assertNotNull(p);
+Assert.assertTrue(p instanceof GenericPrincipal);
+GenericPrincipal gp = (GenericPrincipal) p;
+Assert.assertTrue(gp.hasRole("testrole"));
+}
+
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b8375abefe..ff3ef8409a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -117,6 +117,10 @@
 setCharacterEncoding(Charset) is called with
 null. (markt)
   
+  
+Add missing algorithm callback to the JAASCallbackHandler.
+(remm)
+  
 
   
   


-

(tomcat) branch 10.1.x updated: Add missing algorithm callback

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 4187b91dc4 Add missing algorithm callback
4187b91dc4 is described below

commit 4187b91dc47c5000e97caf266ed3e0c3585136bc
Author: remm 
AuthorDate: Tue Jun 25 11:24:00 2024 +0200

Add missing algorithm callback
---
 .../apache/catalina/realm/JAASCallbackHandler.java |  8 
 test/org/apache/catalina/realm/TestJAASRealm.java  | 43 ++
 webapps/docs/changelog.xml |  4 ++
 3 files changed, 55 insertions(+)

diff --git a/java/org/apache/catalina/realm/JAASCallbackHandler.java 
b/java/org/apache/catalina/realm/JAASCallbackHandler.java
index 5d540b01d0..77de1246eb 100644
--- a/java/org/apache/catalina/realm/JAASCallbackHandler.java
+++ b/java/org/apache/catalina/realm/JAASCallbackHandler.java
@@ -97,6 +97,7 @@ public class JAASCallbackHandler implements CallbackHandler {
 this.realmName = realmName;
 this.digestA2 = digestA2;
 this.authMethod = authMethod;
+this.algorithm = algorithm;
 }
 
 // - Instance Variables
@@ -157,6 +158,11 @@ public class JAASCallbackHandler implements 
CallbackHandler {
  */
 protected final String authMethod;
 
+/**
+ * Algorithm.
+ */
+protected final String algorithm;
+
 // - Public Methods
 
 
@@ -204,6 +210,8 @@ public class JAASCallbackHandler implements CallbackHandler 
{
 cb.setText(digestA2);
 } else if (cb.getPrompt().equals("authMethod")) {
 cb.setText(authMethod);
+} else if (cb.getPrompt().equals("algorithm")) {
+cb.setText(algorithm);
 } else if (cb.getPrompt().equals("catalinaBase")) {
 
cb.setText(realm.getContainer().getCatalinaBase().getAbsolutePath());
 } else {
diff --git a/test/org/apache/catalina/realm/TestJAASRealm.java 
b/test/org/apache/catalina/realm/TestJAASRealm.java
index 8cee07d7dc..f77239ae49 100644
--- a/test/org/apache/catalina/realm/TestJAASRealm.java
+++ b/test/org/apache/catalina/realm/TestJAASRealm.java
@@ -35,6 +35,12 @@ public class TestJAASRealm extends TomcatBaseTest {
 "sufficient;\n" +
 "};";
 
+private static final String CONFIG_MEMORY =
+"MemoryLogin {\n" +
+"org.apache.catalina.realm.JAASMemoryLoginModule\n" +
+"sufficient pathname=\"tomcat-users-lm.xml\";\n" +
+"};";
+
 @Test
 public void testRealm() throws Exception {
 
@@ -67,4 +73,41 @@ public class TestJAASRealm extends TomcatBaseTest {
 Assert.assertTrue(gp.hasRole("role1"));
 }
 
+@Test
+public void testMemoryLoginModule() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File tomcatUsersXml = new File(getTemporaryDirectory(), 
"tomcat-users-lm.xml");
+try (PrintWriter writer = new PrintWriter(tomcatUsersXml)) {
+writer.write(TestMemoryRealm.CONFIG);
+}
+addDeleteOnTearDown(tomcatUsersXml);
+
+// Write login config to the temp path
+File loginConfFile = new File(getTemporaryDirectory(), 
"memoryLoginConfig.conf");
+try (PrintWriter writer = new PrintWriter(loginConfFile)) {
+writer.write(CONFIG_MEMORY.replace("tomcat-users-lm.xml", 
tomcatUsersXml.getAbsolutePath()));
+}
+addDeleteOnTearDown(loginConfFile);
+
+JAASRealm jaasRealm = new JAASRealm();
+jaasRealm.setAppName("MemoryLogin");
+jaasRealm.setCredentialHandler(new MessageDigestCredentialHandler());
+jaasRealm.setUserClassNames(GenericPrincipal.class.getName());
+jaasRealm.setRoleClassNames(GenericPrincipal.class.getName());
+jaasRealm.setConfigFile(loginConfFile.getAbsolutePath());
+Context context = tomcat.addContext("/jaastest", null);
+context.setRealm(jaasRealm);
+
+tomcat.start();
+
+Principal p = jaasRealm.authenticate("foo", "bar");
+Assert.assertNull(p);
+p = jaasRealm.authenticate("admin", "sekr3t");
+Assert.assertNotNull(p);
+Assert.assertTrue(p instanceof GenericPrincipal);
+GenericPrincipal gp = (GenericPrincipal) p;
+Assert.assertTrue(gp.hasRole("testrole"));
+}
+
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a66dce58cc..b3a1d09dec 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -111,6 +111,10 @@
 Allow JAASRealm to use the configuration source to load a
 configured configFile, for easier use with testing. (remm)
   
+  
+Add missing algorithm callback to the JAAS

(tomcat) branch 9.0.x updated: Add missing algorithm callback

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new e65516a24a Add missing algorithm callback
e65516a24a is described below

commit e65516a24a1435bdb43c48e4844cfcf15b16b854
Author: remm 
AuthorDate: Tue Jun 25 11:24:00 2024 +0200

Add missing algorithm callback
---
 .../apache/catalina/realm/JAASCallbackHandler.java |  8 
 test/org/apache/catalina/realm/TestJAASRealm.java  | 43 ++
 webapps/docs/changelog.xml |  4 ++
 3 files changed, 55 insertions(+)

diff --git a/java/org/apache/catalina/realm/JAASCallbackHandler.java 
b/java/org/apache/catalina/realm/JAASCallbackHandler.java
index 5d540b01d0..77de1246eb 100644
--- a/java/org/apache/catalina/realm/JAASCallbackHandler.java
+++ b/java/org/apache/catalina/realm/JAASCallbackHandler.java
@@ -97,6 +97,7 @@ public class JAASCallbackHandler implements CallbackHandler {
 this.realmName = realmName;
 this.digestA2 = digestA2;
 this.authMethod = authMethod;
+this.algorithm = algorithm;
 }
 
 // - Instance Variables
@@ -157,6 +158,11 @@ public class JAASCallbackHandler implements 
CallbackHandler {
  */
 protected final String authMethod;
 
+/**
+ * Algorithm.
+ */
+protected final String algorithm;
+
 // - Public Methods
 
 
@@ -204,6 +210,8 @@ public class JAASCallbackHandler implements CallbackHandler 
{
 cb.setText(digestA2);
 } else if (cb.getPrompt().equals("authMethod")) {
 cb.setText(authMethod);
+} else if (cb.getPrompt().equals("algorithm")) {
+cb.setText(algorithm);
 } else if (cb.getPrompt().equals("catalinaBase")) {
 
cb.setText(realm.getContainer().getCatalinaBase().getAbsolutePath());
 } else {
diff --git a/test/org/apache/catalina/realm/TestJAASRealm.java 
b/test/org/apache/catalina/realm/TestJAASRealm.java
index 8cee07d7dc..f77239ae49 100644
--- a/test/org/apache/catalina/realm/TestJAASRealm.java
+++ b/test/org/apache/catalina/realm/TestJAASRealm.java
@@ -35,6 +35,12 @@ public class TestJAASRealm extends TomcatBaseTest {
 "sufficient;\n" +
 "};";
 
+private static final String CONFIG_MEMORY =
+"MemoryLogin {\n" +
+"org.apache.catalina.realm.JAASMemoryLoginModule\n" +
+"sufficient pathname=\"tomcat-users-lm.xml\";\n" +
+"};";
+
 @Test
 public void testRealm() throws Exception {
 
@@ -67,4 +73,41 @@ public class TestJAASRealm extends TomcatBaseTest {
 Assert.assertTrue(gp.hasRole("role1"));
 }
 
+@Test
+public void testMemoryLoginModule() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File tomcatUsersXml = new File(getTemporaryDirectory(), 
"tomcat-users-lm.xml");
+try (PrintWriter writer = new PrintWriter(tomcatUsersXml)) {
+writer.write(TestMemoryRealm.CONFIG);
+}
+addDeleteOnTearDown(tomcatUsersXml);
+
+// Write login config to the temp path
+File loginConfFile = new File(getTemporaryDirectory(), 
"memoryLoginConfig.conf");
+try (PrintWriter writer = new PrintWriter(loginConfFile)) {
+writer.write(CONFIG_MEMORY.replace("tomcat-users-lm.xml", 
tomcatUsersXml.getAbsolutePath()));
+}
+addDeleteOnTearDown(loginConfFile);
+
+JAASRealm jaasRealm = new JAASRealm();
+jaasRealm.setAppName("MemoryLogin");
+jaasRealm.setCredentialHandler(new MessageDigestCredentialHandler());
+jaasRealm.setUserClassNames(GenericPrincipal.class.getName());
+jaasRealm.setRoleClassNames(GenericPrincipal.class.getName());
+jaasRealm.setConfigFile(loginConfFile.getAbsolutePath());
+Context context = tomcat.addContext("/jaastest", null);
+context.setRealm(jaasRealm);
+
+tomcat.start();
+
+Principal p = jaasRealm.authenticate("foo", "bar");
+Assert.assertNull(p);
+p = jaasRealm.authenticate("admin", "sekr3t");
+Assert.assertNotNull(p);
+Assert.assertTrue(p instanceof GenericPrincipal);
+GenericPrincipal gp = (GenericPrincipal) p;
+Assert.assertTrue(gp.hasRole("testrole"));
+}
+
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9ed6fd0827..50101c2f04 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -111,6 +111,10 @@
 Allow JAASRealm to use the configuration source to load a
 configured configFile, for easier use with testing. (remm)
   
+  
+Add missing algorithm callback to the JAASCa

(tomcat) branch main updated (65131a77bc -> e79c8d37cc)

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


from 65131a77bc Add missing algorithm callback
 add 2664584ebb Increase test coverage of WsServerContainer
 add 7ae30b8e35 Fix issues which did not abide by Checkstyle rules
 new e79c8d37cc Merge pull request #736 from 
dsoumis/WsServerCointainerCoverage

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


Summary of changes:
 .../catalina/filters/TesterHttpServletRequest.java |  63 -
 .../websocket/server/TestWsServerContainer.java| 290 -
 2 files changed, 341 insertions(+), 12 deletions(-)


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



(tomcat) 01/01: Merge pull request #736 from dsoumis/WsServerCointainerCoverage

2024-06-25 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

commit e79c8d37cc5317dc0c19352245791fc1c5501dbe
Merge: 65131a77bc 7ae30b8e35
Author: Rémy Maucherat 
AuthorDate: Tue Jun 25 13:45:08 2024 +0200

Merge pull request #736 from dsoumis/WsServerCointainerCoverage

Increase test coverage of WsServerContainer

 .../catalina/filters/TesterHttpServletRequest.java |  63 -
 .../websocket/server/TestWsServerContainer.java| 290 -
 2 files changed, 341 insertions(+), 12 deletions(-)


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



(tomcat) 01/02: Increase test coverage of WsServerContainer

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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

commit 245710c973e639e4bc232e0c98a584436db0d69c
Author: Dimitris Soumis 
AuthorDate: Sun Jun 23 03:00:09 2024 +0300

Increase test coverage of WsServerContainer
---
 .../catalina/filters/TesterHttpServletRequest.java |  63 -
 .../websocket/server/TestWsServerContainer.java| 307 -
 2 files changed, 346 insertions(+), 24 deletions(-)

diff --git a/test/org/apache/catalina/filters/TesterHttpServletRequest.java 
b/test/org/apache/catalina/filters/TesterHttpServletRequest.java
index 449963e6ec..2f24746cfa 100644
--- a/test/org/apache/catalina/filters/TesterHttpServletRequest.java
+++ b/test/org/apache/catalina/filters/TesterHttpServletRequest.java
@@ -19,6 +19,7 @@ package org.apache.catalina.filters;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
+import java.lang.reflect.InvocationTargetException;
 import java.security.Principal;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -49,8 +50,8 @@ import jakarta.servlet.http.PushBuilder;
 
 public class TesterHttpServletRequest implements HttpServletRequest {
 
-private Map attributes = new HashMap<>();
-private Map> headers = new HashMap<>();
+private final Map attributes = new HashMap<>();
+private final Map> headers = new HashMap<>();
 private String method;
 private String scheme;
 private String serverName;
@@ -111,9 +112,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return an empty Hashmap.
+ */
 @Override
 public Map getParameterMap() {
-throw new RuntimeException("Not implemented");
+return new HashMap<>();
 }
 
 @Override
@@ -184,9 +190,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return false.
+ */
 @Override
 public boolean isSecure() {
-throw new RuntimeException("Not implemented");
+return false;
 }
 
 @Override
@@ -247,7 +258,7 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 
 @Override
 public Enumeration getHeaders(String name) {
-throw new RuntimeException("Not implemented");
+return Collections.enumeration(headers.get(name));
 }
 
 @Override
@@ -289,9 +300,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return null.
+ */
 @Override
 public String getQueryString() {
-throw new RuntimeException("Not implemented");
+return null;
 }
 
 @Override
@@ -304,9 +320,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return null.
+ */
 @Override
 public Principal getUserPrincipal() {
-throw new RuntimeException("Not implemented");
+return null;
 }
 
 @Override
@@ -314,9 +335,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return null.
+ */
 @Override
 public String getRequestURI() {
-throw new RuntimeException("Not implemented");
+return null;
 }
 
 @Override
@@ -329,9 +355,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return null.
+ */
 @Override
 public HttpSession getSession(boolean create) {
-throw new RuntimeException("Not implemented");
+return null;
 }
 
 @Override
@@ -425,10 +456,20 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return a new instance of the 
httpUpgradeHandlerClass.
+ */
 @Override
 public  T upgrade(Class 
httpUpgradeHandlerClass)
-throws IOException, ServletException {
-throw new RuntimeException("Not implemented");
+throws IOException, ServletException  {
+   

(tomcat) branch 10.1.x updated (4187b91dc4 -> e4d174e5c6)

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


from 4187b91dc4 Add missing algorithm callback
 new 245710c973 Increase test coverage of WsServerContainer
 new e4d174e5c6 Fix issues which did not abide by Checkstyle rules

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


Summary of changes:
 .../catalina/filters/TesterHttpServletRequest.java |  63 -
 .../websocket/server/TestWsServerContainer.java| 290 -
 2 files changed, 341 insertions(+), 12 deletions(-)


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



(tomcat) 02/02: Fix issues which did not abide by Checkstyle rules

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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

commit e4d174e5c6461de80a2bcfe1035d79be088b8bf1
Author: Dimitris Soumis 
AuthorDate: Mon Jun 24 15:16:59 2024 +0300

Fix issues which did not abide by Checkstyle rules
---
 .../websocket/server/TestWsServerContainer.java| 41 +-
 1 file changed, 24 insertions(+), 17 deletions(-)

diff --git a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java 
b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
index 24bae4bd7a..da2492b46b 100644
--- a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
+++ b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
@@ -16,12 +16,32 @@
  */
 package org.apache.tomcat.websocket.server;
 
+import java.lang.reflect.Field;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
 import jakarta.servlet.Filter;
 import jakarta.servlet.FilterRegistration;
 import jakarta.servlet.http.HttpServletResponse;
-import jakarta.websocket.*;
+import jakarta.websocket.ContainerProvider;
+import jakarta.websocket.Decoder;
+import jakarta.websocket.DeploymentException;
+import jakarta.websocket.Encoder;
+import jakarta.websocket.HandshakeResponse;
+import jakarta.websocket.Session;
+import jakarta.websocket.WebSocketContainer;
 import jakarta.websocket.server.ServerEndpoint;
 import jakarta.websocket.server.ServerEndpointConfig;
+
+import org.junit.Assert;
+import org.junit.Test;
+
 import org.apache.catalina.Context;
 import org.apache.catalina.LifecycleState;
 import org.apache.catalina.filters.TesterHttpServletRequest;
@@ -34,19 +54,6 @@ import org.apache.tomcat.websocket.TesterEchoServer;
 import org.apache.tomcat.websocket.TesterMessageCountClient.BasicText;
 import org.apache.tomcat.websocket.WebSocketBaseTest;
 import org.apache.tomcat.websocket.pojo.TesterUtil.SimpleClient;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.lang.reflect.Field;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Queue;
-import java.util.concurrent.ConcurrentSkipListMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
 
 public class TestWsServerContainer extends WebSocketBaseTest {
 
@@ -478,7 +485,7 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 }
 
 private static class DummyDecoder implements Decoder {
-public DummyDecoder(String ignoredParam) {
+DummyDecoder(String ignoredParam) {
 }
 }
 
@@ -560,7 +567,7 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 }
 
 private static class DummyConfigurator extends 
ServerEndpointConfig.Configurator {
-public DummyConfigurator(String ignoredParam) {
+DummyConfigurator(String ignoredParam) {
 }
 
 }
@@ -576,7 +583,7 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 public static class DummyPojo3 {
 }
 
-private static class DummyEncoder implements Encoder {
+public static class DummyEncoder implements Encoder {
 public DummyEncoder() {
 }
 }


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



(tomcat) branch 9.0.x updated (e65516a24a -> aca179e8eb)

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


from e65516a24a Add missing algorithm callback
 new 7681964ea8 Increase test coverage of WsServerContainer
 new aca179e8eb Fix issues which did not abide by Checkstyle rules

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


Summary of changes:
 .../catalina/filters/TesterHttpServletRequest.java |  62 +++-
 .../websocket/server/TestWsServerContainer.java| 311 -
 2 files changed, 361 insertions(+), 12 deletions(-)


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



(tomcat) 01/02: Increase test coverage of WsServerContainer

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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

commit 7681964ea893fbd4f5a516fe1686968151c49ed2
Author: Dimitris Soumis 
AuthorDate: Sun Jun 23 03:00:09 2024 +0300

Increase test coverage of WsServerContainer
---
 .../catalina/filters/TesterHttpServletRequest.java |  62 -
 .../websocket/server/TestWsServerContainer.java| 275 +
 2 files changed, 326 insertions(+), 11 deletions(-)

diff --git a/test/org/apache/catalina/filters/TesterHttpServletRequest.java 
b/test/org/apache/catalina/filters/TesterHttpServletRequest.java
index bf196118b3..288e754030 100644
--- a/test/org/apache/catalina/filters/TesterHttpServletRequest.java
+++ b/test/org/apache/catalina/filters/TesterHttpServletRequest.java
@@ -48,8 +48,8 @@ import javax.servlet.http.PushBuilder;
 
 public class TesterHttpServletRequest implements HttpServletRequest {
 
-private Map attributes = new HashMap<>();
-private Map> headers = new HashMap<>();
+private final Map attributes = new HashMap<>();
+private final Map> headers = new HashMap<>();
 private String method;
 private String scheme;
 private String serverName;
@@ -110,9 +110,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return an empty Hashmap.
+ */
 @Override
 public Map getParameterMap() {
-throw new RuntimeException("Not implemented");
+return new HashMap<>();
 }
 
 @Override
@@ -183,9 +188,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return false.
+ */
 @Override
 public boolean isSecure() {
-throw new RuntimeException("Not implemented");
+return false;
 }
 
 @Override
@@ -251,7 +261,7 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 
 @Override
 public Enumeration getHeaders(String name) {
-throw new RuntimeException("Not implemented");
+return Collections.enumeration(headers.get(name));
 }
 
 @Override
@@ -293,9 +303,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return null.
+ */
 @Override
 public String getQueryString() {
-throw new RuntimeException("Not implemented");
+return null;
 }
 
 @Override
@@ -308,9 +323,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return null.
+ */
 @Override
 public Principal getUserPrincipal() {
-throw new RuntimeException("Not implemented");
+return null;
 }
 
 @Override
@@ -318,9 +338,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return null.
+ */
 @Override
 public String getRequestURI() {
-throw new RuntimeException("Not implemented");
+return null;
 }
 
 @Override
@@ -333,9 +358,14 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return null.
+ */
 @Override
 public HttpSession getSession(boolean create) {
-throw new RuntimeException("Not implemented");
+return null;
 }
 
 @Override
@@ -434,10 +464,20 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
 throw new RuntimeException("Not implemented");
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return a new instance of the 
httpUpgradeHandlerClass.
+ */
 @Override
 public  T upgrade(Class 
httpUpgradeHandlerClass)
-throws IOException, ServletException {
-throw new RuntimeException("Not implemented");
+throws IOException, ServletException  {
+try {
+return 
httpUpgradeHandlerClass.getDeclaredConstructor().newInstance();
+}catch (NoSuchMethodException | InvocationTargetException | 
InstantiationException | IllegalAccessException ignore){
+
+}
+return null;
 }
 
 @Override
diff --git a/test/org/apache

(tomcat) 02/02: Fix issues which did not abide by Checkstyle rules

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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

commit aca179e8ebbbdbb142d5fe9eee9cb1e671eec4fb
Author: Dimitris Soumis 
AuthorDate: Mon Jun 24 15:16:59 2024 +0300

Fix issues which did not abide by Checkstyle rules
---
 .../catalina/filters/TesterHttpServletRequest.java |  6 +--
 .../websocket/server/TestWsServerContainer.java| 46 +++---
 2 files changed, 43 insertions(+), 9 deletions(-)

diff --git a/test/org/apache/catalina/filters/TesterHttpServletRequest.java 
b/test/org/apache/catalina/filters/TesterHttpServletRequest.java
index 288e754030..ef0d28170f 100644
--- a/test/org/apache/catalina/filters/TesterHttpServletRequest.java
+++ b/test/org/apache/catalina/filters/TesterHttpServletRequest.java
@@ -19,6 +19,7 @@ package org.apache.catalina.filters;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
+import java.lang.reflect.InvocationTargetException;
 import java.security.Principal;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -471,11 +472,10 @@ public class TesterHttpServletRequest implements 
HttpServletRequest {
  */
 @Override
 public  T upgrade(Class 
httpUpgradeHandlerClass)
-throws IOException, ServletException  {
+throws IOException, ServletException {
 try {
 return 
httpUpgradeHandlerClass.getDeclaredConstructor().newInstance();
-}catch (NoSuchMethodException | InvocationTargetException | 
InstantiationException | IllegalAccessException ignore){
-
+} catch (NoSuchMethodException | InvocationTargetException | 
InstantiationException | IllegalAccessException ignore) {
 }
 return null;
 }
diff --git a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java 
b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
index db6a24e6ee..a78894a6a1 100644
--- a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
+++ b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
@@ -16,13 +16,25 @@
  */
 package org.apache.tomcat.websocket.server;
 
+import java.lang.reflect.Field;
 import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Queue;
+import java.util.concurrent.ConcurrentSkipListMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
+import javax.servlet.Filter;
+import javax.servlet.FilterRegistration;
+import javax.servlet.http.HttpServletResponse;
 import javax.websocket.ContainerProvider;
+import javax.websocket.Decoder;
 import javax.websocket.DeploymentException;
+import javax.websocket.Encoder;
+import javax.websocket.EndpointConfig;
+import javax.websocket.HandshakeResponse;
 import javax.websocket.Session;
 import javax.websocket.WebSocketContainer;
 import javax.websocket.server.ServerEndpoint;
@@ -33,15 +45,17 @@ import org.junit.Test;
 
 import org.apache.catalina.Context;
 import org.apache.catalina.LifecycleState;
+import org.apache.catalina.filters.TesterHttpServletRequest;
+import org.apache.catalina.filters.TesterHttpServletResponse;
 import org.apache.catalina.servlets.DefaultServlet;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.tomcat.unittest.TesterServletContext;
+import org.apache.tomcat.websocket.Constants;
 import org.apache.tomcat.websocket.TesterEchoServer;
 import org.apache.tomcat.websocket.TesterMessageCountClient.BasicText;
 import org.apache.tomcat.websocket.WebSocketBaseTest;
 import org.apache.tomcat.websocket.pojo.TesterUtil.SimpleClient;
 
-
 public class TestWsServerContainer extends WebSocketBaseTest {
 
 @Test
@@ -441,7 +455,9 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 
 HttpServletResponse response = new TesterHttpServletResponse();
 
-ServerEndpointConfig sec = 
ServerEndpointConfig.Builder.create(Object.class, 
"/").subprotocols(List.of("testProtocol")).build();
+ArrayList protocols = new ArrayList<>();
+protocols.add("testProtocol");
+ServerEndpointConfig sec = 
ServerEndpointConfig.Builder.create(Object.class, 
"/").subprotocols(protocols).build();
 
 WsServerContainer container = new WsServerContainer(new 
TesterServletContext());
 
@@ -464,7 +480,9 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 
 HttpServletResponse response = new TesterHttpServletResponse();
 
-ServerEndpointConfig sec = 
ServerEndpointConfig.Builder.create(Object.class, 
"/").decoders(List.of(DummyDecoder.class)).build();
+ArrayList> decoders = new ArrayList<>();
+decoders.add(DummyDecoder.class);
+ServerEndpointConfig sec = 
ServerEndpointConfig.Builder.create(Object.class, 
"/").decoders(decoders).build();
 
 WsServerContainer container = new WsServerContainer(new 
TesterServletCo

(tomcat) branch main updated: CI Windows issue

2024-06-25 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 bf607fbea5 CI Windows issue
bf607fbea5 is described below

commit bf607fbea56da06710432f2a8a590b5029e7f206
Author: remm 
AuthorDate: Tue Jun 25 15:09:59 2024 +0200

CI Windows issue
---
 test/org/apache/catalina/realm/TestJAASRealm.java | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/realm/TestJAASRealm.java 
b/test/org/apache/catalina/realm/TestJAASRealm.java
index f77239ae49..b309baffd9 100644
--- a/test/org/apache/catalina/realm/TestJAASRealm.java
+++ b/test/org/apache/catalina/realm/TestJAASRealm.java
@@ -86,7 +86,11 @@ public class TestJAASRealm extends TomcatBaseTest {
 // Write login config to the temp path
 File loginConfFile = new File(getTemporaryDirectory(), 
"memoryLoginConfig.conf");
 try (PrintWriter writer = new PrintWriter(loginConfFile)) {
-writer.write(CONFIG_MEMORY.replace("tomcat-users-lm.xml", 
tomcatUsersXml.getAbsolutePath()));
+String path = tomcatUsersXml.getAbsolutePath();
+if (File.separatorChar == '\\') {
+path = path.replace("\\", "");
+}
+writer.write(CONFIG_MEMORY.replace("tomcat-users-lm.xml", path));
 }
 addDeleteOnTearDown(loginConfFile);
 


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



[Bug 69135] Tag files doing relative file include does not works in case tag is in jar

2024-06-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69135

--- Comment #3 from Mark Thomas  ---
Given there has been no further comment, I intend to proceed and write some
test cases and associated fixes based on comment #3

-- 
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 10.1.x updated: CI Windows issue

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 217fbf6570 CI Windows issue
217fbf6570 is described below

commit 217fbf657092ec2af04db76fab1c5b5626cb91e4
Author: remm 
AuthorDate: Tue Jun 25 15:09:59 2024 +0200

CI Windows issue
---
 test/org/apache/catalina/realm/TestJAASRealm.java | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/realm/TestJAASRealm.java 
b/test/org/apache/catalina/realm/TestJAASRealm.java
index f77239ae49..b309baffd9 100644
--- a/test/org/apache/catalina/realm/TestJAASRealm.java
+++ b/test/org/apache/catalina/realm/TestJAASRealm.java
@@ -86,7 +86,11 @@ public class TestJAASRealm extends TomcatBaseTest {
 // Write login config to the temp path
 File loginConfFile = new File(getTemporaryDirectory(), 
"memoryLoginConfig.conf");
 try (PrintWriter writer = new PrintWriter(loginConfFile)) {
-writer.write(CONFIG_MEMORY.replace("tomcat-users-lm.xml", 
tomcatUsersXml.getAbsolutePath()));
+String path = tomcatUsersXml.getAbsolutePath();
+if (File.separatorChar == '\\') {
+path = path.replace("\\", "");
+}
+writer.write(CONFIG_MEMORY.replace("tomcat-users-lm.xml", path));
 }
 addDeleteOnTearDown(loginConfFile);
 


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



(tomcat) branch 9.0.x updated: CI Windows issue

2024-06-25 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 4ed2b66178 CI Windows issue
4ed2b66178 is described below

commit 4ed2b66178b4d3f620d25ff912a21d6b4cce06af
Author: remm 
AuthorDate: Tue Jun 25 15:09:59 2024 +0200

CI Windows issue
---
 test/org/apache/catalina/realm/TestJAASRealm.java | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/realm/TestJAASRealm.java 
b/test/org/apache/catalina/realm/TestJAASRealm.java
index f77239ae49..b309baffd9 100644
--- a/test/org/apache/catalina/realm/TestJAASRealm.java
+++ b/test/org/apache/catalina/realm/TestJAASRealm.java
@@ -86,7 +86,11 @@ public class TestJAASRealm extends TomcatBaseTest {
 // Write login config to the temp path
 File loginConfFile = new File(getTemporaryDirectory(), 
"memoryLoginConfig.conf");
 try (PrintWriter writer = new PrintWriter(loginConfFile)) {
-writer.write(CONFIG_MEMORY.replace("tomcat-users-lm.xml", 
tomcatUsersXml.getAbsolutePath()));
+String path = tomcatUsersXml.getAbsolutePath();
+if (File.separatorChar == '\\') {
+path = path.replace("\\", "");
+}
+writer.write(CONFIG_MEMORY.replace("tomcat-users-lm.xml", path));
 }
 addDeleteOnTearDown(loginConfFile);
 


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



(tomcat) branch main updated: Add release date

2024-06-25 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 ead1da636f Add release date
ead1da636f is described below

commit ead1da636fedf9f922a84c1319d5288fefc85845
Author: remm 
AuthorDate: Tue Jun 25 15:45:54 2024 +0200

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

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ff3ef8409a..a55377c345 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -166,7 +166,7 @@
 
   
 
-
+
   
 
   


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



(tomcat) branch main updated: GH warnings

2024-06-25 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 75f811fc2e GH warnings
75f811fc2e is described below

commit 75f811fc2e6c034826ba8cb1c38b8595ac12f959
Author: remm 
AuthorDate: Tue Jun 25 17:59:52 2024 +0200

GH warnings
---
 .github/workflows/ci.yml  | 8 +++-
 .github/workflows/semgrep.yml | 3 +--
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7506dc9b00..9b10377fd4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -37,15 +37,13 @@ jobs:
 exclude:
   - isMain: true
 java: 17
-  - os: windows-latest
-java: 22
 name: JDK${{ matrix.java }} ${{ matrix.os }}
 runs-on: ${{ matrix.os }}
 steps:
 - name: Git Checkout
-  uses: actions/checkout@v3
+  uses: actions/checkout@v4
 - name: Set up Java
-  uses: actions/setup-java@v3
+  uses: actions/setup-java@v4
   with:
 java-version: ${{ matrix.java }}
 distribution: zulu
@@ -57,7 +55,7 @@ jobs:
   continue-on-error:
 true
 - name: Upload logs
-  uses: actions/upload-artifact@v3
+  uses: actions/upload-artifact@v4
   with:
 name: JDK${{ matrix.java }}-${{ matrix.os }}-logs
 path: output/build/logs/TEST*.txt
diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml
index 07daabec7a..04691fc341 100644
--- a/.github/workflows/semgrep.yml
+++ b/.github/workflows/semgrep.yml
@@ -26,7 +26,6 @@ on:
   - main
   - 10.1.x
   - 9.0.x
-  - 8.5.x
   # Schedule the CI job (this method uses cron syntax):
   schedule:
 - cron: '12 11 * * *' # Sets Semgrep to scan every day at 11:12 UTC.
@@ -47,5 +46,5 @@ jobs:
 if: (github.actor != 'dependabot[bot]')
 
 steps:
-  - uses: actions/checkout@v3
+  - uses: actions/checkout@v4
   - run: semgrep ci


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



(tomcat) branch main updated: ExpressionFactory.coerceToType() should throw ELException on error

2024-06-25 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 fc0e89b154 ExpressionFactory.coerceToType() should throw ELException 
on error
fc0e89b154 is described below

commit fc0e89b15453b1b451ac5cbd52aea01b901d55d4
Author: Mark Thomas 
AuthorDate: Tue Jun 25 17:02:18 2024 +0100

ExpressionFactory.coerceToType() should throw ELException on error
---
 java/org/apache/el/lang/ELSupport.java| 11 +++-
 test/org/apache/el/TestExpressionFactory.java | 36 +++
 webapps/docs/changelog.xml|  5 
 3 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/el/lang/ELSupport.java 
b/java/org/apache/el/lang/ELSupport.java
index 4aa4f4aa7e..52385ca4c0 100644
--- a/java/org/apache/el/lang/ELSupport.java
+++ b/java/org/apache/el/lang/ELSupport.java
@@ -33,6 +33,7 @@ import jakarta.el.ELContext;
 import jakarta.el.ELException;
 import jakarta.el.LambdaExpression;
 
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 
@@ -473,7 +474,15 @@ public class ELSupport {
 } else if (obj instanceof Enum) {
 return ((Enum) obj).name();
 } else {
-return obj.toString();
+try {
+return obj.toString();
+} catch (ELException e) {
+// Unlikely but you never know
+throw e;
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
+throw new ELException(t);
+}
 }
 }
 
diff --git a/test/org/apache/el/TestExpressionFactory.java 
b/test/org/apache/el/TestExpressionFactory.java
index 8df864603c..dd70f24223 100644
--- a/test/org/apache/el/TestExpressionFactory.java
+++ b/test/org/apache/el/TestExpressionFactory.java
@@ -17,6 +17,7 @@
 package org.apache.el;
 
 import jakarta.el.ELContext;
+import jakarta.el.ELException;
 import jakarta.el.ExpressionFactory;
 
 import org.junit.Assert;
@@ -45,4 +46,39 @@ public class TestExpressionFactory {
 
 factory.createValueExpression(context, "foo", null);
 }
+
+
+@Test
+public void testCoerceToTypeString() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+TestObject testObjectA = new TestObject();
+String result = factory.coerceToType(testObjectA, String.class);
+Assert.assertEquals(TestObject.OK, result);
+}
+
+
+@Test(expected = ELException.class)
+public void testCoerceToTypeStringThrowsException() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+TestObjectException testObjectA = new TestObjectException();
+factory.coerceToType(testObjectA, String.class);
+}
+
+
+private static class TestObject{
+
+private static final String OK = "OK";
+@Override
+public String toString() {
+return OK;
+}
+}
+
+private static class TestObjectException{
+
+@Override
+public String toString() {
+throw new RuntimeException();
+}
+}
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a55377c345..158fccd9bb 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -154,6 +154,11 @@
 is aware of new classes added to the java.lang package in
 Java 23. (markt)
   
+  
+Ensure that an exception in toString() still results in an
+ELException when an object is coerced to a String using
+ExpressionFactory.coerceToType(). (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: ExpressionFactory.coerceToType() should throw ELException on error

2024-06-25 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 63234fcff2 ExpressionFactory.coerceToType() should throw ELException 
on error
63234fcff2 is described below

commit 63234fcff2ba3d1bf977f818e6e4e4c17056e04a
Author: Mark Thomas 
AuthorDate: Tue Jun 25 17:02:18 2024 +0100

ExpressionFactory.coerceToType() should throw ELException on error
---
 java/org/apache/el/lang/ELSupport.java| 11 +++-
 test/org/apache/el/TestExpressionFactory.java | 36 +++
 webapps/docs/changelog.xml|  5 
 3 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/el/lang/ELSupport.java 
b/java/org/apache/el/lang/ELSupport.java
index aafb057041..cd7a38130d 100644
--- a/java/org/apache/el/lang/ELSupport.java
+++ b/java/org/apache/el/lang/ELSupport.java
@@ -35,6 +35,7 @@ import jakarta.el.ELContext;
 import jakarta.el.ELException;
 import jakarta.el.LambdaExpression;
 
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 
@@ -489,7 +490,15 @@ public class ELSupport {
 } else if (obj instanceof Enum) {
 return ((Enum) obj).name();
 } else {
-return obj.toString();
+try {
+return obj.toString();
+} catch (ELException e) {
+// Unlikely but you never know
+throw e;
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
+throw new ELException(t);
+}
 }
 }
 
diff --git a/test/org/apache/el/TestExpressionFactory.java 
b/test/org/apache/el/TestExpressionFactory.java
index 3f7e2e7f4b..034cb2f579 100644
--- a/test/org/apache/el/TestExpressionFactory.java
+++ b/test/org/apache/el/TestExpressionFactory.java
@@ -17,6 +17,7 @@
 package org.apache.el;
 
 import jakarta.el.ELContext;
+import jakarta.el.ELException;
 import jakarta.el.ExpressionFactory;
 
 import org.junit.Assert;
@@ -45,4 +46,39 @@ public class TestExpressionFactory {
 
 factory.createValueExpression(context, "foo", null);
 }
+
+
+@Test
+public void testCoerceToTypeString() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+TestObject testObjectA = new TestObject();
+String result = factory.coerceToType(testObjectA, String.class);
+Assert.assertEquals(TestObject.OK, result);
+}
+
+
+@Test(expected = ELException.class)
+public void testCoerceToTypeStringThrowsException() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+TestObjectException testObjectA = new TestObjectException();
+factory.coerceToType(testObjectA, String.class);
+}
+
+
+private static class TestObject{
+
+private static final String OK = "OK";
+@Override
+public String toString() {
+return OK;
+}
+}
+
+private static class TestObjectException{
+
+@Override
+public String toString() {
+throw new RuntimeException();
+}
+}
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b3a1d09dec..bc380db5b3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -142,6 +142,11 @@
 is aware of new classes added to the java.lang package in
 Java 23. (markt)
   
+  
+Ensure that an exception in toString() still results in an
+ELException when an object is coerced to a String using
+ExpressionFactory.coerceToType(). (markt)
+  
 
   
   


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



(tomcat) branch 9.0.x updated: ExpressionFactory.coerceToType() should throw ELException on error

2024-06-25 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new d30d353e20 ExpressionFactory.coerceToType() should throw ELException 
on error
d30d353e20 is described below

commit d30d353e20678a6ec853dc1e79ac448f4dd6c96f
Author: Mark Thomas 
AuthorDate: Tue Jun 25 17:02:18 2024 +0100

ExpressionFactory.coerceToType() should throw ELException on error
---
 java/org/apache/el/lang/ELSupport.java| 11 +++-
 test/org/apache/el/TestExpressionFactory.java | 36 +++
 webapps/docs/changelog.xml|  5 
 3 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/el/lang/ELSupport.java 
b/java/org/apache/el/lang/ELSupport.java
index 6165ccf9f5..0a97b3f9cd 100644
--- a/java/org/apache/el/lang/ELSupport.java
+++ b/java/org/apache/el/lang/ELSupport.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import javax.el.ELContext;
 import javax.el.ELException;
 
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 
@@ -484,7 +485,15 @@ public class ELSupport {
 } else if (obj instanceof Enum) {
 return ((Enum) obj).name();
 } else {
-return obj.toString();
+try {
+return obj.toString();
+} catch (ELException e) {
+// Unlikely but you never know
+throw e;
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
+throw new ELException(t);
+}
 }
 }
 
diff --git a/test/org/apache/el/TestExpressionFactory.java 
b/test/org/apache/el/TestExpressionFactory.java
index 3396342593..bde88cb2e1 100644
--- a/test/org/apache/el/TestExpressionFactory.java
+++ b/test/org/apache/el/TestExpressionFactory.java
@@ -17,6 +17,7 @@
 package org.apache.el;
 
 import javax.el.ELContext;
+import javax.el.ELException;
 import javax.el.ExpressionFactory;
 
 import org.junit.Assert;
@@ -45,4 +46,39 @@ public class TestExpressionFactory {
 
 factory.createValueExpression(context, "foo", null);
 }
+
+
+@Test
+public void testCoerceToTypeString() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+TestObject testObjectA = new TestObject();
+Object result = factory.coerceToType(testObjectA, String.class);
+Assert.assertEquals(TestObject.OK, result);
+}
+
+
+@Test(expected = ELException.class)
+public void testCoerceToTypeStringThrowsException() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+TestObjectException testObjectA = new TestObjectException();
+factory.coerceToType(testObjectA, String.class);
+}
+
+
+private static class TestObject{
+
+private static final String OK = "OK";
+@Override
+public String toString() {
+return OK;
+}
+}
+
+private static class TestObjectException{
+
+@Override
+public String toString() {
+throw new RuntimeException();
+}
+}
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 50101c2f04..8d1f2e267c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -144,6 +144,11 @@
 is aware of new classes added to the java.lang package in
 Java 23. (markt)
   
+  
+Ensure that an exception in toString() still results in an
+ELException when an object is coerced to a String using
+ExpressionFactory.coerceToType(). (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 IDE warnings

2024-06-25 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 bf81fb034a Fix IDE warnings
bf81fb034a is described below

commit bf81fb034a3a2c16befd7ad7b18f38b9017bf87c
Author: Mark Thomas 
AuthorDate: Tue Jun 25 17:19:53 2024 +0100

Fix IDE warnings
---
 test/org/apache/tomcat/websocket/server/TestWsServerContainer.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java 
b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
index da2492b46b..621b3741ba 100644
--- a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
+++ b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
@@ -485,13 +485,15 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 }
 
 private static class DummyDecoder implements Decoder {
+@SuppressWarnings("unused")
 DummyDecoder(String ignoredParam) {
 }
 }
 
 @Test
 public void testFilterRegistrationFailure() {
-new WsServerContainer(new TesterServletContext(){
+@SuppressWarnings("unused")
+Object obj = new WsServerContainer(new TesterServletContext(){
 @Override
 public FilterRegistration.Dynamic addFilter(String filterName, 
Filter filter) {
 return null;
@@ -567,6 +569,7 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 }
 
 private static class DummyConfigurator extends 
ServerEndpointConfig.Configurator {
+@SuppressWarnings("unused")
 DummyConfigurator(String ignoredParam) {
 }
 


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

2024-06-25 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 8a4b028d54 Fix IDE warnings
8a4b028d54 is described below

commit 8a4b028d5479095b15361ce0dfa07a3389ab84dd
Author: Mark Thomas 
AuthorDate: Tue Jun 25 17:19:53 2024 +0100

Fix IDE warnings
---
 test/org/apache/tomcat/websocket/server/TestWsServerContainer.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java 
b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
index da2492b46b..621b3741ba 100644
--- a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
+++ b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
@@ -485,13 +485,15 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 }
 
 private static class DummyDecoder implements Decoder {
+@SuppressWarnings("unused")
 DummyDecoder(String ignoredParam) {
 }
 }
 
 @Test
 public void testFilterRegistrationFailure() {
-new WsServerContainer(new TesterServletContext(){
+@SuppressWarnings("unused")
+Object obj = new WsServerContainer(new TesterServletContext(){
 @Override
 public FilterRegistration.Dynamic addFilter(String filterName, 
Filter filter) {
 return null;
@@ -567,6 +569,7 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 }
 
 private static class DummyConfigurator extends 
ServerEndpointConfig.Configurator {
+@SuppressWarnings("unused")
 DummyConfigurator(String ignoredParam) {
 }
 


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



(tomcat) branch 9.0.x updated: Fix IDE warnings

2024-06-25 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new d2827524c2 Fix IDE warnings
d2827524c2 is described below

commit d2827524c25ce5141330bf4ac2b5e90398707666
Author: Mark Thomas 
AuthorDate: Tue Jun 25 17:19:53 2024 +0100

Fix IDE warnings
---
 test/org/apache/tomcat/websocket/server/TestWsServerContainer.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java 
b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
index a78894a6a1..3965c6e4b9 100644
--- a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
+++ b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
@@ -490,6 +490,7 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 }
 
 private static class DummyDecoder implements Decoder {
+@SuppressWarnings("unused")
 DummyDecoder(String ignoredParam) {
 }
 
@@ -504,7 +505,8 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 
 @Test
 public void testFilterRegistrationFailure() {
-new WsServerContainer(new TesterServletContext(){
+@SuppressWarnings("unused")
+Object obj = new WsServerContainer(new TesterServletContext(){
 @Override
 public FilterRegistration.Dynamic addFilter(String filterName, 
Filter filter) {
 return null;
@@ -580,6 +582,7 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 }
 
 private static class DummyConfigurator extends 
ServerEndpointConfig.Configurator {
+@SuppressWarnings("unused")
 DummyConfigurator(String ignoredParam) {
 }
 


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



[Bug 61877] use web.xml from CATALINA_HOME by default

2024-06-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61877

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #9 from Mark Thomas  ---
No movement in 6+ years and goes against the default that configuration is read
from CATALINA_BASE.

Closing as WONTFIX.

-- 
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 58052] RewriteValve: Implement additional RewriteRule directive capabilities

2024-06-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58052

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

--- Comment #6 from Mark Thomas  ---
No further movement in 9+ years. Marking this as resolved.

-- 
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 69135] Tag files doing relative file include does not works in case tag is in jar

2024-06-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69135

--- Comment #4 from jke...@apache.org ---
Hello Mark,

Thank you very much for looking into this issue.

I agree with you on the following point: A JAR should be self-contained, and
URLs should not reference outside the package.

Then what should be considered the root path of the JAR, in case a tag within
the jar is doing an absolute file include ? 

The path I used, "/META-INF/include.jspf", is actually valid if we consider the
JAR as the root when an absolute include is done from a tag within the JAR
itself. It's reflect the exact folder structure of the final jar archive.

I'm not sure if I'm being clear, but writing some test cases will definitely
help.

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