(tomcat-jakartaee-migration) branch main updated: Update dependencies to latest versions

2024-01-26 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 7500b76  Update dependencies to latest versions
7500b76 is described below

commit 7500b76f74f3ef13462ce4c9681a9f924b7d5ab7
Author: Mark Thomas 
AuthorDate: Fri Jan 26 10:56:08 2024 +

Update dependencies to latest versions
---
 CHANGES.md | 4 
 pom.xml| 8 
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 34d67ad..0767af2 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,10 @@
 
 ## 1.0.8
 - Include `.ear` files in list of recognised archives. 
PR[#50](https://github.com/apache/tomcat-jakartaee-migration/pull/50) provided 
by Sammy Chu. (markt)
+- Update Commons BCEL to 6.8.1. (markt)
+- Update Commons Compress to 1.25.0. (markt)
+- Update Commons IO to 2.15.1. (markt)
+- Update Ant to 1.10.14. (markt)
 
 
 ## 1.0.7
diff --git a/pom.xml b/pom.xml
index 629cddf..e5c6e67 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,22 +77,22 @@
 
   org.apache.bcel
   bcel
-  6.7.0
+  6.8.1
 
 
   org.apache.commons
   commons-compress
-  1.23.0
+  1.25.0
 
 
   commons-io
   commons-io
-  2.11.0
+  2.15.1
 
 
   org.apache.ant
   ant
-  1.10.12
+  1.10.14
   provided
 
 


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



(tomcat-jakartaee-migration) 02/03: Update parent POM

2024-01-26 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 c82e80b4cf09ba90eadf22cbf1cfc036a977924c
Author: Mark Thomas 
AuthorDate: Fri Jan 26 11:01:28 2024 +

Update parent POM
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index ae0f707..6d30ada 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
   
 org.apache
 apache
-27
+31
   
 
   org.apache.tomcat


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



(tomcat-jakartaee-migration) 01/03: Remove version overrides where parent has caught up

2024-01-26 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 9f66886e38c85405d0a485e4daeaabf9f3d6027b
Author: Mark Thomas 
AuthorDate: Fri Jan 26 11:00:52 2024 +

Remove version overrides where parent has caught up
---
 pom.xml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index e5c6e67..ae0f707 100644
--- a/pom.xml
+++ b/pom.xml
@@ -141,7 +141,6 @@
 
   
 maven-antrun-plugin
-3.1.0
 
   
 create-test-jars
@@ -204,7 +203,6 @@
   
 org.apache.maven.plugins
 maven-source-plugin
-3.2.1
 
   
 attach-sources


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



(tomcat-jakartaee-migration) 03/03: Remove overrides where parent POM has caught up / overtaken.

2024-01-26 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 bcb7fd467c7a1430ab8372935b0e390f1b1db4f4
Author: Mark Thomas 
AuthorDate: Fri Jan 26 11:02:12 2024 +

Remove overrides where parent POM has caught up / overtaken.
---
 pom.xml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6d30ada..a5f89e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -230,7 +230,6 @@
  org.apache.maven.plugins ...which is assumed by default.
  -->
 maven-assembly-plugin
-3.4.2
 
   
 make-assembly
@@ -321,7 +320,6 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-3.2.0
 
   src/checkstyle/checkstyle.xml
   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-jakartaee-migration) branch main updated (7500b76 -> bcb7fd4)

2024-01-26 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 7500b76  Update dependencies to latest versions
 new 9f66886  Remove version overrides where parent has caught up
 new c82e80b  Update parent POM
 new bcb7fd4  Remove overrides where parent POM has caught up / overtaken.

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:
 pom.xml | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)


-
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: Fix deprecation warning

2024-01-26 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 98c59d4  Fix deprecation warning
98c59d4 is described below

commit 98c59d40ab5ce84c66492e3373e9220ed86bb6ea
Author: Mark Thomas 
AuthorDate: Fri Jan 26 11:11:43 2024 +

Fix deprecation warning
---
 src/main/java/org/apache/tomcat/jakartaee/Migration.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index 3f7d168..0415181 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -304,7 +304,7 @@ public class Migration {
 ZipArchiveOutputStream destZipStream = new 
ZipArchiveOutputStream(CloseShieldOutputStream.wrap(dest))) {
 ZipArchiveEntry srcZipEntry;
 CRC32 crc32 = new CRC32();
-while ((srcZipEntry = srcZipStream.getNextZipEntry()) != null) {
+while ((srcZipEntry = srcZipStream.getNextEntry()) != null) {
 String srcName = srcZipEntry.getName();
 if (isSignatureFile(srcName)) {
 logger.log(Level.WARNING, 
sm.getString("migration.skipSignatureFile", srcName));


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



JDK 22 RDP2 & Deprecate sun.misc.Unsafe Memory-Access Methods…

2024-01-26 Thread David Delabassee
Greetings!

We are starting 2024 with JDK 22 as it has just entered Rampdown Phase 2 [1]. 
And with the initial JDK 22 Release Candidates now less than 2 weeks away (Feb. 
8th) [2], it is time to shift our attention to JDK 23.

After multiple rounds of incubations and preview, the Foreign Function & Memory 
API is becoming standard and permanent in JDK 22. If we put its 'Function' 
angle aside, this API also offers a standard and secure way to access off-heap 
API. And that brings us to the heads-up below 'Deprecate the memory-access 
methods in sun.misc.Unsafe for removal in a future release' as developers still 
using sun.misc.Unsafe for accessing memory are strongly encouraged to start 
preparing their plans to migrate away from those unsafe methods.

[1] https://mail.openjdk.org/pipermail/jdk-dev/2024-January/008675.html
[2] https://openjdk.org/projects/jdk/22/


## Heads-up: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal 
in a Future Release

The effort focused on enforcing the integrity of the Java platform [3] 
continues! The next phase in that long but important initiative will most 
likely target the sun.misc.Unsafe API used for accessing memory. Those methods 
alone represent 79 methods out of the 87 sun.misc.Unsafe methods!

This draft JEP [4] outlines the plan to deprecate for removal the 
sun.misc.Unsafe Memory-Access methods, the reasons, and the standard 
alternatives. As the draft plan suggests, the first step will be to deprecate 
all memory-access methods (on-heap, off-heap, and bimodal) for removal. This 
will cause compile-time deprecation warnings for code that refers to the 
methods, alerting library developers to their forthcoming removal. In addition, 
a new command-line option will allow users to receive runtime warnings when 
those methods are used. This command-line will help users to assess if their 
codebase uses those unsafe API to access memory. It should be mentioned that 
other tools such as JFR and jdeprscan can also be used to detect the use of 
those deprecated APIs.

Library developers are strongly encouraged to migrate from sun.misc.Unsafe to 
the supported replacements, so that applications can migrate smoothly to modern 
JDKs. The initial step will be to conduct investigations to understand if, how, 
and where sun.misc.Unsafe methods are used to access memory.

[3] https://openjdk.org/jeps/8305968
[4] https://openjdk.org/jeps/8323072


## Heads-up: Java Array Element Alignment - Weakening of Some Methods 
Guarantees ?

Some methods make promises about Java array element alignment that are too 
strong. There are some ongoing reflexions to change the implementation (and the 
specification) of `MethodHandles::byteArrayViewVarHandle`, 
`MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`, and 
`ByteBuffer::alignmentOffset` to weaken the guarantees they make about the 
alignment of Java array elements, in order to bring them in line with the 
guarantees made by an arbitrary JVM implementation.

For more details, make sure to check JDK-8320247 [5] and the related PR [6] but 
in a nutshell, the new behaviour would be :
- The `VarHandle` returned by `MethodHandles::byteArrayViewVarHandle` would 
only support `get` and `set` methods, and all other access methods would throw 
an exception.
- The `VarHandle` returned by `MethodHandles::byteBufferViewHandle` would only 
support the `get` and `set` access methods when a heap buffer is used, and all 
other access methods would throw an exception when used with a heap buffer. 
Direct byte buffers will continue to work the same way.
- The `ByteBuffer::alignmentOffset` and `ByteBuffer::alignedSlice` methods 
would throw an exception if the buffer is a heap buffer, and the given 
`unitSize` is greater than 1.

If you have relevant feedback about this potential change, please make sure to 
bring it to the core-libs-dev mailing list [7], or comment on the PR [6].

[5] https://bugs.openjdk.org/browse/JDK-8320247
[6] https://github.com/openjdk/jdk/pull/16681
[7] https://mail.openjdk.org/pipermail/core-libs-dev/


## JDK 22 Early-Access Builds

JDK 22 Early-Access builds 33 are now available [8], and are provided under the 
GNU General Public License v2, with the Classpath Exception. The Release Notes 
[9] and the javadocs [10] are also available.

### Changes in recent JDK 22 builds that may be of interest:

- JDK-8320597: RSA signature verification fails on signed data that does not 
encode params correctly [Reported by Apache POI]
- JDK-8322214: Return value of XMLInputFactory.getProperty() changed from 
boolean to String in JDK 22 early access builds [Reported by Apache POI]
- JDK-8322725: (tz) Update Timezone Data to 2023d
- JDK-8321480: ISO 4217 Amendment 176 Update
- JDK-8314468: Improve Compiler loops
- JDK-8314295: Enhance verification of verifier
- JDK-8316976: Improve signature handling
- JDK-8317547: Enhance TLS connection support
- JDK-8318971: Better Error Handling for Jar Tool When Process

(tomcat-jakartaee-migration) branch main updated: Include '.jspf' and '.tagf' files in the conversion process

2024-01-26 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 fdefcd9  Include '.jspf' and '.tagf' files in the conversion process
fdefcd9 is described below

commit fdefcd950292af6ca37dbc7d373f35b3ef719437
Author: Mark Thomas 
AuthorDate: Fri Jan 26 12:09:02 2024 +

Include '.jspf' and '.tagf' files in the conversion process
---
 CHANGES.md   | 1 +
 src/main/java/org/apache/tomcat/jakartaee/TextConverter.java | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/CHANGES.md b/CHANGES.md
index 0767af2..c8e04cb 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,6 +6,7 @@
 - Update Commons Compress to 1.25.0. (markt)
 - Update Commons IO to 2.15.1. (markt)
 - Update Ant to 1.10.14. (markt)
+- Include `.jspf` and `.tagf` files in the conversion process. (markt)
 
 
 ## 1.0.7
diff --git a/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
index fd3833b..cee3917 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
@@ -40,8 +40,10 @@ public class TextConverter implements Converter {
 supportedExtensions = new ArrayList<>();
 supportedExtensions.add("java");
 supportedExtensions.add("jsp");
+supportedExtensions.add("jspf");
 supportedExtensions.add("jspx");
 supportedExtensions.add("tag");
+supportedExtensions.add("tagf");
 supportedExtensions.add("tagx");
 supportedExtensions.add("tld");
 supportedExtensions.add("txt");


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



Re: JDK 22 RDP2 & Deprecate sun.misc.Unsafe Memory-Access Methods…

2024-01-26 Thread Rémy Maucherat
On Fri, Jan 26, 2024 at 12:17 PM David Delabassee
 wrote:
>
> Greetings!
>
> We are starting 2024 with JDK 22 as it has just entered Rampdown Phase 2 [1]. 
> And with the initial JDK 22 Release Candidates now less than 2 weeks away 
> (Feb. 8th) [2], it is time to shift our attention to JDK 23.
>
> After multiple rounds of incubations and preview, the Foreign Function & 
> Memory API is becoming standard and permanent in JDK 22. If we put its 
> 'Function' angle aside, this API also offers a standard and secure way to 
> access off-heap API. And that brings us to the heads-up below 'Deprecate the 
> memory-access methods in sun.misc.Unsafe for removal in a future release' as 
> developers still using sun.misc.Unsafe for accessing memory are strongly 
> encouraged to start preparing their plans to migrate away from those unsafe 
> methods.
>
> [1] https://mail.openjdk.org/pipermail/jdk-dev/2024-January/008675.html
> [2] https://openjdk.org/projects/jdk/22/
>
>
> ## Heads-up: Deprecate the Memory-Access Methods in sun.misc.Unsafe for 
> Removal in a Future Release
>
> The effort focused on enforcing the integrity of the Java platform [3] 
> continues! The next phase in that long but important initiative will most 
> likely target the sun.misc.Unsafe API used for accessing memory. Those 
> methods alone represent 79 methods out of the 87 sun.misc.Unsafe methods!
>
> This draft JEP [4] outlines the plan to deprecate for removal the 
> sun.misc.Unsafe Memory-Access methods, the reasons, and the standard 
> alternatives. As the draft plan suggests, the first step will be to deprecate 
> all memory-access methods (on-heap, off-heap, and bimodal) for removal. This 
> will cause compile-time deprecation warnings for code that refers to the 
> methods, alerting library developers to their forthcoming removal. In 
> addition, a new command-line option will allow users to receive runtime 
> warnings when those methods are used. This command-line will help users to 
> assess if their codebase uses those unsafe API to access memory. It should be 
> mentioned that other tools such as JFR and jdeprscan can also be used to 
> detect the use of those deprecated APIs.
>
> Library developers are strongly encouraged to migrate from sun.misc.Unsafe to 
> the supported replacements, so that applications can migrate smoothly to 
> modern JDKs. The initial step will be to conduct investigations to understand 
> if, how, and where sun.misc.Unsafe methods are used to access memory.
>
> [3] https://openjdk.org/jeps/8305968
> [4] https://openjdk.org/jeps/8323072
>
>
> ## Heads-up: Java Array Element Alignment - Weakening of Some Methods 
> Guarantees ?
>
> Some methods make promises about Java array element alignment that are too 
> strong. There are some ongoing reflexions to change the implementation (and 
> the specification) of `MethodHandles::byteArrayViewVarHandle`, 
> `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`, and 
> `ByteBuffer::alignmentOffset` to weaken the guarantees they make about the 
> alignment of Java array elements, in order to bring them in line with the 
> guarantees made by an arbitrary JVM implementation.
>
> For more details, make sure to check JDK-8320247 [5] and the related PR [6] 
> but in a nutshell, the new behaviour would be :
> - The `VarHandle` returned by `MethodHandles::byteArrayViewVarHandle` would 
> only support `get` and `set` methods, and all other access methods would 
> throw an exception.
> - The `VarHandle` returned by `MethodHandles::byteBufferViewHandle` would 
> only support the `get` and `set` access methods when a heap buffer is used, 
> and all other access methods would throw an exception when used with a heap 
> buffer. Direct byte buffers will continue to work the same way.
> - The `ByteBuffer::alignmentOffset` and `ByteBuffer::alignedSlice` methods 
> would throw an exception if the buffer is a heap buffer, and the given 
> `unitSize` is greater than 1.
>
> If you have relevant feedback about this potential change, please make sure 
> to bring it to the core-libs-dev mailing list [7], or comment on the PR [6].
>
> [5] https://bugs.openjdk.org/browse/JDK-8320247
> [6] https://github.com/openjdk/jdk/pull/16681
> [7] https://mail.openjdk.org/pipermail/core-libs-dev/
>
>
> ## JDK 22 Early-Access Builds
>
> JDK 22 Early-Access builds 33 are now available [8], and are provided under 
> the GNU General Public License v2, with the Classpath Exception. The Release 
> Notes [9] and the javadocs [10] are also available.
>
> ### Changes in recent JDK 22 builds that may be of interest:
>
> - JDK-8320597: RSA signature verification fails on signed data that does not 
> encode params correctly [Reported by Apache POI]
> - JDK-8322214: Return value of XMLInputFactory.getProperty() changed from 
> boolean to String in JDK 22 early access builds [Reported by Apache POI]
> - JDK-8322725: (tz) Update Timezone Data to 2023d
> - JDK-8321480: ISO 4217 Amendment 176 Update
> - JDK

(tomcat) branch main updated (de3ff9edaa -> af7f0f4720)

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

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


from de3ff9edaa Fix the OSGi remaining references to Java EE contract names
 new 9d98728896 jextract now avoids generating redundant classes
 new af7f0f4720 Fix import order

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:
 .../util/net/openssl/panama/OpenSSLContext.java| 13 ++---
 .../util/openssl/PEM_read_bio_PrivateKey$cb.java   | 68 --
 .../openssl/SSL_CTX_set_default_passwd_cb$cb.java  | 68 --
 ...d_bio_X509_AUX$cb.java => pem_password_cb.java} | 23 ++--
 res/openssl/openssl-tomcat.conf|  4 ++
 5 files changed, 27 insertions(+), 149 deletions(-)
 delete mode 100644 
java/org/apache/tomcat/util/openssl/PEM_read_bio_PrivateKey$cb.java
 delete mode 100644 
java/org/apache/tomcat/util/openssl/SSL_CTX_set_default_passwd_cb$cb.java
 rename java/org/apache/tomcat/util/openssl/{PEM_read_bio_X509_AUX$cb.java => 
pem_password_cb.java} (76%)


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



(tomcat) 01/02: jextract now avoids generating redundant classes

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

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

commit 9d987288967e3bf103dec090f2fb0e2148be010a
Author: remm 
AuthorDate: Fri Jan 26 15:04:50 2024 +0100

jextract now avoids generating redundant classes

But the typedef has to be listed.
---
 .../util/net/openssl/panama/OpenSSLContext.java| 13 ++---
 .../util/openssl/PEM_read_bio_PrivateKey$cb.java   | 68 --
 .../openssl/SSL_CTX_set_default_passwd_cb$cb.java  | 68 --
 ...d_bio_X509_AUX$cb.java => pem_password_cb.java} | 23 ++--
 res/openssl/openssl-tomcat.conf|  4 ++
 5 files changed, 27 insertions(+), 149 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java 
b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
index 1939e465a8..1699054894 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
@@ -64,11 +64,9 @@ import org.apache.tomcat.util.net.openssl.OpenSSLConf;
 import org.apache.tomcat.util.net.openssl.OpenSSLConfCmd;
 import org.apache.tomcat.util.net.openssl.OpenSSLStatus;
 import org.apache.tomcat.util.net.openssl.OpenSSLUtil;
-import org.apache.tomcat.util.openssl.PEM_read_bio_PrivateKey$cb;
-import org.apache.tomcat.util.openssl.PEM_read_bio_X509_AUX$cb;
+import org.apache.tomcat.util.openssl.pem_password_cb;
 import org.apache.tomcat.util.openssl.SSL_CTX_set_alpn_select_cb$cb;
 import org.apache.tomcat.util.openssl.SSL_CTX_set_cert_verify_callback$cb;
-import org.apache.tomcat.util.openssl.SSL_CTX_set_default_passwd_cb$cb;
 import org.apache.tomcat.util.openssl.SSL_CTX_set_tmp_dh_callback$dh;
 import org.apache.tomcat.util.openssl.SSL_CTX_set_verify$callback;
 import org.apache.tomcat.util.res.StringManager;
@@ -267,7 +265,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 
 // Set int pem_password_cb(char *buf, int size, int rwflag, void 
*u) callback
 SSL_CTX_set_default_passwd_cb(sslCtx,
-SSL_CTX_set_default_passwd_cb$cb.allocate(new 
PasswordCallback(null), contextArena));
+pem_password_cb.allocate(new PasswordCallback(null), 
contextArena));
 
 if (negotiableProtocols != null && negotiableProtocols.size() > 0) 
{
 alpn = true;
@@ -867,8 +865,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 }
 }
 
-private static class PasswordCallback implements 
SSL_CTX_set_default_passwd_cb$cb.Function,
-PEM_read_bio_X509_AUX$cb.Function, PEM_read_bio_PrivateKey$cb.Function 
{
+private static class PasswordCallback implements pem_password_cb.Function {
 private final String callbackPassword;
 PasswordCallback(String callbackPassword) {
 this.callbackPassword = callbackPassword;
@@ -995,7 +992,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 key = MemorySegment.NULL;
 for (int i = 0; i < 3; i++) {
 key = PEM_read_bio_PrivateKey(keyBIO, 
MemorySegment.NULL,
-PEM_read_bio_PrivateKey$cb.allocate(new 
PasswordCallback(keyPassToUse), contextArena),
+pem_password_cb.allocate(new 
PasswordCallback(keyPassToUse), contextArena),
 MemorySegment.NULL);
 if (!MemorySegment.NULL.equals(key)) {
 break;
@@ -1020,7 +1017,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 }
 // Load certificate
 cert = PEM_read_bio_X509_AUX(certificateBIO, 
MemorySegment.NULL,
-PEM_read_bio_X509_AUX$cb.allocate(new 
PasswordCallback(keyPassToUse), contextArena),
+pem_password_cb.allocate(new 
PasswordCallback(keyPassToUse), contextArena),
 MemorySegment.NULL);
 if (MemorySegment.NULL.equals(cert) &&
 // Missing ERR_GET_REASON(ERR_peek_last_error())
diff --git 
a/java/org/apache/tomcat/util/openssl/PEM_read_bio_PrivateKey$cb.java 
b/java/org/apache/tomcat/util/openssl/PEM_read_bio_PrivateKey$cb.java
deleted file mode 100644
index 2898cc734f..00
--- a/java/org/apache/tomcat/util/openssl/PEM_read_bio_PrivateKey$cb.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache Li

(tomcat) 02/02: Fix import order

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

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

commit af7f0f472050134f426446dc1a94e05d5f310956
Author: remm 
AuthorDate: Fri Jan 26 15:06:25 2024 +0100

Fix import order
---
 java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java 
b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
index 1699054894..76e97a5705 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
@@ -64,11 +64,11 @@ import org.apache.tomcat.util.net.openssl.OpenSSLConf;
 import org.apache.tomcat.util.net.openssl.OpenSSLConfCmd;
 import org.apache.tomcat.util.net.openssl.OpenSSLStatus;
 import org.apache.tomcat.util.net.openssl.OpenSSLUtil;
-import org.apache.tomcat.util.openssl.pem_password_cb;
 import org.apache.tomcat.util.openssl.SSL_CTX_set_alpn_select_cb$cb;
 import org.apache.tomcat.util.openssl.SSL_CTX_set_cert_verify_callback$cb;
 import org.apache.tomcat.util.openssl.SSL_CTX_set_tmp_dh_callback$dh;
 import org.apache.tomcat.util.openssl.SSL_CTX_set_verify$callback;
+import org.apache.tomcat.util.openssl.pem_password_cb;
 import org.apache.tomcat.util.res.StringManager;
 
 public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext {


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



[Bug 68546] New: Performance optimization in PageContextImpl.getELContext()

2024-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68546

Bug ID: 68546
   Summary: Performance optimization in
PageContextImpl.getELContext()
   Product: Tomcat 9
   Version: 9.0.81
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: jeng...@amazon.com
  Target Milestone: -

Created attachment 39554
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=39554&action=edit
Speed test

A high-volume, latency sensitive application reports that
org.apache.jasper.runtime.PageContextImpl.getELContext() uses 0.11% of cpu, of
which 0.07% is local to the method.  A portion of that comes from iterating
across sparse HashSets (packageImports and classImports), the cost of which
grows linearly with array size (null buckets are scanned).

In the most common case, our JSPs rely on the three auto-generated packages and
1-2 classes.  For example, this generated code block from our busiest JSP:

 static {
_jspx_imports_packages = new java.util.HashSet<>();
_jspx_imports_packages.add("javax.servlet");
_jspx_imports_packages.add("javax.servlet.http");
_jspx_imports_packages.add("javax.servlet.jsp");
_jspx_imports_classes = new java.util.HashSet<>();
_jspx_imports_classes.add("com.ViewModel");
_jspx_imports_classes.add("com.Helper");
  }

Most JVMs initialize HashMap arrays to length 16, so the code above generates
one array that is 3/16th full and another that is 2/16th full.  Each page
request scans the full 16-slot array.

A few alternatives exist:
1. Right-size the Set allocation.  The entries in the Set are fixed and known
at the time of code generation so should be an easy change.
2. Switch to LinkedHashSet<>.  Iteration becomes trivial.
3. Combine the two: right-size a LinkedHashSet<>.

The attached speed test shows a big improvement with #2 (right-sizing) but a
greater improvement from either #1 or #3.

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



[Bug 68546] Performance optimization in PageContextImpl.getELContext()

2024-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68546

--- Comment #1 from John Engebretson  ---
Sorry, error with the numbering in the last sentence: the attached speed test
shows a big improvement with #1 (right-sizing) but a greater improvement from
either #2 or #3.

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



[Bug 68546] Performance optimization in PageContextImpl.getELContext()

2024-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68546

--- Comment #2 from Remy Maucherat  ---
Ok, this sounds reasonable looking at the code.
https://github.com/apache/tomcat/blob/main/java/org/apache/jasper/compiler/Generator.java#L623

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



[Bug 68518] Tomcat Windows Service fails when running in OpenJDK 11

2024-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68518

Christopher Schultz  changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

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



[Bug 68533] Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR

2024-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68533

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Mark Thomas  ---
Given you are reproducing this on connection 0 (the first HTTP/2 request
received) I'm assuming that you can easily reproduce this.

Try enabling debug logging for the org.apache.coyote.http2 package (the setting
for this can just be uncommenting in $CATALINA_BASE/conf/logging.properties),
recreating the issue and then attaching the logs. There will probably be a fair
amount of logs so try and keep the traffic to the minimum required to trigger
the issue. That should give us a clearer picture of what is happening.

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



[Bug 68449] session.maxInactiveInterval() is not working for SSO Users.

2024-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68449

Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

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



[Bug 68533] Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR

2024-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68533

Den  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #2 from Den  ---
Mark, I attached such logs with FINE level but seems like the file was too big
(1.7MB). So I uploaded the file to my Google Drive. Here is a link
https://drive.google.com/file/d/1p6DtBQY4cslyx6PXU4x6Rc4tlBbLCPpS/view?usp=sharing

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