Re: tomcat-jakartaee-migration #34 issue

2022-09-15 Thread Mark Thomas



On 15/09/2022 06:44, Han Li wrote:




2022年9月15日 04:06,Rémy Maucherat  写道:

On Wed, Sep 14, 2022 at 6:43 PM Han Li  wrote:


Hi all,

I am very sorry, I made a fatal mistake when fixing tomcat-jakartaee-migration 
#29 issue, which led to #34 issue.


Well, when you do things, you're more likely to break things. So no
need to apologize.


+1

We all make mistakes. One of the hardest things I had to get use to with 
open source was messing up in public. I was mortified the first time I 
did it. These days, I just fix whatever I broke and move on to the next 
task.


One of the reasons for stream-lining the release process is so that we 
can easily restart a release if we need to.



: )  Thanks.





I have re-fixed this issue with this solution: 
https://github.com/aooohan/tomcat-jakartaee-migration/blob/e07f9cb21b36fe44ef31cc97e39e2c1657a94424/src/main/java/org/apache/tomcat/jakartaee/Migration.java#L226-L239
 

(I 'll continue optimising code tomorrow, it's late and I'm sleepy.)

I will retest it tomorrow to make sure the problem is really fixed.

But I don't know if this will affect the release tasks , like 10.1.x or other 
version.

How will we handle this situation, possibly by continuing to release 
tomcat-jakartaee-migration 1.0.4?


With a regression, a 1.0.4 is needed, then start over the 10.1 and
10.0 release process.

I have fixed it.


I'll start the 1.0.4 release now and cancel the 10.1.x and 10.0.x releases.

Mark

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



[GitHub] [tomcat-jakartaee-migration] markt-asf commented on pull request #28: Additional Profile to Migrate Back to JEE8 from Jakarta EE

2022-09-15 Thread GitBox


markt-asf commented on PR #28:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/28#issuecomment-1247723803

   Risky, but with a suitable warning in the docs I think it will be OK.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [tomcat-jakartaee-migration] markt-asf merged pull request #28: Additional Profile to Migrate Back to JEE8 from Jakarta EE

2022-09-15 Thread GitBox


markt-asf merged PR #28:
URL: https://github.com/apache/tomcat-jakartaee-migration/pull/28


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[tomcat-jakartaee-migration] branch main updated: Additional Profile to Migrate Back to JEE8 from Jakarta EE

2022-09-15 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-jakartaee-migration.git


The following commit(s) were added to refs/heads/main by this push:
 new ddc2f11  Additional Profile to Migrate Back to JEE8 from Jakarta EE
ddc2f11 is described below

commit ddc2f1173ae9da5204913aa20199b634941e6161
Author: Steffen Blaß 
AuthorDate: Tue Jul 12 12:02:28 2022 +0200

Additional Profile to Migrate Back to JEE8 from Jakarta EE
---
 .gitignore |  1 +
 .../apache/tomcat/jakartaee/ClassConverter.java| 10 ++---
 .../org/apache/tomcat/jakartaee/EESpecProfile.java | 49 --
 .../tomcat/jakartaee/LocalStrings.properties   |  3 +-
 4 files changed, 53 insertions(+), 10 deletions(-)

diff --git a/.gitignore b/.gitignore
index 2a968e1..f723270 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ target
 *.iml
 *.ipr
 *.iws
+/bin/
diff --git a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
index f6d08e2..da9ee42 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
@@ -26,7 +26,6 @@ import java.lang.instrument.IllegalClassFormatException;
 import java.security.ProtectionDomain;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-
 import org.apache.bcel.classfile.ClassParser;
 import org.apache.bcel.classfile.Constant;
 import org.apache.bcel.classfile.ConstantUtf8;
@@ -100,10 +99,10 @@ public class ClassConverter implements Converter, 
ClassFileTransformer {
 // Jakarta EE specification classes that exist in the 
container
 String[] split = newString.split(";|<");
 for (String current : split) {
-int pos = current.indexOf("jakarta/");
+int pos = current.indexOf(profile.getTarget() + 
"/");
 boolean dotMode = false;
 if (pos < 0) {
-pos = current.indexOf("jakarta.");
+pos = current.indexOf(profile.getTarget() + 
".");
 dotMode = true;
 }
 if (pos >= 0) {
@@ -115,14 +114,15 @@ public class ClassConverter implements Converter, 
ClassFileTransformer {
 if (loader.getResource(resourceName) == null) {
 if (logger.isLoggable(Level.FINE)) {
 logger.log(Level.FINE, 
sm.getString("classConverter.skipName",
+profile.getSource(),
 
current.substring(pos).replace('/','.')));
 }
 // Cancel the replacement as the 
replacement does not exist
 String originalFragment;
 if (dotMode) {
-originalFragment = 
current.replace("jakarta.", "javax.");
+originalFragment = 
current.replace(profile.getTarget() + ".", profile.getSource() + ".");
 } else {
-originalFragment = 
current.replace("jakarta/", "javax/");
+originalFragment = 
current.replace(profile.getTarget() + "/", profile.getSource() + "/");
 }
 newString = newString.replace(current, 
originalFragment);
 }
diff --git a/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java 
b/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
index 36d201b..23eecbc 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
@@ -24,7 +24,8 @@ import java.util.regex.Pattern;
  */
 public enum EESpecProfile {
 
-TOMCAT("javax([/\\.](annotation(?![/\\.]processing)" +
+TOMCAT("javax", "jakarta", 
+"javax([/\\.](annotation(?![/\\.]processing)" +
 "|ejb" +
 "|el" +
 "|mail" +
@@ -34,7 +35,33 @@ public enum EESpecProfile {
 "|transaction(?![/\\.]xa)" +
 "|websocket))"),
 
-EE("javax([/\\.](activation" +
+EE("javax", "jakarta", 
+"javax([/\\.](activation" +
+"|annotation(?![/\\.]processing)" +
+"|batch" +
+"|decorator" +
+"|ejb" +
+"|el" +
+"|enterprise" +
+"|faces" +
+"|jms" +
+"|json" +

Re: tomcat-jakartaee-migration #34 issue

2022-09-15 Thread Han Li


> 2022年9月15日 15:43,Mark Thomas  写道:
> 
> 
> On 15/09/2022 06:44, Han Li wrote:
>>> 2022年9月15日 04:06,Rémy Maucherat  写道:
>>> 
>>> On Wed, Sep 14, 2022 at 6:43 PM Han Li  wrote:
 
 Hi all,
 
 I am very sorry, I made a fatal mistake when fixing 
 tomcat-jakartaee-migration #29 issue, which led to #34 issue.
>>> 
>>> Well, when you do things, you're more likely to break things. So no
>>> need to apologize.
> 
> +1
> 
> We all make mistakes. One of the hardest things I had to get use to with open 
> source was messing up in public. I was mortified the first time I did it. 
> These days, I just fix whatever I broke and move on to the next task.
> 
> One of the reasons for stream-lining the release process is so that we can 
> easily restart a release if we need to.

: ) Thanks Mark.

I feel more confident to continue doing what I am interested.

Han
> 
>> : ) Thanks.
>>> 
 I have re-fixed this issue with this solution: 
 https://github.com/aooohan/tomcat-jakartaee-migration/blob/e07f9cb21b36fe44ef31cc97e39e2c1657a94424/src/main/java/org/apache/tomcat/jakartaee/Migration.java#L226-L239
  
 
 (I 'll continue optimising code tomorrow, it's late and I'm sleepy.)
 
 I will retest it tomorrow to make sure the problem is really fixed.
 
 But I don't know if this will affect the release tasks , like 10.1.x or 
 other version.
 
 How will we handle this situation, possibly by continuing to release 
 tomcat-jakartaee-migration 1.0.4?
>>> 
>>> With a regression, a 1.0.4 is needed, then start over the 10.1 and
>>> 10.0 release process.
>> I have fixed it.
> 
> I'll start the 1.0.4 release now and cancel the 10.1.x and 10.0.x releases.
> 
> Mark
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org 
> 
> For additional commands, e-mail: dev-h...@tomcat.apache.org 
> 


[tomcat-jakartaee-migration] branch main updated (ddc2f11 -> 2c0552a)

2022-09-15 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-jakartaee-migration.git


from ddc2f11  Additional Profile to Migrate Back to JEE8 from Jakarta EE
 new d6ed7d7  Add #28 to change log and expand usage notes
 new 41a9060  Add Checkstyle to build - configuration based on Tomcat 10.1.x
 new 2c0552a  Fix Checkstyle errors

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:
 CHANGES.md |  1 +
 pom.xml| 21 +
 res/checkstyle/checkstyle.xml  | 93 ++
 res/checkstyle/header-al2.txt  | 19 +
 .../org/apache/tomcat/jakartaee/AntHandler.java|  4 +-
 .../apache/tomcat/jakartaee/ClassConverter.java|  1 +
 .../org/apache/tomcat/jakartaee/EESpecProfile.java | 10 +--
 .../org/apache/tomcat/jakartaee/GlobMatcher.java   |  8 +-
 .../org/apache/tomcat/jakartaee/Migration.java | 13 ++-
 .../tomcat/jakartaee/LocalStrings.properties   | 10 ++-
 10 files changed, 159 insertions(+), 21 deletions(-)
 create mode 100644 res/checkstyle/checkstyle.xml
 create mode 100644 res/checkstyle/header-al2.txt


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



[tomcat-jakartaee-migration] 01/03: Add #28 to change log and expand usage notes

2022-09-15 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-jakartaee-migration.git

commit d6ed7d74cf64812fe198f631fb88c70351dbbef7
Author: Mark Thomas 
AuthorDate: Thu Sep 15 09:20:02 2022 +0100

Add #28 to change log and expand usage notes
---
 CHANGES.md |  1 +
 .../org/apache/tomcat/jakartaee/LocalStrings.properties| 10 ++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index d724e8d..486a4c7 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -3,6 +3,7 @@
 ## 1.0.4 (in progress)
 
 - Correct a wrong implementation in the previous fix for 
[#29](https://github.com/apache/tomcat-jakartaee-migration/issues/29) (lihan)
+- Add support for a JEE8 profile that attempts to migrate code using the 
Jakarta EE APIs to Java EE 8. Note that this will fail if the code uses any 
APIs added in Jakarta EE 10 onwards. PR #28 provided by blasss.
 
 ## 1.0.3
 
diff --git 
a/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties 
b/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
index d3a63bc..6ee3665 100644
--- a/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
+++ b/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 classConverter.converted=Migrated class [{0}]
-classConverter.noConversion=No conversion necessary for [{0}] 
+classConverter.noConversion=No conversion necessary for [{0}]
 classConverter.skipName=Skip conversion of class usage from the [{0}] 
namespace to [{1}] as it is not accessible to the classloader
 
 migration.archive.complete=Migration finished for archive [{0}]
@@ -38,7 +38,9 @@ where options includes:\n\
 \-profile=\n\
 \TOMCAT (default) to convert Java EE APIs provided by Tomcat\n\
 \EE to convert all Java EE APIs\n\
-\JEE8 to convert back to old Java EE8 APIs\n\
+\JEE8 to convert back to old Java EE8 APIs. Note that the\n\
+\resulting classes will not work if the classes to be\n\
+\migrated use any APIs added in Jakarta EE 10 onwards.\n\
 \-zipInMemory\n\
 \By default zip format archives (.zip, jar, .war, .ear, 
etc.)\n\
 \are processed as streams. This is more efficient but is not\n\
@@ -49,7 +51,7 @@ where options includes:\n\
 \able to handle a wider range of zip archive structures.
 migration.warnSignatureRemoval=Removed cryptographic signature from JAR file
 
-passThroughConverter.noConversion=No conversion necessary for [{0}] 
+passThroughConverter.noConversion=No conversion necessary for [{0}]
 
 textConverter.converted=Migrated text file [{0}]
-textConverter.noConversion=No conversion necessary for [{0}] 
+textConverter.noConversion=No conversion necessary for [{0}]


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



[tomcat-jakartaee-migration] 03/03: Fix Checkstyle errors

2022-09-15 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-jakartaee-migration.git

commit 2c0552ab668100dfb5677c366d43f64f49470d5d
Author: Mark Thomas 
AuthorDate: Thu Sep 15 09:20:47 2022 +0100

Fix Checkstyle errors
---
 src/main/java/org/apache/tomcat/jakartaee/AntHandler.java   |  4 ++--
 .../java/org/apache/tomcat/jakartaee/ClassConverter.java|  1 +
 .../java/org/apache/tomcat/jakartaee/EESpecProfile.java | 10 +-
 src/main/java/org/apache/tomcat/jakartaee/GlobMatcher.java  |  8 ++--
 src/main/java/org/apache/tomcat/jakartaee/Migration.java| 13 +
 5 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/AntHandler.java 
b/src/main/java/org/apache/tomcat/jakartaee/AntHandler.java
index e7747b7..5946226 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/AntHandler.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/AntHandler.java
@@ -27,11 +27,11 @@ import org.apache.tools.ant.Task;
 /**
  * JUL log handler redirecting the messages logged to Ant.
  */
- class AntHandler extends Handler {
+class AntHandler extends Handler {
 
 private final Task task;
 
-public AntHandler(Task task) {
+AntHandler(Task task) {
 this.task = task;
 }
 
diff --git a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
index da9ee42..8b4116d 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
@@ -26,6 +26,7 @@ import java.lang.instrument.IllegalClassFormatException;
 import java.security.ProtectionDomain;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+
 import org.apache.bcel.classfile.ClassParser;
 import org.apache.bcel.classfile.Constant;
 import org.apache.bcel.classfile.ConstantUtf8;
diff --git a/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java 
b/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
index 23eecbc..8ed0d91 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
@@ -24,7 +24,7 @@ import java.util.regex.Pattern;
  */
 public enum EESpecProfile {
 
-TOMCAT("javax", "jakarta", 
+TOMCAT("javax", "jakarta",
 "javax([/\\.](annotation(?![/\\.]processing)" +
 "|ejb" +
 "|el" +
@@ -35,7 +35,7 @@ public enum EESpecProfile {
 "|transaction(?![/\\.]xa)" +
 "|websocket))"),
 
-EE("javax", "jakarta", 
+EE("javax", "jakarta",
 "javax([/\\.](activation" +
 "|annotation(?![/\\.]processing)" +
 "|batch" +
@@ -60,7 +60,7 @@ public enum EESpecProfile {
 "|websocket" +
 "|ws[/\\.]rs" +
 "|xml[/\\.](bind|soap|ws)))"),
-JEE8("jakarta", "javax", 
+JEE8("jakarta", "javax",
 "jakarta([/\\.](activation" +
 "|annotation(?![/\\.]processing)" +
 "|batch" +
@@ -100,12 +100,12 @@ public enum EESpecProfile {
 Matcher m = pattern.matcher(name);
 return m.replaceAll(target + "$1");
 }
-
+
 public String getSource()
 {
 return source;
 }
-
+
 public String getTarget()
 {
 return target;
diff --git a/src/main/java/org/apache/tomcat/jakartaee/GlobMatcher.java 
b/src/main/java/org/apache/tomcat/jakartaee/GlobMatcher.java
index 33dc338..87bff59 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/GlobMatcher.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/GlobMatcher.java
@@ -233,11 +233,7 @@ public final class GlobMatcher {
 return true;
 }
 
-private static boolean different(
-boolean caseSensitive, char ch, char other) {
-return caseSensitive
-? ch != other
-: Character.toUpperCase(ch) != Character.toUpperCase(other);
+private static boolean different(boolean caseSensitive, char ch, char 
other) {
+return caseSensitive ? ch != other : Character.toUpperCase(ch) != 
Character.toUpperCase(other);
 }
-
 }
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index d8b899c..35bfcbe 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -195,7 +195,7 @@ public class Migration {
 boolean inplace = src.equals(dest);
 if (!inplace) {
 try (InputStream is = new FileInputStream(src);
- OutputStream os = new FileOutputStream(dest)) {
+OutputStream os = new FileOutputStream(dest)) {
 migrateStream(src.getName(), is, os);
 }
 } else {
@@ -283,8 +283,12 @@ public class Mi

[tomcat-jakartaee-migration] 02/03: Add Checkstyle to build - configuration based on Tomcat 10.1.x

2022-09-15 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-jakartaee-migration.git

commit 41a9060cd0fde5d4e70f781d2581c894c1381146
Author: Mark Thomas 
AuthorDate: Thu Sep 15 09:20:38 2022 +0100

Add Checkstyle to build - configuration based on Tomcat 10.1.x
---
 pom.xml   | 21 ++
 res/checkstyle/checkstyle.xml | 93 +++
 res/checkstyle/header-al2.txt | 19 +
 3 files changed, 133 insertions(+)

diff --git a/pom.xml b/pom.xml
index 18a5ca6..8a92cf2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -320,6 +320,27 @@
   
 
   
+  
+org.apache.maven.plugins
+maven-checkstyle-plugin
+3.2.0
+
+  res/checkstyle/checkstyle.xml
+  res/checkstyle/header-al2.txt
+  true
+  true
+  false
+
+
+  
+validate
+validate
+
+  check
+
+  
+
+  
 
   
 
diff --git a/res/checkstyle/checkstyle.xml b/res/checkstyle/checkstyle.xml
new file mode 100644
index 000..f79466a
--- /dev/null
+++ b/res/checkstyle/checkstyle.xml
@@ -0,0 +1,93 @@
+
+
+https://checkstyle.org/dtds/configuration_1_3.dtd";>
+
+  
+  
+  
+
+  
+  
+
+
+
+  
+
+  
+  
+  
+
+
+  
+
+  
+
+
+
+
+
+
+
+
+
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
+  
+
diff --git a/res/checkstyle/header-al2.txt b/res/checkstyle/header-al2.txt
new file mode 100644
index 000..7234793
--- /dev/null
+++ b/res/checkstyle/header-al2.txt
@@ -0,0 +1,19 @@
+^<\?xml.*>$
+^@echo off$
+^#!
+^\W*$
+^(rem)?\W*Licensed to the Apache Software Foundation \(ASF\) under one or more$
+^(rem)?\W*contributor license agreements\.  See the NOTICE file distributed 
with$
+^(rem)?\W*this work for additional information regarding copyright ownership\.$
+^(rem)?\W*The ASF licenses this file to You under the Apache License, Version 
2\.0$
+^(rem)?\W*\(the "License"\); you may not use this file except in compliance 
with$
+^(rem)?\W*the License\.  You may obtain a copy of the License at$
+^(rem)?\W*$
+^(rem)?\W*http://www.apache.org/licenses/LICENSE-2\.0$
+^(rem)?\W*$
+^(rem)?\W*Unless required by applicable law or agreed to in writing, software$
+^(rem)?\W*distributed under the License is distributed on an "AS IS" BASIS,$
+^(rem)?\W*WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied\.$
+^(rem)?\W*See the License for the specific language governing permissions and$
+^(rem)?\W*limitations under the License\.$
+^(rem)?\W*$
\ No newline at end of file


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



[tomcat-jakartaee-migration] branch main updated: Update change log

2022-09-15 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-jakartaee-migration.git


The following commit(s) were added to refs/heads/main by this push:
 new 7b29cba  Update change log
7b29cba is described below

commit 7b29cba3ddbf98ddc968301288c32560669b9fea
Author: Mark Thomas 
AuthorDate: Thu Sep 15 09:21:28 2022 +0100

Update change log
---
 CHANGES.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 486a4c7..8516da8 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -3,7 +3,8 @@
 ## 1.0.4 (in progress)
 
 - Correct a wrong implementation in the previous fix for 
[#29](https://github.com/apache/tomcat-jakartaee-migration/issues/29) (lihan)
-- Add support for a JEE8 profile that attempts to migrate code using the 
Jakarta EE APIs to Java EE 8. Note that this will fail if the code uses any 
APIs added in Jakarta EE 10 onwards. PR #28 provided by blasss.
+- Add support for a JEE8 profile that attempts to migrate code using the 
Jakarta EE APIs to Java EE 8. Note that this will fail if the code uses any 
APIs added in Jakarta EE 10 onwards. PR #28 provided by blasss. (markt)
+- Add Checkstyle to the build process. (markt)
 
 ## 1.0.3
 


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



[tomcat-jakartaee-migration] branch main updated: Prep for 1.0.4 release

2022-09-15 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-jakartaee-migration.git


The following commit(s) were added to refs/heads/main by this push:
 new fd4512e  Prep for 1.0.4 release
fd4512e is described below

commit fd4512e221797161e00a11bf4c184c235a6595c3
Author: Mark Thomas 
AuthorDate: Thu Sep 15 09:22:37 2022 +0100

Prep for 1.0.4 release
---
 CHANGES.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 8516da8..5c272c1 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,6 @@
 # Tomcat Migration Tool for Jakarta EE - Changelog
 
-## 1.0.4 (in progress)
+## 1.0.4
 
 - Correct a wrong implementation in the previous fix for 
[#29](https://github.com/apache/tomcat-jakartaee-migration/issues/29) (lihan)
 - Add support for a JEE8 profile that attempts to migrate code using the 
Jakarta EE APIs to Java EE 8. Note that this will fail if the code uses any 
APIs added in Jakarta EE 10 onwards. PR #28 provided by blasss. (markt)


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



[tomcat-jakartaee-migration] branch main updated: Correct tag attribute.

2022-09-15 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-jakartaee-migration.git


The following commit(s) were added to refs/heads/main by this push:
 new bcde2d4  Correct tag attribute.
bcde2d4 is described below

commit bcde2d4f0284c95f6b9a3b53593210ac0b8f2215
Author: Mark Thomas 
AuthorDate: Thu Sep 15 09:28:01 2022 +0100

Correct tag attribute.

This should point to main on the main branch and only reference a tag in
a tag.
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 8a92cf2..25cae31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,7 +62,7 @@
   
 
scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
 
scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
-1.0.2
+main
 
https://gitbox.apache.org/repos/asf?p=tomcat-jakartaee-migration.git
   
 


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



[tomcat-jakartaee-migration] branch main updated: [maven-release-plugin] prepare release 1.0.4

2022-09-15 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-jakartaee-migration.git


The following commit(s) were added to refs/heads/main by this push:
 new a74aad3  [maven-release-plugin] prepare release 1.0.4
a74aad3 is described below

commit a74aad315b8af81de0fa1837acc2adb278f5cb5a
Author: Mark Thomas 
AuthorDate: Thu Sep 15 09:30:06 2022 +0100

[maven-release-plugin] prepare release 1.0.4
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 25cae31..c73523e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
 
   org.apache.tomcat
   jakartaee-migration
-  1.0.4-SNAPSHOT
+  1.0.4
   Apache Tomcat Migration Tool for Jakarta EE
 
   The aim of the tool is to take a web application written for 
Java EE 8 that
@@ -62,7 +62,7 @@
   
 
scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
 
scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
-main
+1.0.4
 
https://gitbox.apache.org/repos/asf?p=tomcat-jakartaee-migration.git
   
 


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



[tomcat-jakartaee-migration] annotated tag 1.0.4 created (now ba3ed72)

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to annotated tag 1.0.4
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


  at ba3ed72  (tag)
 tagging a74aad315b8af81de0fa1837acc2adb278f5cb5a (commit)
 replaces 1.0.3
  by Mark Thomas
  on Thu Sep 15 09:35:06 2022 +0100

- Log -
[maven-release-plugin] copy for tag 1.0.4
---

No new revisions were added by this update.


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



[tomcat-jakartaee-migration] branch main updated: [maven-release-plugin] prepare for next development iteration

2022-09-15 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-jakartaee-migration.git


The following commit(s) were added to refs/heads/main by this push:
 new a4270be  [maven-release-plugin] prepare for next development iteration
a4270be is described below

commit a4270be28b7d002a68ea23dd39f430c0be2391c0
Author: Mark Thomas 
AuthorDate: Thu Sep 15 09:35:18 2022 +0100

[maven-release-plugin] prepare for next development iteration
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c73523e..4b63666 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
 
   org.apache.tomcat
   jakartaee-migration
-  1.0.4
+  1.0.5-SNAPSHOT
   Apache Tomcat Migration Tool for Jakarta EE
 
   The aim of the tool is to take a web application written for 
Java EE 8 that


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



[tomcat-jakartaee-migration] branch main updated: prepare for next development iteration

2022-09-15 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-jakartaee-migration.git


The following commit(s) were added to refs/heads/main by this push:
 new fa7450c  prepare for next development iteration
fa7450c is described below

commit fa7450cbd5a58e9d0dc7e27bbbf2be0d8a49c141
Author: Mark Thomas 
AuthorDate: Thu Sep 15 09:35:18 2022 +0100

prepare for next development iteration
---
 CHANGES.md | 4 
 pom.xml| 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 5c272c1..2d4e2cf 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,9 @@
 # Tomcat Migration Tool for Jakarta EE - Changelog
 
+## 1.0.5
+
+- TBD
+
 ## 1.0.4
 
 - Correct a wrong implementation in the previous fix for 
[#29](https://github.com/apache/tomcat-jakartaee-migration/issues/29) (lihan)
diff --git a/pom.xml b/pom.xml
index 4b63666..e3219bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,7 +62,7 @@
   
 
scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
 
scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
-1.0.4
+main
 
https://gitbox.apache.org/repos/asf?p=tomcat-jakartaee-migration.git
   
 


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



svn commit: r56824 - /release/tomcat/jakartaee-migration/v1.0.1/

2022-09-15 Thread markt
Author: markt
Date: Thu Sep 15 08:53:56 2022
New Revision: 56824

Log:
Drop 1.0.1 from CDN

Removed:
release/tomcat/jakartaee-migration/v1.0.1/


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



svn commit: r56825 - in /dev/tomcat/jakartaee-migration/v1.0.4: ./ binaries/ source/

2022-09-15 Thread markt
Author: markt
Date: Thu Sep 15 08:54:47 2022
New Revision: 56825

Log:
Upload 1.0.4 for voting

Added:
dev/tomcat/jakartaee-migration/v1.0.4/
dev/tomcat/jakartaee-migration/v1.0.4/binaries/

dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz
   (with props)

dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz.asc

dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz.sha512

dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.zip
   (with props)

dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.zip.asc

dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.zip.sha512

dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-shaded.jar
   (with props)

dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-shaded.jar.asc

dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-shaded.jar.sha512
dev/tomcat/jakartaee-migration/v1.0.4/source/

dev/tomcat/jakartaee-migration/v1.0.4/source/jakartaee-migration-1.0.4-src.tar.gz
   (with props)

dev/tomcat/jakartaee-migration/v1.0.4/source/jakartaee-migration-1.0.4-src.tar.gz.asc

dev/tomcat/jakartaee-migration/v1.0.4/source/jakartaee-migration-1.0.4-src.tar.gz.sha512

dev/tomcat/jakartaee-migration/v1.0.4/source/jakartaee-migration-1.0.4-src.zip  
 (with props)

dev/tomcat/jakartaee-migration/v1.0.4/source/jakartaee-migration-1.0.4-src.zip.asc

dev/tomcat/jakartaee-migration/v1.0.4/source/jakartaee-migration-1.0.4-src.zip.sha512

Added: 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz.asc
==
--- 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz.asc
 (added)
+++ 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz.asc
 Thu Sep 15 08:54:47 2022
@@ -0,0 +1,17 @@
+-BEGIN PGP SIGNATURE-
+Comment: GPGTools - http://gpgtools.org
+
+iQIzBAABCgAdFiEEqcXfTSLpmZjZh1pREMAcWi9gWecFAmMi5+YACgkQEMAcWi9g
+WefKYw//aSzjnokFXhVttjJpmjaHV4CZuc2Cgzt110CfewhQwQjTO+VEJQz3AH3H
+Zq+NQCQFFUJrnw9c7sv5/o7JmyNUvPRWV/YhOqf3oydmPUUuoqPbISwqr5tWUYJT
+FZcVV0owe/eVuIAASxB1BDNYm6qTzI1i8Nfi536KgvGk07AusyPQR1dVp3BBzbbS
+9xAY/tuEM5VeKGGLFOI1UgeAPDPhGqhqNWF5wK8O5BV4vPF8MrH11u3tSbIPBnfD
+uGMMR4nV1IXTuqKB24BMGkHnJTe5q3ht0d8AQ6AJw1eCC5Yd8GsojK0j6W8picyy
+piduk2zslryjZ5trizQ+QQjzPckDNal5vT6Duq37TL9ixDSq6lbgTM2APxL5sudH
+tJqfO3XNnqX64AJlC5ynsezwWroEjW+Fnqo27DGkA4vvlVrAB/PP5HOo0uRZGTT3
+E6x3u/cWN8ZCrtJlRD7+PxdXyU4cEuQU1cLMyS/8ImFHt3Yp6Yp23cwq1YpJ+E85
+LqRuZ6kWm6z64n4J6xDgsCgcbAWWOWCh92/WBrr4be32ok1rE6OHRkaqxwd9dc17
+m+ApYKlXIQG5J0mhqDcsye+iXbHvwziWPu3f8VY7586EYDnZQpLMVeSNyisDg9XS
+jMIIG/N3FlIfg5UHM1IxmSRAzaPka7PKmfkNgIUfPnm6UYQqank=
+=OSTC
+-END PGP SIGNATURE-

Added: 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz.sha512
==
--- 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz.sha512
 (added)
+++ 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.tar.gz.sha512
 Thu Sep 15 08:54:47 2022
@@ -0,0 +1 @@
+37f9b0744f4d419c134750e79d4b9abc01984b5c55436231630d9e7be4f5eaf07984c928c96a4d499e228ad1dbdbc881fb636f32474f13ee92a8d9afbddd04aa
 *jakartaee-migration-1.0.4-bin.tar.gz
\ No newline at end of file

Added: 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.zip
==
Binary file - no diff available.

Propchange: 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.zip
--
svn:mime-type = application/octet-stream

Added: 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.zip.asc
==
--- 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.zip.asc
 (added)
+++ 
dev/tomcat/jakartaee-migration/v1.0.4/binaries/jakartaee-migration-1.0.4-bin.zip.asc
 Thu Sep 15 08:54:47 2022
@@ -0,0 +1,17 @@
+-BEGIN PGP SIGNATURE-
+Comment: GPGTools - http://gpgtools.org
+
+iQIzBAABCgAdFiEEqcXfTSLpmZjZh1pREMAcWi9gWecFAmMi5+YACgkQEMAcWi

[VOTE][CANCELLED] Release Apache Tomcat 10.1.0-M19

2022-09-15 Thread Mark Thomas

Vote cancelled due to regression in migration tool for Jakarta EE.

Mark


On 13/09/2022 18:09, Mark Thomas wrote:

The proposed Apache Tomcat 10.1.0-M19 release is now available for
voting.

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.


The notable changes compared to 10.1.0-M17 are:

- Add support for authenticating WebSocket clients with an HTTP forward
   proxy when establishing a connection to a WebSocket endpoint via a
   forward proxy that requires authentication. Based on a patch provided
   by Joe Mokos.

- Various fixes for edge case bugs in EL processing

- Improve host header handling for HTTP/2 requests

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

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

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

The tag is:
https://github.com/apache/tomcat/tree/10.1.0-M19
ff0b6c231b7a1a416688346fdd299a3d6cfb5b64


The proposed 10.1.0-M19 release is:
[ ] Broken - do not release
[ ] Beta - go ahead and release as 10.1.0-M19 (beta)

-
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



[VOTE][CANCELLED] Release Apache Tomcat 10.0.24

2022-09-15 Thread Mark Thomas

Vote cancelled due to regression in migration tool for Jakarta EE.

Mark

On 14/09/2022 14:40, Mark Thomas wrote:

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

Apache Tomcat 10.0.x implements Jakarta EE 9 and, as such, the primary
package for all the specification APIs has changed from javax.* to 
jakarta.*


Applications that run on Tomcat 9 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


The notable changes compared to 10.0.23 are:

- Add support for authenticating WebSocket clients with an HTTP forward
   proxy when establishing a connection to a WebSocket endpoint via a
   forward proxy that requires authentication. Based on a patch provided
   by Joe Mokos.

- Various fixes for edge case bugs in EL processing

- Improve host header handling for HTTP/2 requests

Along with lots of other bug fixes and improvements.

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

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

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

The tag is:
https://github.com/apache/tomcat/tree/10.0.24
74a5bd703f1d477548449bd400721e960cc4514c

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

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



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



[VOTE] Apache Tomcat migration tool for Jakarta EE 1.0.4

2022-09-15 Thread Mark Thomas

The proposed Apache Tomcat migration tool for Jakarta EE 1.0.4 is now
available for voting.

The significant changes since 1.0.3 are:

- Issue #26 - Re-fix
- PR #28 - Add Jakarta EE -. Java EE profile (with warnings)
- Add checkstyle

It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v1.0.4/

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

The tag is:
https://github.com/apache/tomcat-jakartaee-migration/tree/1.0.4
a74aad315b8af81de0fa1837acc2adb278f5cb5a

The proposed 1.0.4 release is:

[ ] -1: Broken. Do not release because...
[ ] +1: Acceptable. Go ahead and release.

Thanks,

Mark

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



svn commit: r56826 - in /dev/tomcat/tomcat-10: v10.0.24/ v10.1.0-M19/

2022-09-15 Thread markt
Author: markt
Date: Thu Sep 15 09:06:44 2022
New Revision: 56826

Log:
Drop 10.0.24 and 10.1.0-M19 - votes cancelled

Removed:
dev/tomcat/tomcat-10/v10.0.24/
dev/tomcat/tomcat-10/v10.1.0-M19/


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



[tomcat] branch main updated: Update numbers

2022-09-15 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 b95712c293 Update numbers
b95712c293 is described below

commit b95712c2937e83b4ec1c0d91bec8aa7932b30880
Author: remm 
AuthorDate: Thu Sep 15 11:09:21 2022 +0200

Update numbers

Moving to 20 "soon", but with the Panama branches.
---
 modules/openssl-foreign/README.md | 10 +-
 modules/openssl-foreign/pom.xml   |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/openssl-foreign/README.md 
b/modules/openssl-foreign/README.md
index 0ee967b515..600cb8d575 100644
--- a/modules/openssl-foreign/README.md
+++ b/modules/openssl-foreign/README.md
@@ -2,14 +2,14 @@
 
 ## This module is experimental
 
-It uses the JEP 424 API. More details on this API are available
-at `https://openjdk.java.net/jeps/424`.
+It uses the JEP XXX API. More details on this API are available
+at `https://openjdk.java.net/jeps/XXX`.
 
-## Building the JDK with the JEP 424 API
+## Building the JDK with the JEP XXX API
 
 Clone `https://github.com/openjdk/jdk/` in some location and
-checkout the `foreign-preview` branch. This is a Java 19 development JVM
-with the JEP 424 API. It may fail to build. When this happens, step back
+checkout the mais branch. This is a Java 20 development JVM
+with the JEP XXX API. It may fail to build. When this happens, step back
 one commit at a time until it does.
 
 ```
diff --git a/modules/openssl-foreign/pom.xml b/modules/openssl-foreign/pom.xml
index de83ee511e..28432f6e2d 100644
--- a/modules/openssl-foreign/pom.xml
+++ b/modules/openssl-foreign/pom.xml
@@ -78,8 +78,8 @@
 org.apache.maven.plugins
 maven-compiler-plugin
 
-19
-19
+20
+20
 
 --enable-preview
 


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



Re: [VOTE] Apache Tomcat migration tool for Jakarta EE 1.0.4

2022-09-15 Thread Han Li



> 2022年9月15日 17:06,Mark Thomas  写道:
> 
> The proposed Apache Tomcat migration tool for Jakarta EE 1.0.4 is now
> available for voting.
> 
> The significant changes since 1.0.3 are:
> 
> - Issue #26 - Re-fix
> - PR #28 - Add Jakarta EE -. Java EE profile (with warnings)
> - Add checkstyle
> 
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v1.0.4/
> 
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1392/
> 
> The tag is:
> https://github.com/apache/tomcat-jakartaee-migration/tree/1.0.4
> a74aad315b8af81de0fa1837acc2adb278f5cb5a
> 
> The proposed 1.0.4 release is:
> 
> [ ] -1: Broken. Do not release because...
> [ X] +1: Acceptable. Go ahead and release.

Unit tests pass.

Sample application that has migrated which runs properly on Tomcat 10.0.23 with 
some SORTED jars.

Han

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



Re: [VOTE] Apache Tomcat migration tool for Jakarta EE 1.0.4

2022-09-15 Thread Rémy Maucherat
On Thu, Sep 15, 2022 at 11:06 AM Mark Thomas  wrote:
>
> The proposed Apache Tomcat migration tool for Jakarta EE 1.0.4 is now
> available for voting.
>
> The significant changes since 1.0.3 are:
>
> - Issue #26 - Re-fix
> - PR #28 - Add Jakarta EE -. Java EE profile (with warnings)
> - Add checkstyle
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v1.0.4/
>
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1392/
>
> The tag is:
> https://github.com/apache/tomcat-jakartaee-migration/tree/1.0.4
> a74aad315b8af81de0fa1837acc2adb278f5cb5a
>
> The proposed 1.0.4 release is:
>
> [ ] -1: Broken. Do not release because...
> [X] +1: Acceptable. Go ahead and release.

Rémy

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



Re: [VOTE] Apache Tomcat migration tool for Jakarta EE 1.0.4

2022-09-15 Thread Felix Schumacher


Am 15.09.22 um 11:06 schrieb Mark Thomas:

The proposed Apache Tomcat migration tool for Jakarta EE 1.0.4 is now
available for voting.

The significant changes since 1.0.3 are:

- Issue #26 - Re-fix
- PR #28 - Add Jakarta EE -. Java EE profile (with warnings)
- Add checkstyle

It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v1.0.4/

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

The tag is:
https://github.com/apache/tomcat-jakartaee-migration/tree/1.0.4
a74aad315b8af81de0fa1837acc2adb278f5cb5a

The proposed 1.0.4 release is:

[ ] -1: Broken. Do not release because...
[ ] +1: Acceptable. Go ahead and release.


When I try to build the sources from the tar.gz maven complains about 
missing checkstyle files:


[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-checkstyle-plugin:3.2.0:check (validate) 
on project jakartaee-migration: Failed during checkstyle execution: 
Unable to find configuration file at location: 
res/checkstyle/checkstyle.xml: Could not find resource 
'res/checkstyle/checkstyle.xml'. -> [Help 1]


When I copy the files from git into the source folder mvn verify works 
as expected.


Felix



Thanks,

Mark

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



OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: [VOTE] Apache Tomcat migration tool for Jakarta EE 1.0.4

2022-09-15 Thread Mark Thomas

On 15/09/2022 14:36, Felix Schumacher wrote:


Am 15.09.22 um 11:06 schrieb Mark Thomas:

The proposed Apache Tomcat migration tool for Jakarta EE 1.0.4 is now
available for voting.

The significant changes since 1.0.3 are:

- Issue #26 - Re-fix
- PR #28 - Add Jakarta EE -. Java EE profile (with warnings)
- Add checkstyle

It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v1.0.4/

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

The tag is:
https://github.com/apache/tomcat-jakartaee-migration/tree/1.0.4
a74aad315b8af81de0fa1837acc2adb278f5cb5a

The proposed 1.0.4 release is:

[ ] -1: Broken. Do not release because...
[ ] +1: Acceptable. Go ahead and release.


When I try to build the sources from the tar.gz maven complains about 
missing checkstyle files:


[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-checkstyle-plugin:3.2.0:check (validate) 
on project jakartaee-migration: Failed during checkstyle execution: 
Unable to find configuration file at location: 
res/checkstyle/checkstyle.xml: Could not find resource 
'res/checkstyle/checkstyle.xml'. -> [Help 1]


When I copy the files from git into the source folder mvn verify works 
as expected.


I'll get that fixed.

Do we want 1.0.5 for this?

Mark

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



[tomcat-jakartaee-migration] branch main updated: Move Checkstyle files to more natural location

2022-09-15 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-jakartaee-migration.git


The following commit(s) were added to refs/heads/main by this push:
 new d8b33d3  Move Checkstyle files to more natural location
d8b33d3 is described below

commit d8b33d3d7a055a01d0fcfc8c9dc4ddd2bc514125
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:33:38 2022 +0100

Move Checkstyle files to more natural location
---
 pom.xml| 4 ++--
 {res => src}/checkstyle/checkstyle.xml | 0
 {res => src}/checkstyle/header-al2.txt | 0
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index e3219bb..0561907 100644
--- a/pom.xml
+++ b/pom.xml
@@ -325,8 +325,8 @@
 maven-checkstyle-plugin
 3.2.0
 
-  res/checkstyle/checkstyle.xml
-  res/checkstyle/header-al2.txt
+  src/checkstyle/checkstyle.xml
+  src/checkstyle/header-al2.txt
   true
   true
   false
diff --git a/res/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml
similarity index 100%
rename from res/checkstyle/checkstyle.xml
rename to src/checkstyle/checkstyle.xml
diff --git a/res/checkstyle/header-al2.txt b/src/checkstyle/header-al2.txt
similarity index 100%
rename from res/checkstyle/header-al2.txt
rename to src/checkstyle/header-al2.txt


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



[tomcat] branch main updated: Fix typo

2022-09-15 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 a37e5a3052 Fix typo
a37e5a3052 is described below

commit a37e5a30521a50d3ba20e8c8096a34d8cfc72642
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:37:42 2022 +0100

Fix typo
---
 java/jakarta/servlet/jsp/tagext/TagSupport.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/jakarta/servlet/jsp/tagext/TagSupport.java 
b/java/jakarta/servlet/jsp/tagext/TagSupport.java
index 342293e48f..b604bf0594 100644
--- a/java/jakarta/servlet/jsp/tagext/TagSupport.java
+++ b/java/jakarta/servlet/jsp/tagext/TagSupport.java
@@ -270,7 +270,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 }
 
 /**
- * The parent, if any, of thsi tag.
+ * The parent, if any, of this tag.
  */
 private Tag parent;
 


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



[tomcat] branch 10.0.x updated: Fix typo

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 2ec1aa725e Fix typo
2ec1aa725e is described below

commit 2ec1aa725e3182685c2e39ae8dced408fdd63430
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:37:42 2022 +0100

Fix typo
---
 java/jakarta/servlet/jsp/tagext/TagSupport.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/jakarta/servlet/jsp/tagext/TagSupport.java 
b/java/jakarta/servlet/jsp/tagext/TagSupport.java
index 342293e48f..b604bf0594 100644
--- a/java/jakarta/servlet/jsp/tagext/TagSupport.java
+++ b/java/jakarta/servlet/jsp/tagext/TagSupport.java
@@ -270,7 +270,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 }
 
 /**
- * The parent, if any, of thsi tag.
+ * The parent, if any, of this tag.
  */
 private Tag parent;
 


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

2022-09-15 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 47ae55e4da Fix typo
47ae55e4da is described below

commit 47ae55e4da70bd4d02c5cbd00fa44a115a93075f
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:37:42 2022 +0100

Fix typo
---
 java/javax/servlet/jsp/tagext/TagSupport.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/javax/servlet/jsp/tagext/TagSupport.java 
b/java/javax/servlet/jsp/tagext/TagSupport.java
index 762ff520d7..b70cf8207d 100644
--- a/java/javax/servlet/jsp/tagext/TagSupport.java
+++ b/java/javax/servlet/jsp/tagext/TagSupport.java
@@ -273,7 +273,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 }
 
 /**
- * The parent, if any, of thsi tag.
+ * The parent, if any, of this tag.
  */
 private Tag parent;
 


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



[tomcat] branch 8.5.x updated: Fix typo

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new af97ae314f Fix typo
af97ae314f is described below

commit af97ae314f0d0397191c8fba74c438ba73bea487
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:37:42 2022 +0100

Fix typo
---
 java/javax/servlet/jsp/tagext/TagSupport.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/javax/servlet/jsp/tagext/TagSupport.java 
b/java/javax/servlet/jsp/tagext/TagSupport.java
index 762ff520d7..b70cf8207d 100644
--- a/java/javax/servlet/jsp/tagext/TagSupport.java
+++ b/java/javax/servlet/jsp/tagext/TagSupport.java
@@ -273,7 +273,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 }
 
 /**
- * The parent, if any, of thsi tag.
+ * The parent, if any, of this tag.
  */
 private Tag parent;
 


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



[tomcat] branch main updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 9741030e38 Refactor to avoid use of Hashtable. No functional change.
9741030e38 is described below

commit 9741030e386d6734854a411a1987266549804e8e
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:40:00 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/jakarta/servlet/jsp/tagext/TagSupport.java | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/java/jakarta/servlet/jsp/tagext/TagSupport.java 
b/java/jakarta/servlet/jsp/tagext/TagSupport.java
index b604bf0594..8cc2fca9e2 100644
--- a/java/jakarta/servlet/jsp/tagext/TagSupport.java
+++ b/java/jakarta/servlet/jsp/tagext/TagSupport.java
@@ -17,8 +17,10 @@
 package jakarta.servlet.jsp.tagext;
 
 import java.io.Serializable;
+import java.util.Collections;
 import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import jakarta.servlet.jsp.JspException;
 import jakarta.servlet.jsp.PageContext;
@@ -227,7 +229,7 @@ public class TagSupport implements IterationTag, 
Serializable {
  */
 public void setValue(String k, Object o) {
 if (values == null) {
-values = new Hashtable<>();
+values = new ConcurrentHashMap<>();
 }
 values.put(k, o);
 }
@@ -266,7 +268,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 if (values == null) {
 return null;
 }
-return values.keys();
+return Collections.enumeration(values.keySet());
 }
 
 /**
@@ -277,7 +279,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 /**
  * Map of object values keyed by Strings for this tag.
  */
-private Hashtable values;
+private Map values;
 
 /**
  * The value of the id attribute of this tag; or null.


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



[tomcat] branch 10.0.x updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 5262c3b57e Refactor to avoid use of Hashtable. No functional change.
5262c3b57e is described below

commit 5262c3b57e144310927cf078411cc741dcf8aa5c
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:40:00 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/jakarta/servlet/jsp/tagext/TagSupport.java | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/java/jakarta/servlet/jsp/tagext/TagSupport.java 
b/java/jakarta/servlet/jsp/tagext/TagSupport.java
index b604bf0594..8cc2fca9e2 100644
--- a/java/jakarta/servlet/jsp/tagext/TagSupport.java
+++ b/java/jakarta/servlet/jsp/tagext/TagSupport.java
@@ -17,8 +17,10 @@
 package jakarta.servlet.jsp.tagext;
 
 import java.io.Serializable;
+import java.util.Collections;
 import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import jakarta.servlet.jsp.JspException;
 import jakarta.servlet.jsp.PageContext;
@@ -227,7 +229,7 @@ public class TagSupport implements IterationTag, 
Serializable {
  */
 public void setValue(String k, Object o) {
 if (values == null) {
-values = new Hashtable<>();
+values = new ConcurrentHashMap<>();
 }
 values.put(k, o);
 }
@@ -266,7 +268,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 if (values == null) {
 return null;
 }
-return values.keys();
+return Collections.enumeration(values.keySet());
 }
 
 /**
@@ -277,7 +279,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 /**
  * Map of object values keyed by Strings for this tag.
  */
-private Hashtable values;
+private Map values;
 
 /**
  * The value of the id attribute of this tag; or null.


-
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: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 02f82e801e Refactor to avoid use of Hashtable. No functional change.
02f82e801e is described below

commit 02f82e801e02b642c85d5eaefa0246e66b8a5a29
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:40:00 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/javax/servlet/jsp/tagext/TagSupport.java | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/java/javax/servlet/jsp/tagext/TagSupport.java 
b/java/javax/servlet/jsp/tagext/TagSupport.java
index b70cf8207d..cd13d42bf7 100644
--- a/java/javax/servlet/jsp/tagext/TagSupport.java
+++ b/java/javax/servlet/jsp/tagext/TagSupport.java
@@ -17,8 +17,10 @@
 package javax.servlet.jsp.tagext;
 
 import java.io.Serializable;
+import java.util.Collections;
 import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.PageContext;
@@ -230,7 +232,7 @@ public class TagSupport implements IterationTag, 
Serializable {
  */
 public void setValue(String k, Object o) {
 if (values == null) {
-values = new Hashtable<>();
+values = new ConcurrentHashMap<>();
 }
 values.put(k, o);
 }
@@ -269,7 +271,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 if (values == null) {
 return null;
 }
-return values.keys();
+return Collections.enumeration(values.keySet());
 }
 
 /**
@@ -280,7 +282,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 /**
  * Map of object values keyed by Strings for this tag.
  */
-private Hashtable values;
+private Map values;
 
 /**
  * The value of the id attribute of this tag; or null.


-
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: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 1cd626daed Refactor to avoid use of Hashtable. No functional change.
1cd626daed is described below

commit 1cd626daedc5358e573e604214c65e896cd5d1be
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:40:00 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/javax/servlet/jsp/tagext/TagSupport.java | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/java/javax/servlet/jsp/tagext/TagSupport.java 
b/java/javax/servlet/jsp/tagext/TagSupport.java
index b70cf8207d..cd13d42bf7 100644
--- a/java/javax/servlet/jsp/tagext/TagSupport.java
+++ b/java/javax/servlet/jsp/tagext/TagSupport.java
@@ -17,8 +17,10 @@
 package javax.servlet.jsp.tagext;
 
 import java.io.Serializable;
+import java.util.Collections;
 import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.PageContext;
@@ -230,7 +232,7 @@ public class TagSupport implements IterationTag, 
Serializable {
  */
 public void setValue(String k, Object o) {
 if (values == null) {
-values = new Hashtable<>();
+values = new ConcurrentHashMap<>();
 }
 values.put(k, o);
 }
@@ -269,7 +271,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 if (values == null) {
 return null;
 }
-return values.keys();
+return Collections.enumeration(values.keySet());
 }
 
 /**
@@ -280,7 +282,7 @@ public class TagSupport implements IterationTag, 
Serializable {
 /**
  * Map of object values keyed by Strings for this tag.
  */
-private Hashtable values;
+private Map values;
 
 /**
  * The value of the id attribute of this tag; or null.


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



[tomcat] branch main updated: Correct Javadoc.

2022-09-15 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 2629054500 Correct Javadoc.
2629054500 is described below

commit 2629054500e3f5b057169230cfc0fdccf3c6a95a
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:43:04 2022 +0100

Correct Javadoc.
---
 java/org/apache/catalina/core/NamingContextListener.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/NamingContextListener.java 
b/java/org/apache/catalina/core/NamingContextListener.java
index 684041d6fd..964ee8648d 100644
--- a/java/org/apache/catalina/core/NamingContextListener.java
+++ b/java/org/apache/catalina/core/NamingContextListener.java
@@ -133,7 +133,7 @@ public class NamingContextListener implements 
LifecycleListener, PropertyChangeL
 
 
 /**
- * Objectnames hashtable.
+ * Objectnames Map.
  */
 protected HashMap objectNames = new HashMap<>();
 


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



[tomcat] branch 10.0.x updated: Correct Javadoc.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 42f348b687 Correct Javadoc.
42f348b687 is described below

commit 42f348b6874c418c82e50065e5f637fe92f79847
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:43:04 2022 +0100

Correct Javadoc.
---
 java/org/apache/catalina/core/NamingContextListener.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/NamingContextListener.java 
b/java/org/apache/catalina/core/NamingContextListener.java
index 684041d6fd..964ee8648d 100644
--- a/java/org/apache/catalina/core/NamingContextListener.java
+++ b/java/org/apache/catalina/core/NamingContextListener.java
@@ -133,7 +133,7 @@ public class NamingContextListener implements 
LifecycleListener, PropertyChangeL
 
 
 /**
- * Objectnames hashtable.
+ * Objectnames Map.
  */
 protected HashMap objectNames = new HashMap<>();
 


-
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: Correct Javadoc.

2022-09-15 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 679f805fff Correct Javadoc.
679f805fff is described below

commit 679f805fffa9e810bbbf7e62d5166941cce011cc
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:43:04 2022 +0100

Correct Javadoc.
---
 java/org/apache/catalina/core/NamingContextListener.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/NamingContextListener.java 
b/java/org/apache/catalina/core/NamingContextListener.java
index 0623763c0e..8d3092ca49 100644
--- a/java/org/apache/catalina/core/NamingContextListener.java
+++ b/java/org/apache/catalina/core/NamingContextListener.java
@@ -136,7 +136,7 @@ public class NamingContextListener
 
 
 /**
- * Objectnames hashtable.
+ * Objectnames Map.
  */
 protected HashMap objectNames = new HashMap<>();
 


-
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: Correct Javadoc.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 5a98253b56 Correct Javadoc.
5a98253b56 is described below

commit 5a98253b56b2aace010c8706ee8b701160ccc9e7
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:43:04 2022 +0100

Correct Javadoc.
---
 java/org/apache/catalina/core/NamingContextListener.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/NamingContextListener.java 
b/java/org/apache/catalina/core/NamingContextListener.java
index fe1be3bf90..0eb9b99827 100644
--- a/java/org/apache/catalina/core/NamingContextListener.java
+++ b/java/org/apache/catalina/core/NamingContextListener.java
@@ -136,7 +136,7 @@ public class NamingContextListener
 
 
 /**
- * Objectnames hashtable.
+ * Objectnames Map.
  */
 protected HashMap objectNames = new HashMap<>();
 


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



[tomcat] branch main updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 336fd8bc14 Refactor to avoid use of Hashtable. No functional change.
336fd8bc14 is described below

commit 336fd8bc14373223e159578b1fb82550ce5816ce
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:48:18 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/catalina/valves/rewrite/RewriteValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java 
b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
index e1589f801a..2cfac3d878 100644
--- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java
+++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
@@ -24,10 +24,10 @@ import java.io.StringReader;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
+import java.util.concurrent.ConcurrentHashMap;
 
 import jakarta.servlet.ServletException;
 import jakarta.servlet.http.Cookie;
@@ -102,7 +102,7 @@ public class RewriteValve extends ValveBase {
 /**
  * Maps to be used by the rules.
  */
-protected Map maps = new Hashtable<>();
+protected Map maps = new ConcurrentHashMap<>();
 
 
 /**


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



[tomcat] branch 10.0.x updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new f71464a3e3 Refactor to avoid use of Hashtable. No functional change.
f71464a3e3 is described below

commit f71464a3e35b596be28d2dbf9914d833b223e41d
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:48:18 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/catalina/valves/rewrite/RewriteValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java 
b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
index 07f718df26..b26e1bdbd7 100644
--- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java
+++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
@@ -24,10 +24,10 @@ import java.io.StringReader;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
+import java.util.concurrent.ConcurrentHashMap;
 
 import jakarta.servlet.ServletException;
 import jakarta.servlet.http.Cookie;
@@ -102,7 +102,7 @@ public class RewriteValve extends ValveBase {
 /**
  * Maps to be used by the rules.
  */
-protected Map maps = new Hashtable<>();
+protected Map maps = new ConcurrentHashMap<>();
 
 
 /**


-
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: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 1361ae0da6 Refactor to avoid use of Hashtable. No functional change.
1361ae0da6 is described below

commit 1361ae0da6d6f87353a221c2930a2458c956ac01
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:48:18 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/catalina/valves/rewrite/RewriteValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java 
b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
index 53f8fc8fb6..29929843af 100644
--- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java
+++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
@@ -24,10 +24,10 @@ import java.io.StringReader;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.Cookie;
@@ -102,7 +102,7 @@ public class RewriteValve extends ValveBase {
 /**
  * Maps to be used by the rules.
  */
-protected Map maps = new Hashtable<>();
+protected Map maps = new ConcurrentHashMap<>();
 
 
 /**


-
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: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 393eafc920 Refactor to avoid use of Hashtable. No functional change.
393eafc920 is described below

commit 393eafc920e251112e85140f8135192576b790b2
Author: Mark Thomas 
AuthorDate: Thu Sep 15 15:48:18 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/catalina/valves/rewrite/RewriteValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java 
b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
index 4be21fc5f2..dfad2ad907 100644
--- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java
+++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
@@ -26,10 +26,10 @@ import java.io.StringReader;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.Cookie;
@@ -104,7 +104,7 @@ public class RewriteValve extends ValveBase {
 /**
  * Maps to be used by the rules.
  */
-protected Map maps = new Hashtable<>();
+protected Map maps = new ConcurrentHashMap<>();
 
 
 /**


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



[tomcat] branch main updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 00cf721f14 Refactor to avoid use of Hashtable. No functional change.
00cf721f14 is described below

commit 00cf721f14ac90e7ebc372a5303603ca408fc999
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:23:49 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/catalina/servlets/CGIServlet.java | 30 +++
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index 2f26337a41..dbc941dce5 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -29,10 +29,11 @@ import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Enumeration;
+import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.StringTokenizer;
@@ -306,7 +307,7 @@ public final class CGIServlet extends HttpServlet {
 private static final Object expandFileLock = new Object();
 
 /** the shell environment variables to be passed to the CGI script */
-private final Hashtable shellEnv = new Hashtable<>();
+private final Map shellEnv = new HashMap<>();
 
 /**
  * Enable creation of script command line arguments from query-string.
@@ -698,7 +699,7 @@ public final class CGIServlet extends HttpServlet {
 private File tmpDir = null;
 
 /** derived cgi environment */
-private Hashtable env = null;
+private Map env = null;
 
 /** cgi command to be invoked */
 private String command = null;
@@ -979,7 +980,7 @@ public final class CGIServlet extends HttpServlet {
  */
 
 // Add the shell environment variables (if any)
-Hashtable envp = new Hashtable<>(shellEnv);
+Map envp = new HashMap<>(shellEnv);
 
 // Add the CGI environment variables
 String sPathInfoOrig = null;
@@ -1317,7 +1318,7 @@ public final class CGIServlet extends HttpServlet {
  * @return   CGI environment
  *
  */
-protected Hashtable getEnvironment() {
+protected Map getEnvironment() {
 return env;
 }
 
@@ -1416,7 +1417,7 @@ public final class CGIServlet extends HttpServlet {
 private final String command;
 
 /** environment used when invoking the cgi script */
-private final Hashtable env;
+private final Map env;
 
 /** working directory used when invoking the cgi script */
 private final File wd;
@@ -1448,7 +1449,7 @@ public final class CGIServlet extends HttpServlet {
  * @param  params   ArrayList with the script's query command line
  *  parameters as strings
  */
-protected CGIRunner(String command, Hashtable env,
+protected CGIRunner(String command, Map env,
 File wd, ArrayList params) {
 this.command = command;
 this.env = env;
@@ -1511,20 +1512,17 @@ public final class CGIServlet extends HttpServlet {
  * key/value pair in the Hashtable to a String in the form
  * "key=value" (hashkey + "=" + hash.get(hashkey).toString())
  *
- * @param  h   Hashtable to convert
+ * @param  map Hashtable to convert
  *
  * @return converted string array
  *
  * @exception  NullPointerException   if a hash key has a null value
  *
  */
-protected String[] hashToStringArray(Hashtable h)
-throws NullPointerException {
-List list = new ArrayList<>(h.size());
-Enumeration e = h.keys();
-while (e.hasMoreElements()) {
-String k = e.nextElement();
-list.add(k + "=" + h.get(k).toString());
+protected String[] mapToStringArray(Map map) throws 
NullPointerException {
+List list = new ArrayList<>(map.size());
+for (Entry entry : map.entrySet()) {
+list.add(entry.getKey() + "=" + entry.getValue().toString());
 }
 return list.toArray(new String[0]);
 }
@@ -1630,7 +1628,7 @@ public final class CGIServlet extends HttpServlet {
 rt = Runtime.getRuntime();
 proc = rt.exec(
 cmdAndArgs.toArray(new String[0]),
-hashToStringArray(env), wd);
+mapToStringArray(env), wd);
 
 String sContentLength = env.get("CONTENT_LENGTH");
 


---

Re: [tomcat] branch main updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread Mark Thomas

On 15/09/2022 16:23, ma...@apache.org wrote:

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 00cf721f14 Refactor to avoid use of Hashtable. No functional change.
00cf721f14 is described below

commit 00cf721f14ac90e7ebc372a5303603ca408fc999
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:23:49 2022 +0100

 Refactor to avoid use of Hashtable. No functional change.


Any objections to back-porting this?

It changes some protected API for the CGIServlet inner classes (and the 
CGI Servlet is final). That seems pretty low risk to me.


Mark


---
  java/org/apache/catalina/servlets/CGIServlet.java | 30 +++
  1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index 2f26337a41..dbc941dce5 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -29,10 +29,11 @@ import java.nio.file.Files;
  import java.util.ArrayList;
  import java.util.Date;
  import java.util.Enumeration;
+import java.util.HashMap;
  import java.util.HashSet;
-import java.util.Hashtable;
  import java.util.List;
  import java.util.Locale;
+import java.util.Map;
  import java.util.Map.Entry;
  import java.util.Set;
  import java.util.StringTokenizer;
@@ -306,7 +307,7 @@ public final class CGIServlet extends HttpServlet {
  private static final Object expandFileLock = new Object();
  
  /** the shell environment variables to be passed to the CGI script */

-private final Hashtable shellEnv = new Hashtable<>();
+private final Map shellEnv = new HashMap<>();
  
  /**

   * Enable creation of script command line arguments from query-string.
@@ -698,7 +699,7 @@ public final class CGIServlet extends HttpServlet {
  private File tmpDir = null;
  
  /** derived cgi environment */

-private Hashtable env = null;
+private Map env = null;
  
  /** cgi command to be invoked */

  private String command = null;
@@ -979,7 +980,7 @@ public final class CGIServlet extends HttpServlet {
   */
  
  // Add the shell environment variables (if any)

-Hashtable envp = new Hashtable<>(shellEnv);
+Map envp = new HashMap<>(shellEnv);
  
  // Add the CGI environment variables

  String sPathInfoOrig = null;
@@ -1317,7 +1318,7 @@ public final class CGIServlet extends HttpServlet {
   * @return   CGI environment
   *
   */
-protected Hashtable getEnvironment() {
+protected Map getEnvironment() {
  return env;
  }
  
@@ -1416,7 +1417,7 @@ public final class CGIServlet extends HttpServlet {

  private final String command;
  
  /** environment used when invoking the cgi script */

-private final Hashtable env;
+private final Map env;
  
  /** working directory used when invoking the cgi script */

  private final File wd;
@@ -1448,7 +1449,7 @@ public final class CGIServlet extends HttpServlet {
   * @param  params   ArrayList with the script's query command line
   *  parameters as strings
   */
-protected CGIRunner(String command, Hashtable env,
+protected CGIRunner(String command, Map env,
  File wd, ArrayList params) {
  this.command = command;
  this.env = env;
@@ -1511,20 +1512,17 @@ public final class CGIServlet extends HttpServlet {
   * key/value pair in the Hashtable to a String in the form
   * "key=value" (hashkey + "=" + hash.get(hashkey).toString())
   *
- * @param  h   Hashtable to convert
+ * @param  map Hashtable to convert
   *
   * @return converted string array
   *
   * @exception  NullPointerException   if a hash key has a null value
   *
   */
-protected String[] hashToStringArray(Hashtable h)
-throws NullPointerException {
-List list = new ArrayList<>(h.size());
-Enumeration e = h.keys();
-while (e.hasMoreElements()) {
-String k = e.nextElement();
-list.add(k + "=" + h.get(k).toString());
+protected String[] mapToStringArray(Map map) throws 
NullPointerException {
+List list = new ArrayList<>(map.size());
+for (Entry entry : map.entrySet()) {
+list.add(entry.getKey() + "=" + entry.getValue().toString());
  }
  return list.toArray(new String[0]);
  }
@@ -1630,7 +1628,7 @@ public final class CGIServlet extends HttpServlet {
  rt = Ru

[tomcat] branch main updated: Formatting

2022-09-15 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 a0dce6fdfb Formatting
a0dce6fdfb is described below

commit a0dce6fdfbb6a116f66694ce730571b8466da37b
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:32:51 2022 +0100

Formatting
---
 java/org/apache/coyote/ajp/Constants.java | 11 +++
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/coyote/ajp/Constants.java 
b/java/org/apache/coyote/ajp/Constants.java
index 355c7659dc..17e57a7fd8 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -81,8 +81,6 @@ public final class Constants {
 // Terminates list of attributes
 public static final byte SC_A_ARE_DONE  = (byte)0xFF;
 
-// Ajp13 specific -  needs refactoring for the new model
-
 /**
  * Default maximum total byte size for an AJP packet
  */
@@ -213,15 +211,13 @@ public final class Constants {
 return responseTransArray[code];
 }
 
-private static final Hashtable  responseTransHash =
-new Hashtable<>(20);
+private static final Hashtable  responseTransHash = new 
Hashtable<>(20);
 
 static {
 try {
 int i;
 for (i = 0; i < SC_RESP_AJP13_MAX; i++) {
-responseTransHash.put(getResponseHeaderForCode(i),
-Integer.valueOf(0xA001 + i));
+responseTransHash.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
 }
 }
 catch (Exception e) {
@@ -229,8 +225,7 @@ public final class Constants {
 }
 }
 
-public static final int getResponseAjpIndex(String header)
-{
+public static final int getResponseAjpIndex(String header) {
 Integer i = responseTransHash.get(header);
 if (i == null) {
 return 0;


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



[tomcat] branch main updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 f2110418d1 Refactor to avoid use of Hashtable. No functional change.
f2110418d1 is described below

commit f2110418d1d37972780364b5b29c35f61506b1bf
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:34:52 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/coyote/ajp/Constants.java | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/ajp/Constants.java 
b/java/org/apache/coyote/ajp/Constants.java
index 17e57a7fd8..1da971b589 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -16,7 +16,8 @@
  */
 package org.apache.coyote.ajp;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * Constants.
@@ -211,13 +212,13 @@ public final class Constants {
 return responseTransArray[code];
 }
 
-private static final Hashtable  responseTransHash = new 
Hashtable<>(20);
+private static final Map  responseTransMap = new 
HashMap<>(20);
 
 static {
 try {
 int i;
 for (i = 0; i < SC_RESP_AJP13_MAX; i++) {
-responseTransHash.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
+responseTransMap.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
 }
 }
 catch (Exception e) {
@@ -226,7 +227,7 @@ public final class Constants {
 }
 
 public static final int getResponseAjpIndex(String header) {
-Integer i = responseTransHash.get(header);
+Integer i = responseTransMap.get(header);
 if (i == null) {
 return 0;
 } else {


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



[tomcat] branch 10.0.x updated (f71464a3e3 -> 2d7179a80c)

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from f71464a3e3 Refactor to avoid use of Hashtable. No functional change.
 new ce8df277c3 Formatting
 new 2d7179a80c Refactor to avoid use of Hashtable. No functional change.

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


Summary of changes:
 java/org/apache/coyote/ajp/Constants.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)


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



[tomcat] 01/02: Formatting

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit ce8df277c3dd31156c7e5c9e4cf46a9e072c5c5b
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:32:51 2022 +0100

Formatting
---
 java/org/apache/coyote/ajp/Constants.java | 11 +++
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/coyote/ajp/Constants.java 
b/java/org/apache/coyote/ajp/Constants.java
index 355c7659dc..17e57a7fd8 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -81,8 +81,6 @@ public final class Constants {
 // Terminates list of attributes
 public static final byte SC_A_ARE_DONE  = (byte)0xFF;
 
-// Ajp13 specific -  needs refactoring for the new model
-
 /**
  * Default maximum total byte size for an AJP packet
  */
@@ -213,15 +211,13 @@ public final class Constants {
 return responseTransArray[code];
 }
 
-private static final Hashtable  responseTransHash =
-new Hashtable<>(20);
+private static final Hashtable  responseTransHash = new 
Hashtable<>(20);
 
 static {
 try {
 int i;
 for (i = 0; i < SC_RESP_AJP13_MAX; i++) {
-responseTransHash.put(getResponseHeaderForCode(i),
-Integer.valueOf(0xA001 + i));
+responseTransHash.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
 }
 }
 catch (Exception e) {
@@ -229,8 +225,7 @@ public final class Constants {
 }
 }
 
-public static final int getResponseAjpIndex(String header)
-{
+public static final int getResponseAjpIndex(String header) {
 Integer i = responseTransHash.get(header);
 if (i == null) {
 return 0;


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



[tomcat] 02/02: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 2d7179a80c2f761e6ceb9d915afa4b956a22f1ee
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:34:52 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/coyote/ajp/Constants.java | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/ajp/Constants.java 
b/java/org/apache/coyote/ajp/Constants.java
index 17e57a7fd8..1da971b589 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -16,7 +16,8 @@
  */
 package org.apache.coyote.ajp;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * Constants.
@@ -211,13 +212,13 @@ public final class Constants {
 return responseTransArray[code];
 }
 
-private static final Hashtable  responseTransHash = new 
Hashtable<>(20);
+private static final Map  responseTransMap = new 
HashMap<>(20);
 
 static {
 try {
 int i;
 for (i = 0; i < SC_RESP_AJP13_MAX; i++) {
-responseTransHash.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
+responseTransMap.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
 }
 }
 catch (Exception e) {
@@ -226,7 +227,7 @@ public final class Constants {
 }
 
 public static final int getResponseAjpIndex(String header) {
-Integer i = responseTransHash.get(header);
+Integer i = responseTransMap.get(header);
 if (i == null) {
 return 0;
 } else {


-
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 (1361ae0da6 -> 49f5c7fa8e)

2022-09-15 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 1361ae0da6 Refactor to avoid use of Hashtable. No functional change.
 new 84db379278 Formatting
 new 49f5c7fa8e Refactor to avoid use of Hashtable. No functional change.

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


Summary of changes:
 java/org/apache/coyote/ajp/Constants.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)


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



[tomcat] 02/02: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 49f5c7fa8e7e12e9ab3b2429073b3a7fe74fc6d0
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:34:52 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/coyote/ajp/Constants.java | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/ajp/Constants.java 
b/java/org/apache/coyote/ajp/Constants.java
index 17e57a7fd8..1da971b589 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -16,7 +16,8 @@
  */
 package org.apache.coyote.ajp;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * Constants.
@@ -211,13 +212,13 @@ public final class Constants {
 return responseTransArray[code];
 }
 
-private static final Hashtable  responseTransHash = new 
Hashtable<>(20);
+private static final Map  responseTransMap = new 
HashMap<>(20);
 
 static {
 try {
 int i;
 for (i = 0; i < SC_RESP_AJP13_MAX; i++) {
-responseTransHash.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
+responseTransMap.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
 }
 }
 catch (Exception e) {
@@ -226,7 +227,7 @@ public final class Constants {
 }
 
 public static final int getResponseAjpIndex(String header) {
-Integer i = responseTransHash.get(header);
+Integer i = responseTransMap.get(header);
 if (i == null) {
 return 0;
 } else {


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



[tomcat] 01/02: Formatting

2022-09-15 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 84db3792786602afa35dfdaf4ab402660dc2077c
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:32:51 2022 +0100

Formatting
---
 java/org/apache/coyote/ajp/Constants.java | 11 +++
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/coyote/ajp/Constants.java 
b/java/org/apache/coyote/ajp/Constants.java
index 355c7659dc..17e57a7fd8 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -81,8 +81,6 @@ public final class Constants {
 // Terminates list of attributes
 public static final byte SC_A_ARE_DONE  = (byte)0xFF;
 
-// Ajp13 specific -  needs refactoring for the new model
-
 /**
  * Default maximum total byte size for an AJP packet
  */
@@ -213,15 +211,13 @@ public final class Constants {
 return responseTransArray[code];
 }
 
-private static final Hashtable  responseTransHash =
-new Hashtable<>(20);
+private static final Hashtable  responseTransHash = new 
Hashtable<>(20);
 
 static {
 try {
 int i;
 for (i = 0; i < SC_RESP_AJP13_MAX; i++) {
-responseTransHash.put(getResponseHeaderForCode(i),
-Integer.valueOf(0xA001 + i));
+responseTransHash.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
 }
 }
 catch (Exception e) {
@@ -229,8 +225,7 @@ public final class Constants {
 }
 }
 
-public static final int getResponseAjpIndex(String header)
-{
+public static final int getResponseAjpIndex(String header) {
 Integer i = responseTransHash.get(header);
 if (i == null) {
 return 0;


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



[tomcat] 02/02: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 827d61394a7203ec6df22be765930be815e5b188
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:34:52 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/coyote/ajp/Constants.java | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/ajp/Constants.java 
b/java/org/apache/coyote/ajp/Constants.java
index 17e57a7fd8..1da971b589 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -16,7 +16,8 @@
  */
 package org.apache.coyote.ajp;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * Constants.
@@ -211,13 +212,13 @@ public final class Constants {
 return responseTransArray[code];
 }
 
-private static final Hashtable  responseTransHash = new 
Hashtable<>(20);
+private static final Map  responseTransMap = new 
HashMap<>(20);
 
 static {
 try {
 int i;
 for (i = 0; i < SC_RESP_AJP13_MAX; i++) {
-responseTransHash.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
+responseTransMap.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
 }
 }
 catch (Exception e) {
@@ -226,7 +227,7 @@ public final class Constants {
 }
 
 public static final int getResponseAjpIndex(String header) {
-Integer i = responseTransHash.get(header);
+Integer i = responseTransMap.get(header);
 if (i == null) {
 return 0;
 } else {


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



[tomcat] 01/02: Formatting

2022-09-15 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 cac46fd88960e3e0ef616277d76c01e9c2c03933
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:32:51 2022 +0100

Formatting
---
 java/org/apache/coyote/ajp/Constants.java | 11 +++
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/coyote/ajp/Constants.java 
b/java/org/apache/coyote/ajp/Constants.java
index 355c7659dc..17e57a7fd8 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -81,8 +81,6 @@ public final class Constants {
 // Terminates list of attributes
 public static final byte SC_A_ARE_DONE  = (byte)0xFF;
 
-// Ajp13 specific -  needs refactoring for the new model
-
 /**
  * Default maximum total byte size for an AJP packet
  */
@@ -213,15 +211,13 @@ public final class Constants {
 return responseTransArray[code];
 }
 
-private static final Hashtable  responseTransHash =
-new Hashtable<>(20);
+private static final Hashtable  responseTransHash = new 
Hashtable<>(20);
 
 static {
 try {
 int i;
 for (i = 0; i < SC_RESP_AJP13_MAX; i++) {
-responseTransHash.put(getResponseHeaderForCode(i),
-Integer.valueOf(0xA001 + i));
+responseTransHash.put(getResponseHeaderForCode(i), 
Integer.valueOf(0xA001 + i));
 }
 }
 catch (Exception e) {
@@ -229,8 +225,7 @@ public final class Constants {
 }
 }
 
-public static final int getResponseAjpIndex(String header)
-{
+public static final int getResponseAjpIndex(String header) {
 Integer i = responseTransHash.get(header);
 if (i == null) {
 return 0;


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



[tomcat] branch 8.5.x updated (393eafc920 -> 827d61394a)

2022-09-15 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 393eafc920 Refactor to avoid use of Hashtable. No functional change.
 new cac46fd889 Formatting
 new 827d61394a Refactor to avoid use of Hashtable. No functional change.

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


Summary of changes:
 java/org/apache/coyote/ajp/Constants.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)


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



[tomcat] branch main updated: The Javadoc for getInitParameters() states the returned Map is immutable

2022-09-15 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 b0b56e9814 The Javadoc for getInitParameters() states the returned Map 
is immutable
b0b56e9814 is described below

commit b0b56e981489465404857be104dd5b38c8b266b7
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:45:44 2022 +0100

The Javadoc for getInitParameters() states the returned Map is immutable
---
 java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java 
b/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java
index e45361405f..58d27581c7 100644
--- a/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java
+++ b/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java
@@ -16,6 +16,8 @@
 */
 package jakarta.servlet.jsp.tagext;
 
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -96,7 +98,7 @@ public abstract class TagLibraryValidator {
  * @param map A Map describing the init parameters
  */
 public void setInitParameters(Map map) {
-initParameters = map;
+initParameters = Collections.unmodifiableMap(new HashMap<>(map));
 }
 
 


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



[tomcat] branch 10.0.x updated: The Javadoc for getInitParameters() states the returned Map is immutable

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 4aaed624f0 The Javadoc for getInitParameters() states the returned Map 
is immutable
4aaed624f0 is described below

commit 4aaed624f02161cbad017f1f0d3f1e65393b1a4a
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:45:44 2022 +0100

The Javadoc for getInitParameters() states the returned Map is immutable
---
 java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java 
b/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java
index e45361405f..58d27581c7 100644
--- a/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java
+++ b/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java
@@ -16,6 +16,8 @@
 */
 package jakarta.servlet.jsp.tagext;
 
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -96,7 +98,7 @@ public abstract class TagLibraryValidator {
  * @param map A Map describing the init parameters
  */
 public void setInitParameters(Map map) {
-initParameters = map;
+initParameters = Collections.unmodifiableMap(new HashMap<>(map));
 }
 
 


-
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: The Javadoc for getInitParameters() states the returned Map is immutable

2022-09-15 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 3eff1cbd2b The Javadoc for getInitParameters() states the returned Map 
is immutable
3eff1cbd2b is described below

commit 3eff1cbd2b02f23d201624a1bd20743b4e9c5bf6
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:45:44 2022 +0100

The Javadoc for getInitParameters() states the returned Map is immutable
---
 java/javax/servlet/jsp/tagext/TagLibraryValidator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/javax/servlet/jsp/tagext/TagLibraryValidator.java 
b/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
index 3d5917b15b..067d6caf90 100644
--- a/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
+++ b/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
@@ -16,6 +16,8 @@
 */
 package javax.servlet.jsp.tagext;
 
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -96,7 +98,7 @@ public abstract class TagLibraryValidator {
  * @param map A Map describing the init parameters
  */
 public void setInitParameters(Map map) {
-initParameters = map;
+initParameters = Collections.unmodifiableMap(new HashMap<>(map));
 }
 
 


-
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: The Javadoc for getInitParameters() states the returned Map is immutable

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 427700d310 The Javadoc for getInitParameters() states the returned Map 
is immutable
427700d310 is described below

commit 427700d310f0f33c401ffd84eedc57a72a2033a2
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:45:44 2022 +0100

The Javadoc for getInitParameters() states the returned Map is immutable
---
 java/javax/servlet/jsp/tagext/TagLibraryValidator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/javax/servlet/jsp/tagext/TagLibraryValidator.java 
b/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
index 3d5917b15b..067d6caf90 100644
--- a/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
+++ b/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
@@ -16,6 +16,8 @@
 */
 package javax.servlet.jsp.tagext;
 
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -96,7 +98,7 @@ public abstract class TagLibraryValidator {
  * @param map A Map describing the init parameters
  */
 public void setInitParameters(Map map) {
-initParameters = map;
+initParameters = Collections.unmodifiableMap(new HashMap<>(map));
 }
 
 


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



[tomcat] branch main updated: Use Map interface where practical

2022-09-15 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 c92e71299c Use Map interface where practical
c92e71299c is described below

commit c92e71299c71c4afa0a0fdf30aecde1a897d26e9
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:53:18 2022 +0100

Use Map interface where practical
---
 java/org/apache/jasper/compiler/Validator.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Validator.java 
b/java/org/apache/jasper/compiler/Validator.java
index 94d0b2c797..fea0b38660 100644
--- a/java/org/apache/jasper/compiler/Validator.java
+++ b/java/org/apache/jasper/compiler/Validator.java
@@ -1109,7 +1109,7 @@ class Validator {
  * considered a dynamic attribute.
  */
 private void checkXmlAttributes(Node.CustomTag n,
-Node.JspAttribute[] jspAttrs, Hashtable 
tagDataAttrs)
+Node.JspAttribute[] jspAttrs, Map tagDataAttrs)
 throws JasperException {
 
 TagInfo tagInfo = n.getTagInfo();
@@ -1313,7 +1313,7 @@ class Validator {
  */
 private void checkNamedAttributes(Node.CustomTag n,
 Node.JspAttribute[] jspAttrs, int start,
-Hashtable tagDataAttrs)
+Map tagDataAttrs)
 throws JasperException {
 
 TagInfo tagInfo = n.getTagInfo();


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



[tomcat] branch 10.0.x updated: Use Map interface where practical

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new e0e6cece8e Use Map interface where practical
e0e6cece8e is described below

commit e0e6cece8ee22eff292b6d09075c4c43237cd5ac
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:53:18 2022 +0100

Use Map interface where practical
---
 java/org/apache/jasper/compiler/Validator.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Validator.java 
b/java/org/apache/jasper/compiler/Validator.java
index ae13967d6f..64ac8c3a9c 100644
--- a/java/org/apache/jasper/compiler/Validator.java
+++ b/java/org/apache/jasper/compiler/Validator.java
@@ -1093,7 +1093,7 @@ class Validator {
  * considered a dynamic attribute.
  */
 private void checkXmlAttributes(Node.CustomTag n,
-Node.JspAttribute[] jspAttrs, Hashtable 
tagDataAttrs)
+Node.JspAttribute[] jspAttrs, Map tagDataAttrs)
 throws JasperException {
 
 TagInfo tagInfo = n.getTagInfo();
@@ -1297,7 +1297,7 @@ class Validator {
  */
 private void checkNamedAttributes(Node.CustomTag n,
 Node.JspAttribute[] jspAttrs, int start,
-Hashtable tagDataAttrs)
+Map tagDataAttrs)
 throws JasperException {
 
 TagInfo tagInfo = n.getTagInfo();


-
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: Use Map interface where practical

2022-09-15 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 68c4df9d9b Use Map interface where practical
68c4df9d9b is described below

commit 68c4df9d9bc8fec82029daa76c626b649f1544b7
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:53:18 2022 +0100

Use Map interface where practical
---
 java/org/apache/jasper/compiler/Validator.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Validator.java 
b/java/org/apache/jasper/compiler/Validator.java
index 30e2e8063c..df7ffd99dd 100644
--- a/java/org/apache/jasper/compiler/Validator.java
+++ b/java/org/apache/jasper/compiler/Validator.java
@@ -1093,7 +1093,7 @@ class Validator {
  * considered a dynamic attribute.
  */
 private void checkXmlAttributes(Node.CustomTag n,
-Node.JspAttribute[] jspAttrs, Hashtable 
tagDataAttrs)
+Node.JspAttribute[] jspAttrs, Map tagDataAttrs)
 throws JasperException {
 
 TagInfo tagInfo = n.getTagInfo();
@@ -1297,7 +1297,7 @@ class Validator {
  */
 private void checkNamedAttributes(Node.CustomTag n,
 Node.JspAttribute[] jspAttrs, int start,
-Hashtable tagDataAttrs)
+Map tagDataAttrs)
 throws JasperException {
 
 TagInfo tagInfo = n.getTagInfo();


-
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: Use Map interface where practical

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 09692b6728 Use Map interface where practical
09692b6728 is described below

commit 09692b6728e4a2399848fcf3a6cd1db12098ca41
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:53:18 2022 +0100

Use Map interface where practical
---
 java/org/apache/jasper/compiler/Validator.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Validator.java 
b/java/org/apache/jasper/compiler/Validator.java
index 30e2e8063c..df7ffd99dd 100644
--- a/java/org/apache/jasper/compiler/Validator.java
+++ b/java/org/apache/jasper/compiler/Validator.java
@@ -1093,7 +1093,7 @@ class Validator {
  * considered a dynamic attribute.
  */
 private void checkXmlAttributes(Node.CustomTag n,
-Node.JspAttribute[] jspAttrs, Hashtable 
tagDataAttrs)
+Node.JspAttribute[] jspAttrs, Map tagDataAttrs)
 throws JasperException {
 
 TagInfo tagInfo = n.getTagInfo();
@@ -1297,7 +1297,7 @@ class Validator {
  */
 private void checkNamedAttributes(Node.CustomTag n,
 Node.JspAttribute[] jspAttrs, int start,
-Hashtable tagDataAttrs)
+Map tagDataAttrs)
 throws JasperException {
 
 TagInfo tagInfo = n.getTagInfo();


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



[tomcat] branch main updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 4c213c508d Refactor to avoid use of Hashtable. No functional change.
4c213c508d is described below

commit 4c213c508d349f30c17ea493797bca405cd63f62
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:54:30 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/jasper/compiler/Generator.java | 29 +-
 .../apache/jasper/compiler/TagLibraryInfoImpl.java |  4 +--
 2 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 4a85866903..34c6e41abf 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -29,10 +29,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
-import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -913,9 +911,9 @@ class Generator {
  * handlers: : tag short name : introspection info of tag
  * handler for  tag
  */
-private final Hashtable> 
handlerInfos;
+private final Map> handlerInfos;
 
-private final Hashtable tagVarNumbers;
+private final Map tagVarNumbers;
 
 private String parent;
 
@@ -956,8 +954,8 @@ class Generator {
 this.fragmentHelperClass = fragmentHelperClass;
 this.useInstanceManagerForTags = useInstanceManagerForTags;
 methodNesting = 0;
-handlerInfos = new Hashtable<>();
-tagVarNumbers = new Hashtable<>();
+handlerInfos = new HashMap<>();
+tagVarNumbers = new HashMap<>();
 textMap = new HashMap<>();
 }
 
@@ -1794,7 +1792,7 @@ class Generator {
 
 // Compute attribute value string for XML-style and named
 // attributes
-Hashtable map = new Hashtable<>();
+Map map = new HashMap<>();
 // Validator ensures this is non-null
 Node.JspAttribute[] attrs = n.getJspAttributes();
 for (int i = 0; i < attrs.length; i++) {
@@ -1839,9 +1837,7 @@ class Generator {
 out.print(" + " + elemName);
 
 // Write remaining attributes
-Enumeration enumeration = map.keys();
-while (enumeration.hasMoreElements()) {
-String attrName = enumeration.nextElement();
+for (String attrName : map.keySet()) {
 out.print(map.get(attrName));
 }
 
@@ -2137,10 +2133,9 @@ class Generator {
 
 private TagHandlerInfo getTagHandlerInfo(Node.CustomTag n)
 throws JasperException {
-Hashtable handlerInfosByShortName =
-handlerInfos.get(n.getPrefix());
+Map handlerInfosByShortName = 
handlerInfos.get(n.getPrefix());
 if (handlerInfosByShortName == null) {
-handlerInfosByShortName = new Hashtable<>();
+handlerInfosByShortName = new HashMap<>();
 handlerInfos.put(n.getPrefix(), handlerInfosByShortName);
 }
 TagHandlerInfo handlerInfo =
@@ -3815,9 +3810,9 @@ class Generator {
  */
 private static class TagHandlerInfo {
 
-private Hashtable methodMaps;
+private Map methodMaps;
 
-private Hashtable> propertyEditorMaps;
+private Map> propertyEditorMaps;
 
 private Class tagHandlerClass;
 
@@ -3835,8 +3830,8 @@ class Generator {
 TagHandlerInfo(Node n, Class tagHandlerClass,
 ErrorDispatcher err) throws JasperException {
 this.tagHandlerClass = tagHandlerClass;
-this.methodMaps = new Hashtable<>();
-this.propertyEditorMaps = new Hashtable<>();
+this.methodMaps = new HashMap<>();
+this.propertyEditorMaps = new HashMap<>();
 
 try {
 BeanInfo tagClassInfo = 
Introspector.getBeanInfo(tagHandlerClass);
diff --git a/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 
b/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
index bef122c18d..d481e0d454 100644
--- a/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
+++ b/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
@@ -25,8 +25,8 @@ import java.net.URL;
 import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -349,7 +349,7 @@ class TagLibraryInfoImpl extends TagLib

[tomcat] branch 10.0.x updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new e3423dce48 Refactor to avoid use of Hashtable. No functional change.
e3423dce48 is described below

commit e3423dce48d01dc90efbdf9c280cb76c9f121d9b
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:54:30 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/jasper/compiler/Generator.java | 29 +-
 .../apache/jasper/compiler/TagLibraryInfoImpl.java |  4 +--
 2 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index ec58134a08..7c90cfda53 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -29,10 +29,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
-import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -895,9 +893,9 @@ class Generator {
  * handlers: : tag short name : introspection info of tag
  * handler for  tag
  */
-private final Hashtable> 
handlerInfos;
+private final Map> handlerInfos;
 
-private final Hashtable tagVarNumbers;
+private final Map tagVarNumbers;
 
 private String parent;
 
@@ -938,8 +936,8 @@ class Generator {
 this.fragmentHelperClass = fragmentHelperClass;
 this.useInstanceManagerForTags = useInstanceManagerForTags;
 methodNesting = 0;
-handlerInfos = new Hashtable<>();
-tagVarNumbers = new Hashtable<>();
+handlerInfos = new HashMap<>();
+tagVarNumbers = new HashMap<>();
 textMap = new HashMap<>();
 }
 
@@ -2018,7 +2016,7 @@ class Generator {
 
 // Compute attribute value string for XML-style and named
 // attributes
-Hashtable map = new Hashtable<>();
+Map map = new HashMap<>();
 // Validator ensures this is non-null
 Node.JspAttribute[] attrs = n.getJspAttributes();
 for (int i = 0; i < attrs.length; i++) {
@@ -2063,9 +2061,7 @@ class Generator {
 out.print(" + " + elemName);
 
 // Write remaining attributes
-Enumeration enumeration = map.keys();
-while (enumeration.hasMoreElements()) {
-String attrName = enumeration.nextElement();
+for (String attrName : map.keySet()) {
 out.print(map.get(attrName));
 }
 
@@ -2361,10 +2357,9 @@ class Generator {
 
 private TagHandlerInfo getTagHandlerInfo(Node.CustomTag n)
 throws JasperException {
-Hashtable handlerInfosByShortName =
-handlerInfos.get(n.getPrefix());
+Map handlerInfosByShortName = 
handlerInfos.get(n.getPrefix());
 if (handlerInfosByShortName == null) {
-handlerInfosByShortName = new Hashtable<>();
+handlerInfosByShortName = new HashMap<>();
 handlerInfos.put(n.getPrefix(), handlerInfosByShortName);
 }
 TagHandlerInfo handlerInfo =
@@ -4037,9 +4032,9 @@ class Generator {
  */
 private static class TagHandlerInfo {
 
-private Hashtable methodMaps;
+private Map methodMaps;
 
-private Hashtable> propertyEditorMaps;
+private Map> propertyEditorMaps;
 
 private Class tagHandlerClass;
 
@@ -4057,8 +4052,8 @@ class Generator {
 TagHandlerInfo(Node n, Class tagHandlerClass,
 ErrorDispatcher err) throws JasperException {
 this.tagHandlerClass = tagHandlerClass;
-this.methodMaps = new Hashtable<>();
-this.propertyEditorMaps = new Hashtable<>();
+this.methodMaps = new HashMap<>();
+this.propertyEditorMaps = new HashMap<>();
 
 try {
 BeanInfo tagClassInfo = 
Introspector.getBeanInfo(tagHandlerClass);
diff --git a/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 
b/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
index bef122c18d..d481e0d454 100644
--- a/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
+++ b/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
@@ -25,8 +25,8 @@ import java.net.URL;
 import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -349,7 +349,7 @@ class TagLibraryInfoImpl extends Ta

[tomcat] branch 9.0.x updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 1f380e3a40 Refactor to avoid use of Hashtable. No functional change.
1f380e3a40 is described below

commit 1f380e3a40395f911e0f52d33643b3693f5753c4
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:54:30 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/jasper/compiler/Generator.java | 29 +-
 .../apache/jasper/compiler/TagLibraryInfoImpl.java |  4 +--
 2 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 45ff4a03d8..b0c83469ed 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -29,10 +29,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
-import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -911,9 +909,9 @@ class Generator {
  * handlers: : tag short name : introspection info of tag
  * handler for  tag
  */
-private final Hashtable> 
handlerInfos;
+private final Map> handlerInfos;
 
-private final Hashtable tagVarNumbers;
+private final Map tagVarNumbers;
 
 private String parent;
 
@@ -951,8 +949,8 @@ class Generator {
 this.methodsBuffered = methodsBuffered;
 this.fragmentHelperClass = fragmentHelperClass;
 methodNesting = 0;
-handlerInfos = new Hashtable<>();
-tagVarNumbers = new Hashtable<>();
+handlerInfos = new HashMap<>();
+tagVarNumbers = new HashMap<>();
 textMap = new HashMap<>();
 }
 
@@ -2026,7 +2024,7 @@ class Generator {
 
 // Compute attribute value string for XML-style and named
 // attributes
-Hashtable map = new Hashtable<>();
+Map map = new HashMap<>();
 // Validator ensures this is non-null
 Node.JspAttribute[] attrs = n.getJspAttributes();
 for (int i = 0; i < attrs.length; i++) {
@@ -2071,9 +2069,7 @@ class Generator {
 out.print(" + " + elemName);
 
 // Write remaining attributes
-Enumeration enumeration = map.keys();
-while (enumeration.hasMoreElements()) {
-String attrName = enumeration.nextElement();
+for (String attrName : map.keySet()) {
 out.print(map.get(attrName));
 }
 
@@ -2369,10 +2365,9 @@ class Generator {
 
 private TagHandlerInfo getTagHandlerInfo(Node.CustomTag n)
 throws JasperException {
-Hashtable handlerInfosByShortName =
-handlerInfos.get(n.getPrefix());
+Map handlerInfosByShortName = 
handlerInfos.get(n.getPrefix());
 if (handlerInfosByShortName == null) {
-handlerInfosByShortName = new Hashtable<>();
+handlerInfosByShortName = new HashMap<>();
 handlerInfos.put(n.getPrefix(), handlerInfosByShortName);
 }
 TagHandlerInfo handlerInfo =
@@ -4045,9 +4040,9 @@ class Generator {
  */
 private static class TagHandlerInfo {
 
-private Hashtable methodMaps;
+private Map methodMaps;
 
-private Hashtable> propertyEditorMaps;
+private Map> propertyEditorMaps;
 
 private Class tagHandlerClass;
 
@@ -4065,8 +4060,8 @@ class Generator {
 TagHandlerInfo(Node n, Class tagHandlerClass,
 ErrorDispatcher err) throws JasperException {
 this.tagHandlerClass = tagHandlerClass;
-this.methodMaps = new Hashtable<>();
-this.propertyEditorMaps = new Hashtable<>();
+this.methodMaps = new HashMap<>();
+this.propertyEditorMaps = new HashMap<>();
 
 try {
 BeanInfo tagClassInfo = 
Introspector.getBeanInfo(tagHandlerClass);
diff --git a/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 
b/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
index 949df622d8..10f44af3c9 100644
--- a/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
+++ b/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
@@ -25,8 +25,8 @@ import java.net.URL;
 import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -349,7 +349,7 @@ class TagLibraryInfoImpl extends TagLibraryInfo implement

[tomcat] branch 8.5.x updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new eceb2a2eb6 Refactor to avoid use of Hashtable. No functional change.
eceb2a2eb6 is described below

commit eceb2a2eb63ac3e71d9d5408b0b09295d55898ea
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:54:30 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/jasper/compiler/Generator.java | 29 +-
 .../apache/jasper/compiler/TagLibraryInfoImpl.java |  4 +--
 2 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 2561aaafc4..b359933bf3 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -29,10 +29,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
-import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -894,9 +892,9 @@ class Generator {
  * handlers: : tag short name : introspection info of tag
  * handler for  tag
  */
-private final Hashtable> 
handlerInfos;
+private final Map> handlerInfos;
 
-private final Hashtable tagVarNumbers;
+private final Map tagVarNumbers;
 
 private String parent;
 
@@ -934,8 +932,8 @@ class Generator {
 this.methodsBuffered = methodsBuffered;
 this.fragmentHelperClass = fragmentHelperClass;
 methodNesting = 0;
-handlerInfos = new Hashtable<>();
-tagVarNumbers = new Hashtable<>();
+handlerInfos = new HashMap<>();
+tagVarNumbers = new HashMap<>();
 textMap = new HashMap<>();
 }
 
@@ -2008,7 +2006,7 @@ class Generator {
 
 // Compute attribute value string for XML-style and named
 // attributes
-Hashtable map = new Hashtable<>();
+Map map = new HashMap<>();
 // Validator ensures this is non-null
 Node.JspAttribute[] attrs = n.getJspAttributes();
 for (int i = 0; i < attrs.length; i++) {
@@ -2053,9 +2051,7 @@ class Generator {
 out.print(" + " + elemName);
 
 // Write remaining attributes
-Enumeration enumeration = map.keys();
-while (enumeration.hasMoreElements()) {
-String attrName = enumeration.nextElement();
+for (String attrName : map.keySet()) {
 out.print(map.get(attrName));
 }
 
@@ -2337,10 +2333,9 @@ class Generator {
 
 private TagHandlerInfo getTagHandlerInfo(Node.CustomTag n)
 throws JasperException {
-Hashtable handlerInfosByShortName =
-handlerInfos.get(n.getPrefix());
+Map handlerInfosByShortName = 
handlerInfos.get(n.getPrefix());
 if (handlerInfosByShortName == null) {
-handlerInfosByShortName = new Hashtable<>();
+handlerInfosByShortName = new HashMap<>();
 handlerInfos.put(n.getPrefix(), handlerInfosByShortName);
 }
 TagHandlerInfo handlerInfo =
@@ -4012,9 +4007,9 @@ class Generator {
  */
 private static class TagHandlerInfo {
 
-private Hashtable methodMaps;
+private Map methodMaps;
 
-private Hashtable> propertyEditorMaps;
+private Map> propertyEditorMaps;
 
 private Class tagHandlerClass;
 
@@ -4032,8 +4027,8 @@ class Generator {
 TagHandlerInfo(Node n, Class tagHandlerClass,
 ErrorDispatcher err) throws JasperException {
 this.tagHandlerClass = tagHandlerClass;
-this.methodMaps = new Hashtable<>();
-this.propertyEditorMaps = new Hashtable<>();
+this.methodMaps = new HashMap<>();
+this.propertyEditorMaps = new HashMap<>();
 
 try {
 BeanInfo tagClassInfo = 
Introspector.getBeanInfo(tagHandlerClass);
diff --git a/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 
b/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
index b4d62dcb37..96417c00f4 100644
--- a/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
+++ b/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
@@ -25,8 +25,8 @@ import java.net.URL;
 import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -349,7 +349,7 @@ class TagLibraryInfoImpl extends TagLibraryInfo implement

[tomcat] branch main updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 8278c1c80d Refactor to avoid use of Hashtable. No functional change.
8278c1c80d is described below

commit 8278c1c80df394365af5559166bf675edd294555
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:04:39 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/naming/ContextAccessController.java |  7 ---
 java/org/apache/naming/ContextBindings.java | 13 +++--
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/naming/ContextAccessController.java 
b/java/org/apache/naming/ContextAccessController.java
index 301d648eea..0fad089be5 100644
--- a/java/org/apache/naming/ContextAccessController.java
+++ b/java/org/apache/naming/ContextAccessController.java
@@ -16,7 +16,8 @@
  */
 package org.apache.naming;
 
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Handles the access control on the JNDI contexts.
@@ -30,13 +31,13 @@ public class ContextAccessController {
 /**
  * Catalina context names on which writing is not allowed.
  */
-private static final Hashtable readOnlyContexts = new 
Hashtable<>();
+private static final Map readOnlyContexts = new 
ConcurrentHashMap<>();
 
 
 /**
  * Security tokens repository.
  */
-private static final Hashtable securityTokens = new 
Hashtable<>();
+private static final Map securityTokens = new 
ConcurrentHashMap<>();
 
 
 // - Public Methods
diff --git a/java/org/apache/naming/ContextBindings.java 
b/java/org/apache/naming/ContextBindings.java
index ae509b27b7..baf3ce2bdb 100644
--- a/java/org/apache/naming/ContextBindings.java
+++ b/java/org/apache/naming/ContextBindings.java
@@ -16,7 +16,8 @@
  */
 package org.apache.naming;
 
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.naming.Context;
 import javax.naming.NamingException;
@@ -42,31 +43,31 @@ public class ContextBindings {
 /**
  * Bindings object - naming context. Keyed by object.
  */
-private static final Hashtable objectBindings = new 
Hashtable<>();
+private static final Map objectBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings thread - naming context. Keyed by thread.
  */
-private static final Hashtable threadBindings = new 
Hashtable<>();
+private static final Map threadBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings thread - object. Keyed by thread.
  */
-private static final Hashtable threadObjectBindings = new 
Hashtable<>();
+private static final Map threadObjectBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings class loader - naming context. Keyed by class loader.
  */
-private static final Hashtable clBindings = new 
Hashtable<>();
+private static final Map clBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings class loader - object. Keyed by class loader.
  */
-private static final Hashtable clObjectBindings = new 
Hashtable<>();
+private static final Map clObjectBindings = new 
ConcurrentHashMap<>();
 
 
 /**


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



[tomcat] branch 10.0.x updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 29ce690251 Refactor to avoid use of Hashtable. No functional change.
29ce690251 is described below

commit 29ce690251777f13aec5876290b3e667da8bb090
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:04:39 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/naming/ContextAccessController.java |  7 ---
 java/org/apache/naming/ContextBindings.java | 13 +++--
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/naming/ContextAccessController.java 
b/java/org/apache/naming/ContextAccessController.java
index 301d648eea..0fad089be5 100644
--- a/java/org/apache/naming/ContextAccessController.java
+++ b/java/org/apache/naming/ContextAccessController.java
@@ -16,7 +16,8 @@
  */
 package org.apache.naming;
 
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Handles the access control on the JNDI contexts.
@@ -30,13 +31,13 @@ public class ContextAccessController {
 /**
  * Catalina context names on which writing is not allowed.
  */
-private static final Hashtable readOnlyContexts = new 
Hashtable<>();
+private static final Map readOnlyContexts = new 
ConcurrentHashMap<>();
 
 
 /**
  * Security tokens repository.
  */
-private static final Hashtable securityTokens = new 
Hashtable<>();
+private static final Map securityTokens = new 
ConcurrentHashMap<>();
 
 
 // - Public Methods
diff --git a/java/org/apache/naming/ContextBindings.java 
b/java/org/apache/naming/ContextBindings.java
index ae509b27b7..baf3ce2bdb 100644
--- a/java/org/apache/naming/ContextBindings.java
+++ b/java/org/apache/naming/ContextBindings.java
@@ -16,7 +16,8 @@
  */
 package org.apache.naming;
 
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.naming.Context;
 import javax.naming.NamingException;
@@ -42,31 +43,31 @@ public class ContextBindings {
 /**
  * Bindings object - naming context. Keyed by object.
  */
-private static final Hashtable objectBindings = new 
Hashtable<>();
+private static final Map objectBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings thread - naming context. Keyed by thread.
  */
-private static final Hashtable threadBindings = new 
Hashtable<>();
+private static final Map threadBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings thread - object. Keyed by thread.
  */
-private static final Hashtable threadObjectBindings = new 
Hashtable<>();
+private static final Map threadObjectBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings class loader - naming context. Keyed by class loader.
  */
-private static final Hashtable clBindings = new 
Hashtable<>();
+private static final Map clBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings class loader - object. Keyed by class loader.
  */
-private static final Hashtable clObjectBindings = new 
Hashtable<>();
+private static final Map clObjectBindings = new 
ConcurrentHashMap<>();
 
 
 /**


-
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: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 0fa8cf9a18 Refactor to avoid use of Hashtable. No functional change.
0fa8cf9a18 is described below

commit 0fa8cf9a185f699c74307c5a91b67958f5d7443d
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:04:39 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/naming/ContextAccessController.java |  7 ---
 java/org/apache/naming/ContextBindings.java | 13 +++--
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/naming/ContextAccessController.java 
b/java/org/apache/naming/ContextAccessController.java
index 301d648eea..0fad089be5 100644
--- a/java/org/apache/naming/ContextAccessController.java
+++ b/java/org/apache/naming/ContextAccessController.java
@@ -16,7 +16,8 @@
  */
 package org.apache.naming;
 
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Handles the access control on the JNDI contexts.
@@ -30,13 +31,13 @@ public class ContextAccessController {
 /**
  * Catalina context names on which writing is not allowed.
  */
-private static final Hashtable readOnlyContexts = new 
Hashtable<>();
+private static final Map readOnlyContexts = new 
ConcurrentHashMap<>();
 
 
 /**
  * Security tokens repository.
  */
-private static final Hashtable securityTokens = new 
Hashtable<>();
+private static final Map securityTokens = new 
ConcurrentHashMap<>();
 
 
 // - Public Methods
diff --git a/java/org/apache/naming/ContextBindings.java 
b/java/org/apache/naming/ContextBindings.java
index ae509b27b7..baf3ce2bdb 100644
--- a/java/org/apache/naming/ContextBindings.java
+++ b/java/org/apache/naming/ContextBindings.java
@@ -16,7 +16,8 @@
  */
 package org.apache.naming;
 
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.naming.Context;
 import javax.naming.NamingException;
@@ -42,31 +43,31 @@ public class ContextBindings {
 /**
  * Bindings object - naming context. Keyed by object.
  */
-private static final Hashtable objectBindings = new 
Hashtable<>();
+private static final Map objectBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings thread - naming context. Keyed by thread.
  */
-private static final Hashtable threadBindings = new 
Hashtable<>();
+private static final Map threadBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings thread - object. Keyed by thread.
  */
-private static final Hashtable threadObjectBindings = new 
Hashtable<>();
+private static final Map threadObjectBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings class loader - naming context. Keyed by class loader.
  */
-private static final Hashtable clBindings = new 
Hashtable<>();
+private static final Map clBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings class loader - object. Keyed by class loader.
  */
-private static final Hashtable clObjectBindings = new 
Hashtable<>();
+private static final Map clObjectBindings = new 
ConcurrentHashMap<>();
 
 
 /**


-
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: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new f80f42e21c Refactor to avoid use of Hashtable. No functional change.
f80f42e21c is described below

commit f80f42e21c1da2668336008507314e1770d5047e
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:04:39 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 java/org/apache/naming/ContextAccessController.java |  7 ---
 java/org/apache/naming/ContextBindings.java | 13 +++--
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/naming/ContextAccessController.java 
b/java/org/apache/naming/ContextAccessController.java
index 301d648eea..0fad089be5 100644
--- a/java/org/apache/naming/ContextAccessController.java
+++ b/java/org/apache/naming/ContextAccessController.java
@@ -16,7 +16,8 @@
  */
 package org.apache.naming;
 
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Handles the access control on the JNDI contexts.
@@ -30,13 +31,13 @@ public class ContextAccessController {
 /**
  * Catalina context names on which writing is not allowed.
  */
-private static final Hashtable readOnlyContexts = new 
Hashtable<>();
+private static final Map readOnlyContexts = new 
ConcurrentHashMap<>();
 
 
 /**
  * Security tokens repository.
  */
-private static final Hashtable securityTokens = new 
Hashtable<>();
+private static final Map securityTokens = new 
ConcurrentHashMap<>();
 
 
 // - Public Methods
diff --git a/java/org/apache/naming/ContextBindings.java 
b/java/org/apache/naming/ContextBindings.java
index ae509b27b7..baf3ce2bdb 100644
--- a/java/org/apache/naming/ContextBindings.java
+++ b/java/org/apache/naming/ContextBindings.java
@@ -16,7 +16,8 @@
  */
 package org.apache.naming;
 
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.naming.Context;
 import javax.naming.NamingException;
@@ -42,31 +43,31 @@ public class ContextBindings {
 /**
  * Bindings object - naming context. Keyed by object.
  */
-private static final Hashtable objectBindings = new 
Hashtable<>();
+private static final Map objectBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings thread - naming context. Keyed by thread.
  */
-private static final Hashtable threadBindings = new 
Hashtable<>();
+private static final Map threadBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings thread - object. Keyed by thread.
  */
-private static final Hashtable threadObjectBindings = new 
Hashtable<>();
+private static final Map threadObjectBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings class loader - naming context. Keyed by class loader.
  */
-private static final Hashtable clBindings = new 
Hashtable<>();
+private static final Map clBindings = new 
ConcurrentHashMap<>();
 
 
 /**
  * Bindings class loader - object. Keyed by class loader.
  */
-private static final Hashtable clObjectBindings = new 
Hashtable<>();
+private static final Map clObjectBindings = new 
ConcurrentHashMap<>();
 
 
 /**


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



[tomcat] branch main updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 da947664cb Refactor to avoid use of Hashtable. No functional change.
da947664cb is described below

commit da947664cbafa249d33b0d23a3b198a12af11f79
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:19:07 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 .../MbeansDescriptorsIntrospectionSource.java  | 43 ++
 1 file changed, 20 insertions(+), 23 deletions(-)

diff --git 
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
 
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
index 1cb096c9be..05f393d023 100644
--- 
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
+++ 
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
@@ -21,9 +21,9 @@ import java.lang.reflect.Modifier;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Map.Entry;
 
 import javax.management.ObjectName;
@@ -94,7 +94,7 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
 
 //  Implementation for non-declared introspection classes
 
-private static final Hashtable specialMethods = new 
Hashtable<>();
+private static final Map specialMethods = new HashMap<>();
 static {
 specialMethods.put( "preDeregister", "");
 specialMethods.put( "postDeregister", "");
@@ -194,9 +194,9 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
  * @param setAttMap The settable attributes map
  * @param invokeAttMap The invokable attributes map
  */
-private void initMethods(Class realClass, Method methods[], 
Hashtable attMap,
-Hashtable getAttMap, Hashtable 
setAttMap,
-Hashtable invokeAttMap) {
+private void initMethods(Class realClass, Method methods[], 
Map attMap,
+Map getAttMap, Map setAttMap,
+Map invokeAttMap) {
 
 for (Method method : methods) {
 String name = method.getName();
@@ -294,32 +294,29 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
 
 Method methods[]=null;
 
-Hashtable attMap = new Hashtable<>();
+Map attMap = new HashMap<>();
 // key: attribute val: getter method
-Hashtable getAttMap = new Hashtable<>();
+Map getAttMap = new HashMap<>();
 // key: attribute val: setter method
-Hashtable setAttMap = new Hashtable<>();
+Map setAttMap = new HashMap<>();
 // key: operation val: invoke method
-Hashtable invokeAttMap = new Hashtable<>();
+Map invokeAttMap = new HashMap<>();
 
 methods = realClass.getMethods();
 
 initMethods(realClass, methods, attMap, getAttMap, setAttMap, 
invokeAttMap );
 
 try {
-
-Enumeration en = attMap.keys();
-while( en.hasMoreElements() ) {
-String name = en.nextElement();
-AttributeInfo ai=new AttributeInfo();
-ai.setName( name );
-Method gm = getAttMap.get(name);
-if( gm!=null ) {
-//ai.setGetMethodObj( gm );
-ai.setGetMethod( gm.getName());
-Class t=gm.getReturnType();
-if( t!=null ) {
-ai.setType( t.getName() );
+for (Entry attEntry : attMap.entrySet()) {
+String name = attEntry.getKey();
+AttributeInfo ai = new AttributeInfo();
+ai.setName(name);
+Method gm = attEntry.getValue();
+if (gm != null) {
+ai.setGetMethod(gm.getName());
+Class t = gm.getReturnType();
+if (t != null) {
+ai.setType(t.getName());
 }
 }
 Method sm = setAttMap.get(name);


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



[tomcat] branch 10.0.x updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new a0a946c823 Refactor to avoid use of Hashtable. No functional change.
a0a946c823 is described below

commit a0a946c823661107afc8d9aefa059a9458487d06
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:19:07 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 .../MbeansDescriptorsIntrospectionSource.java  | 43 ++
 1 file changed, 20 insertions(+), 23 deletions(-)

diff --git 
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
 
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
index 1cb096c9be..05f393d023 100644
--- 
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
+++ 
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
@@ -21,9 +21,9 @@ import java.lang.reflect.Modifier;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Map.Entry;
 
 import javax.management.ObjectName;
@@ -94,7 +94,7 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
 
 //  Implementation for non-declared introspection classes
 
-private static final Hashtable specialMethods = new 
Hashtable<>();
+private static final Map specialMethods = new HashMap<>();
 static {
 specialMethods.put( "preDeregister", "");
 specialMethods.put( "postDeregister", "");
@@ -194,9 +194,9 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
  * @param setAttMap The settable attributes map
  * @param invokeAttMap The invokable attributes map
  */
-private void initMethods(Class realClass, Method methods[], 
Hashtable attMap,
-Hashtable getAttMap, Hashtable 
setAttMap,
-Hashtable invokeAttMap) {
+private void initMethods(Class realClass, Method methods[], 
Map attMap,
+Map getAttMap, Map setAttMap,
+Map invokeAttMap) {
 
 for (Method method : methods) {
 String name = method.getName();
@@ -294,32 +294,29 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
 
 Method methods[]=null;
 
-Hashtable attMap = new Hashtable<>();
+Map attMap = new HashMap<>();
 // key: attribute val: getter method
-Hashtable getAttMap = new Hashtable<>();
+Map getAttMap = new HashMap<>();
 // key: attribute val: setter method
-Hashtable setAttMap = new Hashtable<>();
+Map setAttMap = new HashMap<>();
 // key: operation val: invoke method
-Hashtable invokeAttMap = new Hashtable<>();
+Map invokeAttMap = new HashMap<>();
 
 methods = realClass.getMethods();
 
 initMethods(realClass, methods, attMap, getAttMap, setAttMap, 
invokeAttMap );
 
 try {
-
-Enumeration en = attMap.keys();
-while( en.hasMoreElements() ) {
-String name = en.nextElement();
-AttributeInfo ai=new AttributeInfo();
-ai.setName( name );
-Method gm = getAttMap.get(name);
-if( gm!=null ) {
-//ai.setGetMethodObj( gm );
-ai.setGetMethod( gm.getName());
-Class t=gm.getReturnType();
-if( t!=null ) {
-ai.setType( t.getName() );
+for (Entry attEntry : attMap.entrySet()) {
+String name = attEntry.getKey();
+AttributeInfo ai = new AttributeInfo();
+ai.setName(name);
+Method gm = attEntry.getValue();
+if (gm != null) {
+ai.setGetMethod(gm.getName());
+Class t = gm.getReturnType();
+if (t != null) {
+ai.setType(t.getName());
 }
 }
 Method sm = setAttMap.get(name);


-
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: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 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 d2884ea9cc Refactor to avoid use of Hashtable. No functional change.
d2884ea9cc is described below

commit d2884ea9ccf7d8780515344cc7f1b172645b6c03
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:19:07 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 .../MbeansDescriptorsIntrospectionSource.java  | 43 ++
 1 file changed, 20 insertions(+), 23 deletions(-)

diff --git 
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
 
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
index 1cb096c9be..05f393d023 100644
--- 
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
+++ 
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
@@ -21,9 +21,9 @@ import java.lang.reflect.Modifier;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Map.Entry;
 
 import javax.management.ObjectName;
@@ -94,7 +94,7 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
 
 //  Implementation for non-declared introspection classes
 
-private static final Hashtable specialMethods = new 
Hashtable<>();
+private static final Map specialMethods = new HashMap<>();
 static {
 specialMethods.put( "preDeregister", "");
 specialMethods.put( "postDeregister", "");
@@ -194,9 +194,9 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
  * @param setAttMap The settable attributes map
  * @param invokeAttMap The invokable attributes map
  */
-private void initMethods(Class realClass, Method methods[], 
Hashtable attMap,
-Hashtable getAttMap, Hashtable 
setAttMap,
-Hashtable invokeAttMap) {
+private void initMethods(Class realClass, Method methods[], 
Map attMap,
+Map getAttMap, Map setAttMap,
+Map invokeAttMap) {
 
 for (Method method : methods) {
 String name = method.getName();
@@ -294,32 +294,29 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
 
 Method methods[]=null;
 
-Hashtable attMap = new Hashtable<>();
+Map attMap = new HashMap<>();
 // key: attribute val: getter method
-Hashtable getAttMap = new Hashtable<>();
+Map getAttMap = new HashMap<>();
 // key: attribute val: setter method
-Hashtable setAttMap = new Hashtable<>();
+Map setAttMap = new HashMap<>();
 // key: operation val: invoke method
-Hashtable invokeAttMap = new Hashtable<>();
+Map invokeAttMap = new HashMap<>();
 
 methods = realClass.getMethods();
 
 initMethods(realClass, methods, attMap, getAttMap, setAttMap, 
invokeAttMap );
 
 try {
-
-Enumeration en = attMap.keys();
-while( en.hasMoreElements() ) {
-String name = en.nextElement();
-AttributeInfo ai=new AttributeInfo();
-ai.setName( name );
-Method gm = getAttMap.get(name);
-if( gm!=null ) {
-//ai.setGetMethodObj( gm );
-ai.setGetMethod( gm.getName());
-Class t=gm.getReturnType();
-if( t!=null ) {
-ai.setType( t.getName() );
+for (Entry attEntry : attMap.entrySet()) {
+String name = attEntry.getKey();
+AttributeInfo ai = new AttributeInfo();
+ai.setName(name);
+Method gm = attEntry.getValue();
+if (gm != null) {
+ai.setGetMethod(gm.getName());
+Class t = gm.getReturnType();
+if (t != null) {
+ai.setType(t.getName());
 }
 }
 Method sm = setAttMap.get(name);


-
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: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 9a9d6f565e Refactor to avoid use of Hashtable. No functional change.
9a9d6f565e is described below

commit 9a9d6f565e13d4c8a6ef2a35b30ef189da49a01a
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:19:07 2022 +0100

Refactor to avoid use of Hashtable. No functional change.
---
 .../MbeansDescriptorsIntrospectionSource.java  | 43 ++
 1 file changed, 20 insertions(+), 23 deletions(-)

diff --git 
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
 
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
index 1cb096c9be..05f393d023 100644
--- 
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
+++ 
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
@@ -21,9 +21,9 @@ import java.lang.reflect.Modifier;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Map.Entry;
 
 import javax.management.ObjectName;
@@ -94,7 +94,7 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
 
 //  Implementation for non-declared introspection classes
 
-private static final Hashtable specialMethods = new 
Hashtable<>();
+private static final Map specialMethods = new HashMap<>();
 static {
 specialMethods.put( "preDeregister", "");
 specialMethods.put( "postDeregister", "");
@@ -194,9 +194,9 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
  * @param setAttMap The settable attributes map
  * @param invokeAttMap The invokable attributes map
  */
-private void initMethods(Class realClass, Method methods[], 
Hashtable attMap,
-Hashtable getAttMap, Hashtable 
setAttMap,
-Hashtable invokeAttMap) {
+private void initMethods(Class realClass, Method methods[], 
Map attMap,
+Map getAttMap, Map setAttMap,
+Map invokeAttMap) {
 
 for (Method method : methods) {
 String name = method.getName();
@@ -294,32 +294,29 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
 
 Method methods[]=null;
 
-Hashtable attMap = new Hashtable<>();
+Map attMap = new HashMap<>();
 // key: attribute val: getter method
-Hashtable getAttMap = new Hashtable<>();
+Map getAttMap = new HashMap<>();
 // key: attribute val: setter method
-Hashtable setAttMap = new Hashtable<>();
+Map setAttMap = new HashMap<>();
 // key: operation val: invoke method
-Hashtable invokeAttMap = new Hashtable<>();
+Map invokeAttMap = new HashMap<>();
 
 methods = realClass.getMethods();
 
 initMethods(realClass, methods, attMap, getAttMap, setAttMap, 
invokeAttMap );
 
 try {
-
-Enumeration en = attMap.keys();
-while( en.hasMoreElements() ) {
-String name = en.nextElement();
-AttributeInfo ai=new AttributeInfo();
-ai.setName( name );
-Method gm = getAttMap.get(name);
-if( gm!=null ) {
-//ai.setGetMethodObj( gm );
-ai.setGetMethod( gm.getName());
-Class t=gm.getReturnType();
-if( t!=null ) {
-ai.setType( t.getName() );
+for (Entry attEntry : attMap.entrySet()) {
+String name = attEntry.getKey();
+AttributeInfo ai = new AttributeInfo();
+ai.setName(name);
+Method gm = attEntry.getValue();
+if (gm != null) {
+ai.setGetMethod(gm.getName());
+Class t = gm.getReturnType();
+if (t != null) {
+ai.setType(t.getName());
 }
 }
 Method sm = setAttMap.get(name);


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



[tomcat] branch main updated: Refactor to avoid use of Hashtable where possible. No functional change.

2022-09-15 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 356839f52d Refactor to avoid use of Hashtable where possible. No 
functional change.
356839f52d is described below

commit 356839f52d484d8f41fc3edb52900b1b2739c506
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:25:35 2022 +0100

Refactor to avoid use of Hashtable where possible. No functional change.
---
 java/org/apache/tomcat/util/IntrospectionUtils.java   | 4 +++-
 test/org/apache/catalina/tribes/demos/IntrospectionUtils.java | 5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java 
b/java/org/apache/tomcat/util/IntrospectionUtils.java
index ff13d115a1..c5da1b5f45 100644
--- a/java/org/apache/tomcat/util/IntrospectionUtils.java
+++ b/java/org/apache/tomcat/util/IntrospectionUtils.java
@@ -21,6 +21,8 @@ import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -407,7 +409,7 @@ public final class IntrospectionUtils {
 objectMethods.clear();
 }
 
-private static final Hashtable,Method[]> objectMethods = new 
Hashtable<>();
+private static final Map,Method[]> objectMethods = new 
ConcurrentHashMap<>();
 
 public static Method[] findMethods(Class c) {
 Method methods[] = objectMethods.get(c);
diff --git a/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java 
b/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
index 816a1ae5c9..885d56701c 100644
--- a/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
+++ b/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
@@ -20,7 +20,8 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -209,7 +210,7 @@ public final class IntrospectionUtils {
 objectMethods.clear();
 }
 
-static Hashtable,Method[]> objectMethods = new Hashtable<>();
+static Map,Method[]> objectMethods = new ConcurrentHashMap<>();
 
 public static Method[] findMethods(Class c) {
 Method methods[] = objectMethods.get(c);


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



[tomcat] branch 10.0.x updated: Refactor to avoid use of Hashtable where possible. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new dd1019ec90 Refactor to avoid use of Hashtable where possible. No 
functional change.
dd1019ec90 is described below

commit dd1019ec9039dc0212468e2ea218406de32563d3
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:25:35 2022 +0100

Refactor to avoid use of Hashtable where possible. No functional change.
---
 java/org/apache/tomcat/util/IntrospectionUtils.java   | 4 +++-
 test/org/apache/catalina/tribes/demos/IntrospectionUtils.java | 5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java 
b/java/org/apache/tomcat/util/IntrospectionUtils.java
index ff13d115a1..c5da1b5f45 100644
--- a/java/org/apache/tomcat/util/IntrospectionUtils.java
+++ b/java/org/apache/tomcat/util/IntrospectionUtils.java
@@ -21,6 +21,8 @@ import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -407,7 +409,7 @@ public final class IntrospectionUtils {
 objectMethods.clear();
 }
 
-private static final Hashtable,Method[]> objectMethods = new 
Hashtable<>();
+private static final Map,Method[]> objectMethods = new 
ConcurrentHashMap<>();
 
 public static Method[] findMethods(Class c) {
 Method methods[] = objectMethods.get(c);
diff --git a/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java 
b/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
index 816a1ae5c9..885d56701c 100644
--- a/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
+++ b/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
@@ -20,7 +20,8 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -209,7 +210,7 @@ public final class IntrospectionUtils {
 objectMethods.clear();
 }
 
-static Hashtable,Method[]> objectMethods = new Hashtable<>();
+static Map,Method[]> objectMethods = new ConcurrentHashMap<>();
 
 public static Method[] findMethods(Class c) {
 Method methods[] = objectMethods.get(c);


-
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: Refactor to avoid use of Hashtable where possible. No functional change.

2022-09-15 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 d94dcbb0d2 Refactor to avoid use of Hashtable where possible. No 
functional change.
d94dcbb0d2 is described below

commit d94dcbb0d2aa6ea4a217c7e8bc1fcc7f676bab64
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:25:35 2022 +0100

Refactor to avoid use of Hashtable where possible. No functional change.
---
 java/org/apache/tomcat/util/IntrospectionUtils.java   | 4 +++-
 test/org/apache/catalina/tribes/demos/IntrospectionUtils.java | 5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java 
b/java/org/apache/tomcat/util/IntrospectionUtils.java
index 36dbcdffd2..0818d90fee 100644
--- a/java/org/apache/tomcat/util/IntrospectionUtils.java
+++ b/java/org/apache/tomcat/util/IntrospectionUtils.java
@@ -21,6 +21,8 @@ import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -402,7 +404,7 @@ public final class IntrospectionUtils {
 objectMethods.clear();
 }
 
-private static final Hashtable,Method[]> objectMethods = new 
Hashtable<>();
+private static final Map,Method[]> objectMethods = new 
ConcurrentHashMap<>();
 
 public static Method[] findMethods(Class c) {
 Method methods[] = objectMethods.get(c);
diff --git a/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java 
b/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
index 816a1ae5c9..885d56701c 100644
--- a/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
+++ b/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
@@ -20,7 +20,8 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -209,7 +210,7 @@ public final class IntrospectionUtils {
 objectMethods.clear();
 }
 
-static Hashtable,Method[]> objectMethods = new Hashtable<>();
+static Map,Method[]> objectMethods = new ConcurrentHashMap<>();
 
 public static Method[] findMethods(Class c) {
 Method methods[] = objectMethods.get(c);


-
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: Refactor to avoid use of Hashtable where possible. No functional change.

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 709d13c693 Refactor to avoid use of Hashtable where possible. No 
functional change.
709d13c693 is described below

commit 709d13c6932e07bc907f4f888fa5d5f20e7ead19
Author: Mark Thomas 
AuthorDate: Thu Sep 15 17:25:35 2022 +0100

Refactor to avoid use of Hashtable where possible. No functional change.
---
 java/org/apache/tomcat/util/IntrospectionUtils.java   | 4 +++-
 test/org/apache/catalina/tribes/demos/IntrospectionUtils.java | 5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java 
b/java/org/apache/tomcat/util/IntrospectionUtils.java
index a10a42ca96..4345e4a988 100644
--- a/java/org/apache/tomcat/util/IntrospectionUtils.java
+++ b/java/org/apache/tomcat/util/IntrospectionUtils.java
@@ -21,6 +21,8 @@ import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -359,7 +361,7 @@ public final class IntrospectionUtils {
 objectMethods.clear();
 }
 
-private static final Hashtable,Method[]> objectMethods = new 
Hashtable<>();
+private static final Map,Method[]> objectMethods = new 
ConcurrentHashMap<>();
 
 public static Method[] findMethods(Class c) {
 Method methods[] = objectMethods.get(c);
diff --git a/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java 
b/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
index 816a1ae5c9..885d56701c 100644
--- a/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
+++ b/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
@@ -20,7 +20,8 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -209,7 +210,7 @@ public final class IntrospectionUtils {
 objectMethods.clear();
 }
 
-static Hashtable,Method[]> objectMethods = new Hashtable<>();
+static Map,Method[]> objectMethods = new ConcurrentHashMap<>();
 
 public static Method[] findMethods(Class c) {
 Method methods[] = objectMethods.get(c);


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



Re: [VOTE] Apache Tomcat migration tool for Jakarta EE 1.0.4

2022-09-15 Thread Felix Schumacher


Am 15.09.22 um 16:32 schrieb Mark Thomas:

On 15/09/2022 14:36, Felix Schumacher wrote:


Am 15.09.22 um 11:06 schrieb Mark Thomas:

The proposed Apache Tomcat migration tool for Jakarta EE 1.0.4 is now
available for voting.

The significant changes since 1.0.3 are:

- Issue #26 - Re-fix
- PR #28 - Add Jakarta EE -. Java EE profile (with warnings)
- Add checkstyle

It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v1.0.4/ 



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



The tag is:
https://github.com/apache/tomcat-jakartaee-migration/tree/1.0.4
a74aad315b8af81de0fa1837acc2adb278f5cb5a

The proposed 1.0.4 release is:

[ ] -1: Broken. Do not release because...
[x] +1: Acceptable. Go ahead and release.


When I try to build the sources from the tar.gz maven complains about 
missing checkstyle files:


[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-checkstyle-plugin:3.2.0:check 
(validate) on project jakartaee-migration: Failed during checkstyle 
execution: Unable to find configuration file at location: 
res/checkstyle/checkstyle.xml: Could not find resource 
'res/checkstyle/checkstyle.xml'. -> [Help 1]


When I copy the files from git into the source folder mvn verify 
works as expected.


I'll get that fixed.

Do we want 1.0.5 for this?


I would be OK without a fix, but wasn't sure about it generally.

Felix



Mark

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



OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


[tomcat] branch main updated: Refactor to replace Stack with ArrayDeque / ConcurrentLinkedQueue

2022-09-15 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 44e3d8aeb6 Refactor to replace Stack with ArrayDeque / 
ConcurrentLinkedQueue
44e3d8aeb6 is described below

commit 44e3d8aeb6e9fdcf7c4ea069f60ba66d2a7bd663
Author: Mark Thomas 
AuthorDate: Thu Sep 15 19:41:45 2022 +0100

Refactor to replace Stack with ArrayDeque / ConcurrentLinkedQueue
---
 java/org/apache/catalina/core/StandardContext.java | 11 +-
 .../apache/catalina/servlets/WebdavServlet.java| 15 +++---
 .../apache/jasper/compiler/ParserController.java   | 15 +++---
 .../apache/tomcat/util/log/SystemLogHandler.java   | 24 --
 4 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index 6c75f88e9c..3b9c12d4be 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -24,6 +24,7 @@ import java.net.URL;
 import java.nio.charset.StandardCharsets;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -36,8 +37,8 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Queue;
 import java.util.Set;
-import java.util.Stack;
 import java.util.TreeMap;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -5856,14 +5857,14 @@ public class StandardContext extends ContainerBase
 if (parent == null) {
 namingContextName = getName();
 } else {
-Stack stk = new Stack<>();
+Queue stk = new ArrayDeque<>();
 StringBuilder buff = new StringBuilder();
 while (parent != null) {
-stk.push(parent.getName());
+stk.add(parent.getName());
 parent = parent.getParent();
 }
-while (!stk.empty()) {
-buff.append("/" + stk.pop());
+while (!stk.isEmpty()) {
+buff.append("/" + stk.remove());
 }
 buff.append(getName());
 namingContextName = buff.toString();
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 0a5f401399..7b9e7f84fd 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -25,6 +25,7 @@ import java.io.Writer;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.nio.charset.StandardCharsets;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
@@ -33,7 +34,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Stack;
+import java.util.Queue;
 import java.util.TimeZone;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -617,15 +618,15 @@ public class WebdavServlet extends DefaultServlet {
 parseProperties(req, generatedXML, path, type, properties);
 } else {
 // The stack always contains the object of the current level
-Stack stack = new Stack<>();
-stack.push(path);
+Queue stack = new ArrayDeque<>();
+stack.add(path);
 
 // Stack of the objects one level below
-Stack stackBelow = new Stack<>();
+Queue stackBelow = new ArrayDeque<>();
 
 while ((!stack.isEmpty()) && (depth >= 0)) {
 
-String currentPath = stack.pop();
+String currentPath = stack.remove();
 parseProperties(req, generatedXML, currentPath, type, 
properties);
 
 resource = resources.getResource(currentPath);
@@ -639,7 +640,7 @@ public class WebdavServlet extends DefaultServlet {
 newPath += "/";
 }
 newPath += entry;
-stackBelow.push(newPath);
+stackBelow.add(newPath);
 }
 
 // Displaying the lock-null resources present in that
@@ -659,7 +660,7 @@ public class WebdavServlet extends DefaultServlet {
 if (stack.isEmpty()) {
 depth--;
 stack = stackBelow;
-stackBelow = new Stack<>();
+stackBelow = new ArrayDeque<>();
 }
 
 generatedXML.sendData();
diff --git a/java/org/apache/jasper/compiler/ParserController.java 
b/java/org/apache/jasper/co

[tomcat] branch 10.0.x updated: Refactor to replace Stack with ArrayDeque / ConcurrentLinkedQueue

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 090ea15ad9 Refactor to replace Stack with ArrayDeque / 
ConcurrentLinkedQueue
090ea15ad9 is described below

commit 090ea15ad96f686894f09812ffe5137b7c486374
Author: Mark Thomas 
AuthorDate: Thu Sep 15 19:41:45 2022 +0100

Refactor to replace Stack with ArrayDeque / ConcurrentLinkedQueue
---
 java/org/apache/catalina/core/StandardContext.java | 11 +-
 .../apache/catalina/servlets/WebdavServlet.java| 15 +++---
 .../apache/jasper/compiler/ParserController.java   | 15 +++---
 .../apache/tomcat/util/log/SystemLogHandler.java   | 24 --
 4 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index fa429303c0..15a1135427 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -24,6 +24,7 @@ import java.net.URL;
 import java.nio.charset.StandardCharsets;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -36,8 +37,8 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Queue;
 import java.util.Set;
-import java.util.Stack;
 import java.util.TreeMap;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -5872,14 +5873,14 @@ public class StandardContext extends ContainerBase
 if (parent == null) {
 namingContextName = getName();
 } else {
-Stack stk = new Stack<>();
+Queue stk = new ArrayDeque<>();
 StringBuilder buff = new StringBuilder();
 while (parent != null) {
-stk.push(parent.getName());
+stk.add(parent.getName());
 parent = parent.getParent();
 }
-while (!stk.empty()) {
-buff.append("/" + stk.pop());
+while (!stk.isEmpty()) {
+buff.append("/" + stk.remove());
 }
 buff.append(getName());
 namingContextName = buff.toString();
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 0a5f401399..7b9e7f84fd 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -25,6 +25,7 @@ import java.io.Writer;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.nio.charset.StandardCharsets;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
@@ -33,7 +34,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Stack;
+import java.util.Queue;
 import java.util.TimeZone;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -617,15 +618,15 @@ public class WebdavServlet extends DefaultServlet {
 parseProperties(req, generatedXML, path, type, properties);
 } else {
 // The stack always contains the object of the current level
-Stack stack = new Stack<>();
-stack.push(path);
+Queue stack = new ArrayDeque<>();
+stack.add(path);
 
 // Stack of the objects one level below
-Stack stackBelow = new Stack<>();
+Queue stackBelow = new ArrayDeque<>();
 
 while ((!stack.isEmpty()) && (depth >= 0)) {
 
-String currentPath = stack.pop();
+String currentPath = stack.remove();
 parseProperties(req, generatedXML, currentPath, type, 
properties);
 
 resource = resources.getResource(currentPath);
@@ -639,7 +640,7 @@ public class WebdavServlet extends DefaultServlet {
 newPath += "/";
 }
 newPath += entry;
-stackBelow.push(newPath);
+stackBelow.add(newPath);
 }
 
 // Displaying the lock-null resources present in that
@@ -659,7 +660,7 @@ public class WebdavServlet extends DefaultServlet {
 if (stack.isEmpty()) {
 depth--;
 stack = stackBelow;
-stackBelow = new Stack<>();
+stackBelow = new ArrayDeque<>();
 }
 
 generatedXML.sendData();
diff --git a/java/org/apache/jasper/compiler/ParserController.java 
b/java/org/apache/jaspe

[tomcat] branch 9.0.x updated: Refactor to replace Stack with ArrayDeque / ConcurrentLinkedQueue

2022-09-15 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 421318ca01 Refactor to replace Stack with ArrayDeque / 
ConcurrentLinkedQueue
421318ca01 is described below

commit 421318ca014ecefd5000f5982bb6f0c18e346040
Author: Mark Thomas 
AuthorDate: Thu Sep 15 19:41:45 2022 +0100

Refactor to replace Stack with ArrayDeque / ConcurrentLinkedQueue
---
 java/org/apache/catalina/core/StandardContext.java | 11 +-
 .../apache/catalina/servlets/WebdavServlet.java| 15 +++---
 .../apache/jasper/compiler/ParserController.java   | 15 +++---
 .../apache/tomcat/util/log/SystemLogHandler.java   | 24 --
 4 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index bb15fa9d81..819746e590 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -24,6 +24,7 @@ import java.net.URL;
 import java.nio.charset.StandardCharsets;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -36,8 +37,8 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Queue;
 import java.util.Set;
-import java.util.Stack;
 import java.util.TreeMap;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -5923,14 +5924,14 @@ public class StandardContext extends ContainerBase
 if (parent == null) {
 namingContextName = getName();
 } else {
-Stack stk = new Stack<>();
+Queue stk = new ArrayDeque<>();
 StringBuilder buff = new StringBuilder();
 while (parent != null) {
-stk.push(parent.getName());
+stk.add(parent.getName());
 parent = parent.getParent();
 }
-while (!stk.empty()) {
-buff.append("/" + stk.pop());
+while (!stk.isEmpty()) {
+buff.append("/" + stk.remove());
 }
 buff.append(getName());
 namingContextName = buff.toString();
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 465818cb4c..a0bf15353f 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -25,6 +25,7 @@ import java.io.Writer;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.nio.charset.StandardCharsets;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
@@ -33,7 +34,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Stack;
+import java.util.Queue;
 import java.util.TimeZone;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -616,15 +617,15 @@ public class WebdavServlet extends DefaultServlet {
 parseProperties(req, generatedXML, path, type, properties);
 } else {
 // The stack always contains the object of the current level
-Stack stack = new Stack<>();
-stack.push(path);
+Queue stack = new ArrayDeque<>();
+stack.add(path);
 
 // Stack of the objects one level below
-Stack stackBelow = new Stack<>();
+Queue stackBelow = new ArrayDeque<>();
 
 while ((!stack.isEmpty()) && (depth >= 0)) {
 
-String currentPath = stack.pop();
+String currentPath = stack.remove();
 parseProperties(req, generatedXML, currentPath, type, 
properties);
 
 resource = resources.getResource(currentPath);
@@ -638,7 +639,7 @@ public class WebdavServlet extends DefaultServlet {
 newPath += "/";
 }
 newPath += entry;
-stackBelow.push(newPath);
+stackBelow.add(newPath);
 }
 
 // Displaying the lock-null resources present in that
@@ -658,7 +659,7 @@ public class WebdavServlet extends DefaultServlet {
 if (stack.isEmpty()) {
 depth--;
 stack = stackBelow;
-stackBelow = new Stack<>();
+stackBelow = new ArrayDeque<>();
 }
 
 generatedXML.sendData();
diff --git a/java/org/apache/jasper/compiler/ParserController.java 
b/java/org/apache/jasper/

[tomcat] branch 8.5.x updated: Refactor to replace Stack with ArrayDeque / ConcurrentLinkedQueue

2022-09-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new ba42bfc1bd Refactor to replace Stack with ArrayDeque / 
ConcurrentLinkedQueue
ba42bfc1bd is described below

commit ba42bfc1bdf53d2ce307df37057f2ed3c1fe6fc5
Author: Mark Thomas 
AuthorDate: Thu Sep 15 19:41:45 2022 +0100

Refactor to replace Stack with ArrayDeque / ConcurrentLinkedQueue
---
 java/org/apache/catalina/core/StandardContext.java | 11 +-
 .../apache/catalina/servlets/WebdavServlet.java| 15 +++---
 .../apache/jasper/compiler/ParserController.java   | 15 +++---
 .../apache/tomcat/util/log/SystemLogHandler.java   | 24 --
 4 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index 4676b7c978..e2370445af 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -24,6 +24,7 @@ import java.net.URL;
 import java.nio.charset.StandardCharsets;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -36,8 +37,8 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Queue;
 import java.util.Set;
-import java.util.Stack;
 import java.util.TreeMap;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
@@ -5913,14 +5914,14 @@ public class StandardContext extends ContainerBase
 if (parent == null) {
 namingContextName = getName();
 } else {
-Stack stk = new Stack<>();
+Queue stk = new ArrayDeque<>();
 StringBuilder buff = new StringBuilder();
 while (parent != null) {
-stk.push(parent.getName());
+stk.add(parent.getName());
 parent = parent.getParent();
 }
-while (!stk.empty()) {
-buff.append("/" + stk.pop());
+while (!stk.isEmpty()) {
+buff.append("/" + stk.remove());
 }
 buff.append(getName());
 namingContextName = buff.toString();
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 8b39069f93..53cf4cb738 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -25,6 +25,7 @@ import java.io.Writer;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.nio.charset.StandardCharsets;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
@@ -33,7 +34,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Stack;
+import java.util.Queue;
 import java.util.TimeZone;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -616,15 +617,15 @@ public class WebdavServlet extends DefaultServlet {
 parseProperties(req, generatedXML, path, type, properties);
 } else {
 // The stack always contains the object of the current level
-Stack stack = new Stack<>();
-stack.push(path);
+Queue stack = new ArrayDeque<>();
+stack.add(path);
 
 // Stack of the objects one level below
-Stack stackBelow = new Stack<>();
+Queue stackBelow = new ArrayDeque<>();
 
 while ((!stack.isEmpty()) && (depth >= 0)) {
 
-String currentPath = stack.pop();
+String currentPath = stack.remove();
 parseProperties(req, generatedXML, currentPath, type, 
properties);
 
 resource = resources.getResource(currentPath);
@@ -638,7 +639,7 @@ public class WebdavServlet extends DefaultServlet {
 newPath += "/";
 }
 newPath += entry;
-stackBelow.push(newPath);
+stackBelow.add(newPath);
 }
 
 // Displaying the lock-null resources present in that
@@ -658,7 +659,7 @@ public class WebdavServlet extends DefaultServlet {
 if (stack.isEmpty()) {
 depth--;
 stack = stackBelow;
-stackBelow = new Stack<>();
+stackBelow = new ArrayDeque<>();
 }
 
 generatedXML.sendData();
diff --git a/java/org/apache/jasper/compiler/ParserController.java 
b/java/org/apache/jasper/compile

Re: [tomcat] branch main updated: Refactor to avoid use of Hashtable. No functional change.

2022-09-15 Thread Christopher Schultz

Mark,

On 9/15/22 11:26, Mark Thomas wrote:

On 15/09/2022 16:23, ma...@apache.org wrote:

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 00cf721f14 Refactor to avoid use of Hashtable. No functional 
change.

00cf721f14 is described below

commit 00cf721f14ac90e7ebc372a5303603ca408fc999
Author: Mark Thomas 
AuthorDate: Thu Sep 15 16:23:49 2022 +0100

 Refactor to avoid use of Hashtable. No functional change.


Any objections to back-porting this?

It changes some protected API for the CGIServlet inner classes (and the 
CGI Servlet is final). That seems pretty low risk to me.


I haven't read through the whole class, but is there any risk of 
multi-threaded access?


At what point is "shellEnv" stable? Can it be wrapped in 
Collections.unmodifiableMap() at any point? Can that be added to any 
other instances of Map<> usage in this class?


-chris


---
  java/org/apache/catalina/servlets/CGIServlet.java | 30 
+++

  1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java

index 2f26337a41..dbc941dce5 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -29,10 +29,11 @@ import java.nio.file.Files;
  import java.util.ArrayList;
  import java.util.Date;
  import java.util.Enumeration;
+import java.util.HashMap;
  import java.util.HashSet;
-import java.util.Hashtable;
  import java.util.List;
  import java.util.Locale;
+import java.util.Map;
  import java.util.Map.Entry;
  import java.util.Set;
  import java.util.StringTokenizer;
@@ -306,7 +307,7 @@ public final class CGIServlet extends HttpServlet {
  private static final Object expandFileLock = new Object();
  /** the shell environment variables to be passed to the CGI 
script */

-    private final Hashtable shellEnv = new Hashtable<>();
+    private final Map shellEnv = new HashMap<>();
  /**
   * Enable creation of script command line arguments from 
query-string.

@@ -698,7 +699,7 @@ public final class CGIServlet extends HttpServlet {
  private File tmpDir = null;
  /** derived cgi environment */
-    private Hashtable env = null;
+    private Map env = null;
  /** cgi command to be invoked */
  private String command = null;
@@ -979,7 +980,7 @@ public final class CGIServlet extends HttpServlet {
   */
  // Add the shell environment variables (if any)
-    Hashtable envp = new Hashtable<>(shellEnv);
+    Map envp = new HashMap<>(shellEnv);
  // Add the CGI environment variables
  String sPathInfoOrig = null;
@@ -1317,7 +1318,7 @@ public final class CGIServlet extends HttpServlet {
   * @return   CGI environment
   *
   */
-    protected Hashtable getEnvironment() {
+    protected Map getEnvironment() {
  return env;
  }
@@ -1416,7 +1417,7 @@ public final class CGIServlet extends HttpServlet {
  private final String command;
  /** environment used when invoking the cgi script */
-    private final Hashtable env;
+    private final Map env;
  /** working directory used when invoking the cgi script */
  private final File wd;
@@ -1448,7 +1449,7 @@ public final class CGIServlet extends HttpServlet {
   * @param  params   ArrayList with the script's query 
command line

   *  parameters as strings
   */
-    protected CGIRunner(String command, Hashtable 
env,

+    protected CGIRunner(String command, Map env,
  File wd, ArrayList params) {
  this.command = command;
  this.env = env;
@@ -1511,20 +1512,17 @@ public final class CGIServlet extends 
HttpServlet {

   * key/value pair in the Hashtable to a String in the form
   * "key=value" (hashkey + "=" + hash.get(hashkey).toString())
   *
- * @param  h   Hashtable to convert
+ * @param  map Hashtable to convert
   *
   * @return converted string array
   *
   * @exception  NullPointerException   if a hash key has a 
null value

   *
   */
-    protected String[] hashToStringArray(Hashtable h)
-    throws NullPointerException {
-    List list = new ArrayList<>(h.size());
-    Enumeration e = h.keys();
-    while (e.hasMoreElements()) {
-    String k = e.nextElement();
-    list.add(k + "=" + h.get(k).toString());
+    protected String[] mapToStringArray(Map map) throws 
NullPointerException {

+    List list = new ArrayList<>(map.size());
+ 

[tomcat] branch main updated: Iterate over Map.entrySet() instead of Map.keySet()

2022-09-15 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan 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 a26ccf25a1 Iterate over Map.entrySet() instead of Map.keySet()
a26ccf25a1 is described below

commit a26ccf25a17a1eea0e2a5ee7b6e0663c8e9bfd30
Author: lihan 
AuthorDate: Fri Sep 16 14:31:54 2022 +0800

Iterate over Map.entrySet() instead of Map.keySet()
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 5 +++--
 java/org/apache/jasper/compiler/Generator.java   | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 7b9e7f84fd..405a281b48 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1812,8 +1812,9 @@ public class WebdavServlet extends DefaultServlet {
 
 generatedXML.writeElement("D", DEFAULT_NAMESPACE, "multistatus", 
XMLWriter.OPENING);
 
-for (String errorPath : errorList.keySet()) {
-int errorCode = errorList.get(errorPath).intValue();
+for (Map.Entry errorEntry : errorList.entrySet()) {
+String errorPath = errorEntry.getKey();
+int errorCode = errorEntry.getValue().intValue();
 
 generatedXML.writeElement("D", "response", XMLWriter.OPENING);
 
diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 34c6e41abf..41c8feb67a 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1837,8 +1837,8 @@ class Generator {
 out.print(" + " + elemName);
 
 // Write remaining attributes
-for (String attrName : map.keySet()) {
-out.print(map.get(attrName));
+for (Entry attrEntry : map.entrySet()) {
+out.print(attrEntry.getValue());
 }
 
 // Does the  have nested tags other than


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



[tomcat] branch 10.0.x updated: Iterate over Map.entrySet() instead of Map.keySet()

2022-09-15 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new c9fabe4875 Iterate over Map.entrySet() instead of Map.keySet()
c9fabe4875 is described below

commit c9fabe487530d50f5a798856f461487fe26677bd
Author: lihan 
AuthorDate: Fri Sep 16 14:31:54 2022 +0800

Iterate over Map.entrySet() instead of Map.keySet()
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 5 +++--
 java/org/apache/jasper/compiler/Generator.java   | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 7b9e7f84fd..405a281b48 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1812,8 +1812,9 @@ public class WebdavServlet extends DefaultServlet {
 
 generatedXML.writeElement("D", DEFAULT_NAMESPACE, "multistatus", 
XMLWriter.OPENING);
 
-for (String errorPath : errorList.keySet()) {
-int errorCode = errorList.get(errorPath).intValue();
+for (Map.Entry errorEntry : errorList.entrySet()) {
+String errorPath = errorEntry.getKey();
+int errorCode = errorEntry.getValue().intValue();
 
 generatedXML.writeElement("D", "response", XMLWriter.OPENING);
 
diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 7c90cfda53..175de77ff4 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -2061,8 +2061,8 @@ class Generator {
 out.print(" + " + elemName);
 
 // Write remaining attributes
-for (String attrName : map.keySet()) {
-out.print(map.get(attrName));
+for (Entry attrEntry : map.entrySet()) {
+out.print(attrEntry.getValue());
 }
 
 // Does the  have nested tags other than


-
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: Iterate over Map.entrySet() instead of Map.keySet()

2022-09-15 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 24b8f44fea Iterate over Map.entrySet() instead of Map.keySet()
24b8f44fea is described below

commit 24b8f44feaa0a37c067b3199e8db61038ab93248
Author: lihan 
AuthorDate: Fri Sep 16 14:31:54 2022 +0800

Iterate over Map.entrySet() instead of Map.keySet()
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 5 +++--
 java/org/apache/jasper/compiler/Generator.java   | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 53cf4cb738..6b6f15cd3d 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1814,8 +1814,9 @@ public class WebdavServlet extends DefaultServlet {
 
 generatedXML.writeElement("D", DEFAULT_NAMESPACE, "multistatus", 
XMLWriter.OPENING);
 
-for (String errorPath : errorList.keySet()) {
-int errorCode = errorList.get(errorPath).intValue();
+for (Map.Entry errorEntry : errorList.entrySet()) {
+String errorPath = errorEntry.getKey();
+int errorCode = errorEntry.getValue().intValue();
 
 generatedXML.writeElement("D", "response", XMLWriter.OPENING);
 
diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index b359933bf3..c25d34fb1a 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -2051,8 +2051,8 @@ class Generator {
 out.print(" + " + elemName);
 
 // Write remaining attributes
-for (String attrName : map.keySet()) {
-out.print(map.get(attrName));
+for (Entry attrEntry : map.entrySet()) {
+out.print(attrEntry.getValue());
 }
 
 // Does the  have nested tags other than


-
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: Iterate over Map.entrySet() instead of Map.keySet()

2022-09-15 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan 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 6800e83480 Iterate over Map.entrySet() instead of Map.keySet()
6800e83480 is described below

commit 6800e8348025c323ff70b5438ef2796e8003a48d
Author: lihan 
AuthorDate: Fri Sep 16 14:31:54 2022 +0800

Iterate over Map.entrySet() instead of Map.keySet()
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 5 +++--
 java/org/apache/jasper/compiler/Generator.java   | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index a0bf15353f..9e54acbf77 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1811,8 +1811,9 @@ public class WebdavServlet extends DefaultServlet {
 
 generatedXML.writeElement("D", DEFAULT_NAMESPACE, "multistatus", 
XMLWriter.OPENING);
 
-for (String errorPath : errorList.keySet()) {
-int errorCode = errorList.get(errorPath).intValue();
+for (Map.Entry errorEntry : errorList.entrySet()) {
+String errorPath = errorEntry.getKey();
+int errorCode = errorEntry.getValue().intValue();
 
 generatedXML.writeElement("D", "response", XMLWriter.OPENING);
 
diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index b0c83469ed..68224e5c50 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -2069,8 +2069,8 @@ class Generator {
 out.print(" + " + elemName);
 
 // Write remaining attributes
-for (String attrName : map.keySet()) {
-out.print(map.get(attrName));
+for (Entry attrEntry : map.entrySet()) {
+out.print(attrEntry.getValue());
 }
 
 // Does the  have nested tags other than


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