Buildbot success in on tomcat-9.0.x

2024-04-02 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/37/builds/903
Blamelist: Christopher Schultz , Mark Thomas 
, remm 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 9.0.x] dd777642d673ca50e385324a3df478398402817d


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



(tomcat) branch 9.0.x updated: Update internal fork of Commons Codec to 1.16.1

2024-04-02 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 dd777642d6 Update internal fork of Commons Codec to 1.16.1
dd777642d6 is described below

commit dd777642d673ca50e385324a3df478398402817d
Author: Mark Thomas 
AuthorDate: Tue Apr 2 19:44:49 2024 +0100

Update internal fork of Commons Codec to 1.16.1
---
 MERGE.txt  |  2 +-
 .../apache/tomcat/util/codec/binary/Base64.java| 44 --
 .../tomcat/util/codec/binary/BaseNCodec.java   | 15 +---
 .../tomcat/util/codec/binary/StringUtils.java  |  9 -
 .../tomcat/util/codec/binary/package-info.java | 21 +++
 .../apache/tomcat/util/codec/binary/package.html   | 21 ---
 webapps/docs/changelog.xml |  3 ++
 7 files changed, 65 insertions(+), 50 deletions(-)

diff --git a/MERGE.txt b/MERGE.txt
index b4678e08a1..c63cb30d62 100644
--- a/MERGE.txt
+++ b/MERGE.txt
@@ -43,7 +43,7 @@ Codec
 Sub-tree:
 src/main/java/org/apache/commons/codec
 The SHA1 ID / tag for the most recent commit to be merged to Tomcat is:
-f03cbd3ba741758ead9f59bc07e6688a739a4813 (2023-01-03)
+rel/commons-codec-1.16,.1 (2024-02-09)
 Note: Only classes required for Base64 encoding/decoding. The rest are removed.
 
 FileUpload
diff --git a/java/org/apache/tomcat/util/codec/binary/Base64.java 
b/java/org/apache/tomcat/util/codec/binary/Base64.java
index 884c3190d0..a733df9937 100644
--- a/java/org/apache/tomcat/util/codec/binary/Base64.java
+++ b/java/org/apache/tomcat/util/codec/binary/Base64.java
@@ -53,7 +53,7 @@ import java.util.Objects;
 public class Base64 extends BaseNCodec {
 
 /**
- * BASE32 characters are 6 bits in length.
+ * BASE64 characters are 6 bits in length.
  * They are formed by taking a block of 3 octets to form a 24-bit string,
  * which is converted into 4 BASE64 characters.
  */
@@ -64,9 +64,10 @@ public class Base64 extends BaseNCodec {
 /**
  * This array is a lookup table that translates 6-bit positive integer 
index values into their "Base64 Alphabet"
  * equivalents as specified in Table 1 of RFC 2045.
- *
+ * 
  * Thanks to "commons" project in ws.apache.org for this code.
  * https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/
+ * 
  */
 private static final byte[] STANDARD_ENCODE_TABLE = {
 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
@@ -93,12 +94,14 @@ public class Base64 extends BaseNCodec {
  * This array is a lookup table that translates Unicode characters drawn 
from the "Base64 Alphabet" (as specified
  * in Table 1 of RFC 2045) into their 6-bit positive integer equivalents. 
Characters that are not in the Base64
  * alphabet but fall within the bounds of the array are translated to -1.
- *
+ * 
  * Note: '+' and '-' both decode to 62. '/' and '_' both decode to 63. 
This means decoder seamlessly handles both
  * URL_SAFE and STANDARD base64. (The encoder, on the other hand, needs to 
know ahead of time what to emit).
- *
+ * 
+ * 
  * Thanks to "commons" project in ws.apache.org for this code.
  * https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/
+ * 
  */
 private static final byte[] STANDARD_DECODE_TABLE = {
 //   0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
@@ -415,9 +418,10 @@ public class Base64 extends BaseNCodec {
 /**
  * Validates whether decoding the final trailing character is possible in 
the context
  * of the set of possible base 64 values.
- *
- * The character is valid if the lower bits within the provided mask 
are zero. This
+ * 
+ * The character is valid if the lower bits within the provided mask are 
zero. This
  * is used to test the final trailing base-64 digit is zero in the bits 
that will be discarded.
+ * 
  *
  * @param emptyBitsMask The mask of the lower bits that should be empty
  * @param context the context to be used
@@ -450,7 +454,7 @@ public class Base64 extends BaseNCodec {
  */
 private final byte[] encodeTable;
 
-// Only one decode table currently; keep for consistency with Base32 code
+/** Only one decode table currently; keep for consistency with Base32 
code. */
 private final byte[] decodeTable;
 
 /**
@@ -657,8 +661,8 @@ public class Base64 extends BaseNCodec {
 context.modulus = (context.modulus+1) % 
BYTES_PER_ENCODED_BLOCK;
 context.ibitWorkArea = (context.ibitWorkArea << 
BITS_PER_ENCODED_BYTE) + result;
 if (context.modulus == 0) {
-buffer[context.pos++] = (byte) ((context.ibitWorkArea 
>> 16) & MASK_8BITS);
- 

(tomcat) branch 10.1.x updated: Update internal fork of Commons Codec to 1.16.1

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 0bfd70c8a1 Update internal fork of Commons Codec to 1.16.1
0bfd70c8a1 is described below

commit 0bfd70c8a125bc6a42778cad3019492ffdffe950
Author: Mark Thomas 
AuthorDate: Tue Apr 2 19:44:49 2024 +0100

Update internal fork of Commons Codec to 1.16.1
---
 MERGE.txt  |  2 +-
 .../apache/tomcat/util/codec/binary/Base64.java| 44 --
 .../tomcat/util/codec/binary/BaseNCodec.java   | 15 +---
 .../tomcat/util/codec/binary/StringUtils.java  |  9 -
 .../tomcat/util/codec/binary/package-info.java | 21 +++
 .../apache/tomcat/util/codec/binary/package.html   | 21 ---
 webapps/docs/changelog.xml |  3 ++
 7 files changed, 65 insertions(+), 50 deletions(-)

diff --git a/MERGE.txt b/MERGE.txt
index 9ad4d0c5a5..647afe4dd5 100644
--- a/MERGE.txt
+++ b/MERGE.txt
@@ -45,7 +45,7 @@ Unused code is removed
 Sub-tree:
 src/main/java/org/apache/commons/codec
 The SHA1 ID / tag for the most recent commit to be merged to Tomcat is:
-f03cbd3ba741758ead9f59bc07e6688a739a4813 (2023-01-03)
+rel/commons-codec-1.16,.1 (2024-02-09)
 Note: Only classes required for Base64 encoding/decoding. The rest are removed.
 
 FileUpload
diff --git a/java/org/apache/tomcat/util/codec/binary/Base64.java 
b/java/org/apache/tomcat/util/codec/binary/Base64.java
index 9129650bfd..e38bf3df17 100644
--- a/java/org/apache/tomcat/util/codec/binary/Base64.java
+++ b/java/org/apache/tomcat/util/codec/binary/Base64.java
@@ -50,7 +50,7 @@ package org.apache.tomcat.util.codec.binary;
 public class Base64 extends BaseNCodec {
 
 /**
- * BASE32 characters are 6 bits in length.
+ * BASE64 characters are 6 bits in length.
  * They are formed by taking a block of 3 octets to form a 24-bit string,
  * which is converted into 4 BASE64 characters.
  */
@@ -61,9 +61,10 @@ public class Base64 extends BaseNCodec {
 /**
  * This array is a lookup table that translates 6-bit positive integer 
index values into their "Base64 Alphabet"
  * equivalents as specified in Table 1 of RFC 2045.
- *
+ * 
  * Thanks to "commons" project in ws.apache.org for this code.
  * https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/
+ * 
  */
 private static final byte[] STANDARD_ENCODE_TABLE = {
 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
@@ -90,12 +91,14 @@ public class Base64 extends BaseNCodec {
  * This array is a lookup table that translates Unicode characters drawn 
from the "Base64 Alphabet" (as specified
  * in Table 1 of RFC 2045) into their 6-bit positive integer equivalents. 
Characters that are not in the Base64
  * alphabet but fall within the bounds of the array are translated to -1.
- *
+ * 
  * Note: '+' and '-' both decode to 62. '/' and '_' both decode to 63. 
This means decoder seamlessly handles both
  * URL_SAFE and STANDARD base64. (The encoder, on the other hand, needs to 
know ahead of time what to emit).
- *
+ * 
+ * 
  * Thanks to "commons" project in ws.apache.org for this code.
  * https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/
+ * 
  */
 private static final byte[] STANDARD_DECODE_TABLE = {
 //   0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
@@ -260,9 +263,10 @@ public class Base64 extends BaseNCodec {
 /**
  * Validates whether decoding the final trailing character is possible in 
the context
  * of the set of possible base 64 values.
- *
- * The character is valid if the lower bits within the provided mask 
are zero. This
+ * 
+ * The character is valid if the lower bits within the provided mask are 
zero. This
  * is used to test the final trailing base-64 digit is zero in the bits 
that will be discarded.
+ * 
  *
  * @param emptyBitsMask The mask of the lower bits that should be empty
  * @param context the context to be used
@@ -295,7 +299,7 @@ public class Base64 extends BaseNCodec {
  */
 private final byte[] encodeTable;
 
-// Only one decode table currently; keep for consistency with Base32 code
+/** Only one decode table currently; keep for consistency with Base32 
code. */
 private final byte[] decodeTable;
 
 /**
@@ -502,8 +506,8 @@ public class Base64 extends BaseNCodec {
 context.modulus = (context.modulus+1) % 
BYTES_PER_ENCODED_BLOCK;
 context.ibitWorkArea = (context.ibitWorkArea << 
BITS_PER_ENCODED_BYTE) + result;
 if (context.modulus == 0) {
-buffer[context.pos++] = (byte) ((context.ibitWorkArea 
>> 

(tomcat) branch main updated: Update internal fork of Commons Codec to 1.16.1

2024-04-02 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 a3c071d4a5 Update internal fork of Commons Codec to 1.16.1
a3c071d4a5 is described below

commit a3c071d4a5fb5cbf7e1f2a858be8427dbbc6a842
Author: Mark Thomas 
AuthorDate: Tue Apr 2 19:44:49 2024 +0100

Update internal fork of Commons Codec to 1.16.1
---
 MERGE.txt  |  2 +-
 .../apache/tomcat/util/codec/binary/Base64.java| 44 --
 .../tomcat/util/codec/binary/BaseNCodec.java   | 15 +---
 .../tomcat/util/codec/binary/StringUtils.java  |  9 -
 .../tomcat/util/codec/binary/package-info.java | 21 +++
 .../apache/tomcat/util/codec/binary/package.html   | 21 ---
 webapps/docs/changelog.xml |  3 ++
 7 files changed, 65 insertions(+), 50 deletions(-)

diff --git a/MERGE.txt b/MERGE.txt
index 9ad4d0c5a5..647afe4dd5 100644
--- a/MERGE.txt
+++ b/MERGE.txt
@@ -45,7 +45,7 @@ Unused code is removed
 Sub-tree:
 src/main/java/org/apache/commons/codec
 The SHA1 ID / tag for the most recent commit to be merged to Tomcat is:
-f03cbd3ba741758ead9f59bc07e6688a739a4813 (2023-01-03)
+rel/commons-codec-1.16,.1 (2024-02-09)
 Note: Only classes required for Base64 encoding/decoding. The rest are removed.
 
 FileUpload
diff --git a/java/org/apache/tomcat/util/codec/binary/Base64.java 
b/java/org/apache/tomcat/util/codec/binary/Base64.java
index 9129650bfd..e38bf3df17 100644
--- a/java/org/apache/tomcat/util/codec/binary/Base64.java
+++ b/java/org/apache/tomcat/util/codec/binary/Base64.java
@@ -50,7 +50,7 @@ package org.apache.tomcat.util.codec.binary;
 public class Base64 extends BaseNCodec {
 
 /**
- * BASE32 characters are 6 bits in length.
+ * BASE64 characters are 6 bits in length.
  * They are formed by taking a block of 3 octets to form a 24-bit string,
  * which is converted into 4 BASE64 characters.
  */
@@ -61,9 +61,10 @@ public class Base64 extends BaseNCodec {
 /**
  * This array is a lookup table that translates 6-bit positive integer 
index values into their "Base64 Alphabet"
  * equivalents as specified in Table 1 of RFC 2045.
- *
+ * 
  * Thanks to "commons" project in ws.apache.org for this code.
  * https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/
+ * 
  */
 private static final byte[] STANDARD_ENCODE_TABLE = {
 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
@@ -90,12 +91,14 @@ public class Base64 extends BaseNCodec {
  * This array is a lookup table that translates Unicode characters drawn 
from the "Base64 Alphabet" (as specified
  * in Table 1 of RFC 2045) into their 6-bit positive integer equivalents. 
Characters that are not in the Base64
  * alphabet but fall within the bounds of the array are translated to -1.
- *
+ * 
  * Note: '+' and '-' both decode to 62. '/' and '_' both decode to 63. 
This means decoder seamlessly handles both
  * URL_SAFE and STANDARD base64. (The encoder, on the other hand, needs to 
know ahead of time what to emit).
- *
+ * 
+ * 
  * Thanks to "commons" project in ws.apache.org for this code.
  * https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/
+ * 
  */
 private static final byte[] STANDARD_DECODE_TABLE = {
 //   0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
@@ -260,9 +263,10 @@ public class Base64 extends BaseNCodec {
 /**
  * Validates whether decoding the final trailing character is possible in 
the context
  * of the set of possible base 64 values.
- *
- * The character is valid if the lower bits within the provided mask 
are zero. This
+ * 
+ * The character is valid if the lower bits within the provided mask are 
zero. This
  * is used to test the final trailing base-64 digit is zero in the bits 
that will be discarded.
+ * 
  *
  * @param emptyBitsMask The mask of the lower bits that should be empty
  * @param context the context to be used
@@ -295,7 +299,7 @@ public class Base64 extends BaseNCodec {
  */
 private final byte[] encodeTable;
 
-// Only one decode table currently; keep for consistency with Base32 code
+/** Only one decode table currently; keep for consistency with Base32 
code. */
 private final byte[] decodeTable;
 
 /**
@@ -502,8 +506,8 @@ public class Base64 extends BaseNCodec {
 context.modulus = (context.modulus+1) % 
BYTES_PER_ENCODED_BLOCK;
 context.ibitWorkArea = (context.ibitWorkArea << 
BITS_PER_ENCODED_BYTE) + result;
 if (context.modulus == 0) {
-buffer[context.pos++] = (byte) ((context.ibitWorkArea 
>> 16) & 

(tomcat) branch 9.0.x updated: Update internal fork of BCEL to 6.8.2

2024-04-02 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 b9e62b778b Update internal fork of BCEL to 6.8.2
b9e62b778b is described below

commit b9e62b778bd0bf003642a0d79352cdc8af63f65b
Author: Mark Thomas 
AuthorDate: Tue Apr 2 17:32:24 2024 +0100

Update internal fork of BCEL to 6.8.2
---
 MERGE.txt  |  2 +-
 java/org/apache/tomcat/util/bcel/Const.java| 48 +++---
 .../util/bcel/classfile/ClassFormatException.java  | 10 ++---
 .../tomcat/util/bcel/classfile/ClassParser.java|  4 +-
 .../tomcat/util/bcel/classfile/JavaClass.java  |  4 +-
 .../tomcat/util/bcel/classfile/package-info.java   | 21 ++
 .../apache/tomcat/util/bcel/classfile/package.html | 27 
 java/org/apache/tomcat/util/bcel/package-info.java | 22 ++
 java/org/apache/tomcat/util/bcel/package.html  | 30 --
 webapps/docs/changelog.xml |  3 ++
 10 files changed, 79 insertions(+), 92 deletions(-)

diff --git a/MERGE.txt b/MERGE.txt
index 78439cd3c8..b4678e08a1 100644
--- a/MERGE.txt
+++ b/MERGE.txt
@@ -36,7 +36,7 @@ BCEL
 Sub-tree:
 src/main/java/org/apache/bcel
 The SHA1 ID / tag for the most recent commit to be merged to Tomcat is:
-2ee2bff580c7138545377628074173412c27290c (2023-01-03)
+rel/commons-bcel-6.8.2 (2024-02-25)
 
 Codec
 -
diff --git a/java/org/apache/tomcat/util/bcel/Const.java 
b/java/org/apache/tomcat/util/bcel/Const.java
index 301ace69dc..894a63cc51 100644
--- a/java/org/apache/tomcat/util/bcel/Const.java
+++ b/java/org/apache/tomcat/util/bcel/Const.java
@@ -22,7 +22,7 @@ package org.apache.tomcat.util.bcel;
 public final class Const {
 
 /**
- * Java class file format Magic number (0xCAFEBABE)
+ * Java class file format Magic number: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.1-200-A;>
 The ClassFile Structure
  *  in The Java Virtual Machine Specification
@@ -30,7 +30,7 @@ public final class Const {
 public static final int JVM_CLASSFILE_MAGIC = 0xCAFEBABE;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for fields, methods, or classes: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1;>
 Flag definitions for
  *  Classes in the Java Virtual Machine Specification (Java SE 9 
Edition).
@@ -44,28 +44,28 @@ public final class Const {
 public static final short ACC_FINAL  = 0x0010;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for classes: {@value}.
  *
  * @see #ACC_FINAL
  */
 public static final short ACC_INTERFACE= 0x0200;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for methods or classes: {@value}.
  *
  * @see #ACC_FINAL
  */
 public static final short ACC_ABSTRACT = 0x0400;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for classes: {@value}.
  *
  * @see #ACC_FINAL
  */
 public static final short ACC_ANNOTATION   = 0x2000;
 
 /**
- * Marks a constant pool entry as type UTF-8.
+ * Marks a constant pool entry as type UTF-8: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.7;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -78,7 +78,7 @@ public final class Const {
  */
 
 /**
- * Marks a constant pool entry as type Integer.
+ * Marks a constant pool entry as type Integer: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.4;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -86,7 +86,7 @@ public final class Const {
 public static final byte CONSTANT_Integer = 3;
 
 /**
- * Marks a constant pool entry as type Float.
+ * Marks a constant pool entry as type Float: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.4;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -94,7 +94,7 @@ public final class Const {
 public static final byte CONSTANT_Float = 4;
 
 /**
- * Marks a constant pool entry as type Long.
+ * Marks a constant pool entry as type Long: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.5;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -102,7 +102,7 @@ public final class Const {
 public static final byte CONSTANT_Long = 5;
 
 /**
- * Marks a 

(tomcat) branch 10.1.x updated: Update internal fork of BCEL to 6.8.2

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 030b378fe5 Update internal fork of BCEL to 6.8.2
030b378fe5 is described below

commit 030b378fe5cff08b01261a8bcb896ee1ef551e07
Author: Mark Thomas 
AuthorDate: Tue Apr 2 17:32:24 2024 +0100

Update internal fork of BCEL to 6.8.2
---
 MERGE.txt  |  2 +-
 java/org/apache/tomcat/util/bcel/Const.java| 48 +++---
 .../util/bcel/classfile/ClassFormatException.java  | 10 ++---
 .../tomcat/util/bcel/classfile/ClassParser.java|  4 +-
 .../tomcat/util/bcel/classfile/JavaClass.java  |  4 +-
 .../tomcat/util/bcel/classfile/package-info.java   | 21 ++
 .../apache/tomcat/util/bcel/classfile/package.html | 27 
 java/org/apache/tomcat/util/bcel/package-info.java | 22 ++
 java/org/apache/tomcat/util/bcel/package.html  | 30 --
 webapps/docs/changelog.xml |  7 
 10 files changed, 83 insertions(+), 92 deletions(-)

diff --git a/MERGE.txt b/MERGE.txt
index af5ebba3fd..9ad4d0c5a5 100644
--- a/MERGE.txt
+++ b/MERGE.txt
@@ -37,7 +37,7 @@ Unused code is removed
 Sub-tree:
 src/main/java/org/apache/bcel
 The SHA1 ID / tag for the most recent commit to be merged to Tomcat is:
-2ee2bff580c7138545377628074173412c27290c (2023-01-03)
+rel/commons-bcel-6.8.2 (2024-02-25)
 
 Codec
 -
diff --git a/java/org/apache/tomcat/util/bcel/Const.java 
b/java/org/apache/tomcat/util/bcel/Const.java
index 301ace69dc..894a63cc51 100644
--- a/java/org/apache/tomcat/util/bcel/Const.java
+++ b/java/org/apache/tomcat/util/bcel/Const.java
@@ -22,7 +22,7 @@ package org.apache.tomcat.util.bcel;
 public final class Const {
 
 /**
- * Java class file format Magic number (0xCAFEBABE)
+ * Java class file format Magic number: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.1-200-A;>
 The ClassFile Structure
  *  in The Java Virtual Machine Specification
@@ -30,7 +30,7 @@ public final class Const {
 public static final int JVM_CLASSFILE_MAGIC = 0xCAFEBABE;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for fields, methods, or classes: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1;>
 Flag definitions for
  *  Classes in the Java Virtual Machine Specification (Java SE 9 
Edition).
@@ -44,28 +44,28 @@ public final class Const {
 public static final short ACC_FINAL  = 0x0010;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for classes: {@value}.
  *
  * @see #ACC_FINAL
  */
 public static final short ACC_INTERFACE= 0x0200;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for methods or classes: {@value}.
  *
  * @see #ACC_FINAL
  */
 public static final short ACC_ABSTRACT = 0x0400;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for classes: {@value}.
  *
  * @see #ACC_FINAL
  */
 public static final short ACC_ANNOTATION   = 0x2000;
 
 /**
- * Marks a constant pool entry as type UTF-8.
+ * Marks a constant pool entry as type UTF-8: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.7;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -78,7 +78,7 @@ public final class Const {
  */
 
 /**
- * Marks a constant pool entry as type Integer.
+ * Marks a constant pool entry as type Integer: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.4;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -86,7 +86,7 @@ public final class Const {
 public static final byte CONSTANT_Integer = 3;
 
 /**
- * Marks a constant pool entry as type Float.
+ * Marks a constant pool entry as type Float: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.4;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -94,7 +94,7 @@ public final class Const {
 public static final byte CONSTANT_Float = 4;
 
 /**
- * Marks a constant pool entry as type Long.
+ * Marks a constant pool entry as type Long: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.5;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -102,7 +102,7 @@ public final class Const {
 public static final byte CONSTANT_Long = 5;
 
 

(tomcat) branch main updated: Update internal fork of BCEL to 6.8.2

2024-04-02 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 2117788845 Update internal fork of BCEL to 6.8.2
2117788845 is described below

commit 2117788845e2085a990653b7bbf4ce5c4decc3b5
Author: Mark Thomas 
AuthorDate: Tue Apr 2 17:32:24 2024 +0100

Update internal fork of BCEL to 6.8.2
---
 MERGE.txt  |  2 +-
 java/org/apache/tomcat/util/bcel/Const.java| 48 +++---
 .../util/bcel/classfile/ClassFormatException.java  | 10 ++---
 .../tomcat/util/bcel/classfile/ClassParser.java|  4 +-
 .../tomcat/util/bcel/classfile/JavaClass.java  |  4 +-
 .../tomcat/util/bcel/classfile/package-info.java   | 21 ++
 .../apache/tomcat/util/bcel/classfile/package.html | 27 
 java/org/apache/tomcat/util/bcel/package-info.java | 22 ++
 java/org/apache/tomcat/util/bcel/package.html  | 30 --
 webapps/docs/changelog.xml |  3 ++
 10 files changed, 79 insertions(+), 92 deletions(-)

diff --git a/MERGE.txt b/MERGE.txt
index af5ebba3fd..9ad4d0c5a5 100644
--- a/MERGE.txt
+++ b/MERGE.txt
@@ -37,7 +37,7 @@ Unused code is removed
 Sub-tree:
 src/main/java/org/apache/bcel
 The SHA1 ID / tag for the most recent commit to be merged to Tomcat is:
-2ee2bff580c7138545377628074173412c27290c (2023-01-03)
+rel/commons-bcel-6.8.2 (2024-02-25)
 
 Codec
 -
diff --git a/java/org/apache/tomcat/util/bcel/Const.java 
b/java/org/apache/tomcat/util/bcel/Const.java
index 301ace69dc..894a63cc51 100644
--- a/java/org/apache/tomcat/util/bcel/Const.java
+++ b/java/org/apache/tomcat/util/bcel/Const.java
@@ -22,7 +22,7 @@ package org.apache.tomcat.util.bcel;
 public final class Const {
 
 /**
- * Java class file format Magic number (0xCAFEBABE)
+ * Java class file format Magic number: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.1-200-A;>
 The ClassFile Structure
  *  in The Java Virtual Machine Specification
@@ -30,7 +30,7 @@ public final class Const {
 public static final int JVM_CLASSFILE_MAGIC = 0xCAFEBABE;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for fields, methods, or classes: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1;>
 Flag definitions for
  *  Classes in the Java Virtual Machine Specification (Java SE 9 
Edition).
@@ -44,28 +44,28 @@ public final class Const {
 public static final short ACC_FINAL  = 0x0010;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for classes: {@value}.
  *
  * @see #ACC_FINAL
  */
 public static final short ACC_INTERFACE= 0x0200;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for methods or classes: {@value}.
  *
  * @see #ACC_FINAL
  */
 public static final short ACC_ABSTRACT = 0x0400;
 
 /**
- * One of the access flags for fields, methods, or classes.
+ * One of the access flags for classes: {@value}.
  *
  * @see #ACC_FINAL
  */
 public static final short ACC_ANNOTATION   = 0x2000;
 
 /**
- * Marks a constant pool entry as type UTF-8.
+ * Marks a constant pool entry as type UTF-8: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.7;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -78,7 +78,7 @@ public final class Const {
  */
 
 /**
- * Marks a constant pool entry as type Integer.
+ * Marks a constant pool entry as type Integer: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.4;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -86,7 +86,7 @@ public final class Const {
 public static final byte CONSTANT_Integer = 3;
 
 /**
- * Marks a constant pool entry as type Float.
+ * Marks a constant pool entry as type Float: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.4;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -94,7 +94,7 @@ public final class Const {
 public static final byte CONSTANT_Float = 4;
 
 /**
- * Marks a constant pool entry as type Long.
+ * Marks a constant pool entry as type Long: {@value}.
  *
  * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.5;>
 The Constant Pool in The
  *  Java Virtual Machine Specification
@@ -102,7 +102,7 @@ public final class Const {
 public static final byte CONSTANT_Long = 5;
 
 /**
- 

(tomcat) branch 9.0.x updated: Use inheritdoc

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

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 66fa9b7103 Use inheritdoc
66fa9b7103 is described below

commit 66fa9b71030d847490b9f95b4f0f44ffce208350
Author: remm 
AuthorDate: Tue Apr 2 17:06:36 2024 +0200

Use inheritdoc
---
 java/org/apache/catalina/connector/Request.java | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 13761b976e..67ad9e5ca3 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -925,8 +925,9 @@ public class Request implements HttpServletRequest {
 
 
 /**
- * Return the names of all request attributes for this Request, or an 
empty Enumeration if there are
- * none. Note that the attribute names returned will only be those for the 
attributes set via
+ * {@inheritDoc}
+ * 
+ * The attribute names returned will only be those for the attributes set 
via
  * {@link #setAttribute(String, Object)}. Tomcat internal attributes will 
not be included although they are
  * accessible via {@link #getAttribute(String)}. The Tomcat internal 
attributes include:
  * 
@@ -947,8 +948,6 @@ public class Request implements HttpServletRequest {
  * 
  * Connector implementations may return some, all or none of these 
attributes and may also support additional
  * attributes.
- *
- * @return the attribute names enumeration
  */
 @Override
 public Enumeration getAttributeNames() {


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



(tomcat) branch 10.1.x updated: Use inheritdoc

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 7d604721ec Use inheritdoc
7d604721ec is described below

commit 7d604721ecec74c76afddf27f775b3855839f198
Author: remm 
AuthorDate: Tue Apr 2 17:06:36 2024 +0200

Use inheritdoc
---
 java/org/apache/catalina/connector/Request.java | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index b5240f6602..234275e158 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -896,8 +896,9 @@ public class Request implements HttpServletRequest {
 
 
 /**
- * Return the names of all request attributes for this Request, or an 
empty Enumeration if there are
- * none. Note that the attribute names returned will only be those for the 
attributes set via
+ * {@inheritDoc}
+ * 
+ * The attribute names returned will only be those for the attributes set 
via
  * {@link #setAttribute(String, Object)}. Tomcat internal attributes will 
not be included although they are
  * accessible via {@link #getAttribute(String)}. The Tomcat internal 
attributes include:
  * 
@@ -918,8 +919,6 @@ public class Request implements HttpServletRequest {
  * 
  * Connector implementations may return some, all or none of these 
attributes and may also support additional
  * attributes.
- *
- * @return the attribute names enumeration
  */
 @Override
 public Enumeration getAttributeNames() {


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



(tomcat) branch main updated: Use inheritdoc

2024-04-02 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 8310e9f449 Use inheritdoc
8310e9f449 is described below

commit 8310e9f449d293cecf4c6e9437bfabec8d0a1b5a
Author: remm 
AuthorDate: Tue Apr 2 17:06:36 2024 +0200

Use inheritdoc
---
 java/org/apache/catalina/connector/Request.java | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index f57888357f..390ca9daa1 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -899,8 +899,9 @@ public class Request implements HttpServletRequest {
 
 
 /**
- * Return the names of all request attributes for this Request, or an 
empty Enumeration if there are
- * none. Note that the attribute names returned will only be those for the 
attributes set via
+ * {@inheritDoc}
+ * 
+ * The attribute names returned will only be those for the attributes set 
via
  * {@link #setAttribute(String, Object)}. Tomcat internal attributes will 
not be included although they are
  * accessible via {@link #getAttribute(String)}. The Tomcat internal 
attributes include:
  * 
@@ -921,8 +922,6 @@ public class Request implements HttpServletRequest {
  * 
  * Connector implementations may return some, all or none of these 
attributes and may also support additional
  * attributes.
- *
- * @return the attribute names enumeration
  */
 @Override
 public Enumeration getAttributeNames() {


-
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: Improve the locking stratgey for StandardServer.services

2024-04-02 Thread schultz
This is an automated email from the ASF dual-hosted git repository.

schultz 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 0b3ee30d14 Improve the locking stratgey for StandardServer.services
0b3ee30d14 is described below

commit 0b3ee30d148e64a2f4ec73de7d236a05e9f4a6d9
Author: Christopher Schultz 
AuthorDate: Tue Apr 2 11:00:14 2024 -0400

Improve the locking stratgey for StandardServer.services

Change a simple synchronized lock to a ReentrantReadWriteLock to allow 
multiple readers to operate simultaneously. Based upon a suggestion by Markus 
Wolfe.
---
 java/org/apache/catalina/core/StandardServer.java | 67 +++
 webapps/docs/changelog.xml|  6 ++
 2 files changed, 61 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardServer.java 
b/java/org/apache/catalina/core/StandardServer.java
index 2b2ae007e2..9175da846b 100644
--- a/java/org/apache/catalina/core/StandardServer.java
+++ b/java/org/apache/catalina/core/StandardServer.java
@@ -35,6 +35,8 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import javax.management.InstanceNotFoundException;
 import javax.management.MBeanException;
@@ -140,8 +142,14 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
  * The set of Services associated with this Server.
  */
 private Service[] services = new Service[0];
-private final Object servicesLock = new Object();
 
+private final Lock servicesReadLock;
+private final Lock servicesWriteLock;
+{
+ReentrantReadWriteLock servicesLock = new ReentrantReadWriteLock();
+servicesReadLock = servicesLock.readLock();
+servicesWriteLock = servicesLock.writeLock();
+}
 
 /**
  * The shutdown command string we are looking for.
@@ -506,7 +514,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 
 service.setServer(this);
 
-synchronized (servicesLock) {
+servicesWriteLock.lock();
+
+try {
 Service results[] = new Service[services.length + 1];
 System.arraycopy(services, 0, results, 0, services.length);
 results[services.length] = service;
@@ -522,8 +532,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 
 // Report this property change to interested listeners
 support.firePropertyChange("service", null, service);
+} finally {
+servicesWriteLock.unlock();
 }
-
 }
 
 public void stopAwait() {
@@ -693,13 +704,18 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 if (name == null) {
 return null;
 }
-synchronized (servicesLock) {
+servicesReadLock.lock();
+
+try {
 for (Service service : services) {
 if (name.equals(service.getName())) {
 return service;
 }
 }
+} finally {
+servicesReadLock.unlock();
 }
+
 return null;
 }
 
@@ -709,8 +725,12 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
  */
 @Override
 public Service[] findServices() {
-synchronized (servicesLock) {
+servicesReadLock.lock();
+
+try {
 return services.clone();
+} finally {
+servicesReadLock.unlock();
 }
 }
 
@@ -718,12 +738,16 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
  * @return the JMX service names.
  */
 public ObjectName[] getServiceNames() {
-synchronized (servicesLock) {
+servicesReadLock.lock();
+
+try {
 ObjectName[] onames = new ObjectName[services.length];
 for (int i = 0; i < services.length; i++) {
 onames[i] = ((StandardService) services[i]).getObjectName();
 }
 return onames;
+} finally {
+servicesReadLock.unlock();
 }
 }
 
@@ -736,7 +760,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 @Override
 public void removeService(Service service) {
 
-synchronized (servicesLock) {
+servicesWriteLock.lock();
+
+try {
 int j = -1;
 for (int i = 0; i < services.length; i++) {
 if (service == services[i]) {
@@ -763,8 +789,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 
  

(tomcat) branch 10.1.x updated: Improve the locking stratgey for StandardServer.services

2024-04-02 Thread schultz
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 9c306cf92b Improve the locking stratgey for StandardServer.services
9c306cf92b is described below

commit 9c306cf92bae894e84dbf533d6c64b555869a711
Author: Christopher Schultz 
AuthorDate: Tue Apr 2 11:00:14 2024 -0400

Improve the locking stratgey for StandardServer.services

Change a simple synchronized lock to a ReentrantReadWriteLock to allow 
multiple readers to operate simultaneously. Based upon a suggestion by Markus 
Wolfe.
---
 java/org/apache/catalina/core/StandardServer.java | 67 +++
 webapps/docs/changelog.xml| 10 
 2 files changed, 65 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardServer.java 
b/java/org/apache/catalina/core/StandardServer.java
index e4ca5ec3d7..f77c5b38cd 100644
--- a/java/org/apache/catalina/core/StandardServer.java
+++ b/java/org/apache/catalina/core/StandardServer.java
@@ -32,6 +32,8 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import javax.management.InstanceNotFoundException;
 import javax.management.MBeanException;
@@ -136,8 +138,14 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
  * The set of Services associated with this Server.
  */
 private Service[] services = new Service[0];
-private final Object servicesLock = new Object();
 
+private final Lock servicesReadLock;
+private final Lock servicesWriteLock;
+{
+ReentrantReadWriteLock servicesLock = new ReentrantReadWriteLock();
+servicesReadLock = servicesLock.readLock();
+servicesWriteLock = servicesLock.writeLock();
+}
 
 /**
  * The shutdown command string we are looking for.
@@ -502,7 +510,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 
 service.setServer(this);
 
-synchronized (servicesLock) {
+servicesWriteLock.lock();
+
+try {
 Service results[] = new Service[services.length + 1];
 System.arraycopy(services, 0, results, 0, services.length);
 results[services.length] = service;
@@ -518,8 +528,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 
 // Report this property change to interested listeners
 support.firePropertyChange("service", null, service);
+} finally {
+servicesWriteLock.unlock();
 }
-
 }
 
 public void stopAwait() {
@@ -689,13 +700,18 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 if (name == null) {
 return null;
 }
-synchronized (servicesLock) {
+servicesReadLock.lock();
+
+try {
 for (Service service : services) {
 if (name.equals(service.getName())) {
 return service;
 }
 }
+} finally {
+servicesReadLock.unlock();
 }
+
 return null;
 }
 
@@ -705,8 +721,12 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
  */
 @Override
 public Service[] findServices() {
-synchronized (servicesLock) {
+servicesReadLock.lock();
+
+try {
 return services.clone();
+} finally {
+servicesReadLock.unlock();
 }
 }
 
@@ -714,12 +734,16 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
  * @return the JMX service names.
  */
 public ObjectName[] getServiceNames() {
-synchronized (servicesLock) {
+servicesReadLock.lock();
+
+try {
 ObjectName[] onames = new ObjectName[services.length];
 for (int i = 0; i < services.length; i++) {
 onames[i] = ((StandardService) services[i]).getObjectName();
 }
 return onames;
+} finally {
+servicesReadLock.unlock();
 }
 }
 
@@ -732,7 +756,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 @Override
 public void removeService(Service service) {
 
-synchronized (servicesLock) {
+servicesWriteLock.lock();
+
+try {
 int j = -1;
 for (int i = 0; i < services.length; i++) {
 if (service == services[i]) {
@@ -759,8 +785,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 
  

(tomcat) branch main updated: Improve the locking stratgey for StandardServer.services

2024-04-02 Thread schultz
This is an automated email from the ASF dual-hosted git repository.

schultz 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 d8c7d269bc Improve the locking stratgey for StandardServer.services
d8c7d269bc is described below

commit d8c7d269bcaa5db62dcf3ff2768c903634c6fa8f
Author: Christopher Schultz 
AuthorDate: Tue Apr 2 11:00:14 2024 -0400

Improve the locking stratgey for StandardServer.services

Change a simple synchronized lock to a ReentrantReadWriteLock to allow 
multiple readers to operate simultaneously. Based upon a suggestion by Markus 
Wolfe.
---
 java/org/apache/catalina/core/StandardServer.java | 67 +++
 webapps/docs/changelog.xml|  6 ++
 2 files changed, 61 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardServer.java 
b/java/org/apache/catalina/core/StandardServer.java
index 68dc96ce91..5d102c697f 100644
--- a/java/org/apache/catalina/core/StandardServer.java
+++ b/java/org/apache/catalina/core/StandardServer.java
@@ -31,6 +31,8 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import javax.management.InstanceNotFoundException;
 import javax.management.MBeanException;
@@ -135,8 +137,14 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
  * The set of Services associated with this Server.
  */
 private Service[] services = new Service[0];
-private final Object servicesLock = new Object();
 
+private final Lock servicesReadLock;
+private final Lock servicesWriteLock;
+{
+ReentrantReadWriteLock servicesLock = new ReentrantReadWriteLock();
+servicesReadLock = servicesLock.readLock();
+servicesWriteLock = servicesLock.writeLock();
+}
 
 /**
  * The shutdown command string we are looking for.
@@ -501,7 +509,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 
 service.setServer(this);
 
-synchronized (servicesLock) {
+servicesWriteLock.lock();
+
+try {
 Service results[] = new Service[services.length + 1];
 System.arraycopy(services, 0, results, 0, services.length);
 results[services.length] = service;
@@ -517,8 +527,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 
 // Report this property change to interested listeners
 support.firePropertyChange("service", null, service);
+} finally {
+servicesWriteLock.unlock();
 }
-
 }
 
 public void stopAwait() {
@@ -685,13 +696,18 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 if (name == null) {
 return null;
 }
-synchronized (servicesLock) {
+servicesReadLock.lock();
+
+try {
 for (Service service : services) {
 if (name.equals(service.getName())) {
 return service;
 }
 }
+} finally {
+servicesReadLock.unlock();
 }
+
 return null;
 }
 
@@ -701,8 +717,12 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
  */
 @Override
 public Service[] findServices() {
-synchronized (servicesLock) {
+servicesReadLock.lock();
+
+try {
 return services.clone();
+} finally {
+servicesReadLock.unlock();
 }
 }
 
@@ -710,12 +730,16 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
  * @return the JMX service names.
  */
 public ObjectName[] getServiceNames() {
-synchronized (servicesLock) {
+servicesReadLock.lock();
+
+try {
 ObjectName[] onames = new ObjectName[services.length];
 for (int i = 0; i < services.length; i++) {
 onames[i] = ((StandardService) services[i]).getObjectName();
 }
 return onames;
+} finally {
+servicesReadLock.unlock();
 }
 }
 
@@ -728,7 +752,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 @Override
 public void removeService(Service service) {
 
-synchronized (servicesLock) {
+servicesWriteLock.lock();
+
+try {
 int j = -1;
 for (int i = 0; i < services.length; i++) {
 if (service == services[i]) {
@@ -755,8 +781,9 @@ public final class StandardServer extends 
LifecycleMBeanBase implements Server {
 

Re: [PR] Changed simple synchronization to ReentrantReadWriteLock [tomcat]

2024-04-02 Thread via GitHub


ChristopherSchultz commented on PR #712:
URL: https://github.com/apache/tomcat/pull/712#issuecomment-2032266991

   Thank you for this PR, though I was already working on a patch and the unit 
tests pass, so I'm going to commit my patch instead of yours. I will credit you 
for the idea in the changelog, however.
   
   I like my patch better than yours primarily because you are placing the call 
to `lock.lock()` within the `try` block, and it should be placed before the 
`try` block instead. Also, I use two separate `Lock` objects instead of calling 
`ReentrantReadWriteLock.writeLock()` or `.readLock()` each time, which makes it 
easier to read the code to see that the correct lock is being used.
   
   I _could_ just add commits to your PR to make it work, but the work is 
already done on my end so I'm gonna commit mine.


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



Re: [PR] Changed simple synchronization to ReentrantReadWriteLock [tomcat]

2024-04-02 Thread via GitHub


ChristopherSchultz closed pull request #712: Changed simple synchronization to 
ReentrantReadWriteLock
URL: https://github.com/apache/tomcat/pull/712


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



Re: [PR] Sort the resource list,Ensure consistency in the order of loading res… [tomcat]

2024-04-02 Thread via GitHub


songxiaosheng commented on PR #708:
URL: https://github.com/apache/tomcat/pull/708#issuecomment-2031977951

   > Anyone who wants this should lobby the Jakarta Servlet Experts Group. It's 
the only way this is likely to get into Tomcat.
   
   Thank you. I feel it's worth a try


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



[PR] Changed simple synchronization to ReentrantReadWriteLock [tomcat]

2024-04-02 Thread via GitHub


LupusMKW opened a new pull request, #712:
URL: https://github.com/apache/tomcat/pull/712

   Due to 
https://github.com/apache/tomcat/commit/4f33be682fda02a616baa0fd9b4965d248cfe1c1
 our application does no longer work. 
   
   The commit improved the situation with respect to concurrent mutability of 
the Services array. Previously, it was possible to read the array while it was 
being modified concurrently. 
   Unfortunately, it can now happen that Tomcat runs into a deadlock if a 
starting application attempts to gather information from the Services array 
(which all our applications do).
   
   The proposed change replaces the simple lock with a ReentrantReaderWriter 
lock, so that readers can read the Services array and only writers are blocked.
   


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



Re: [PR] Sort the resource list,Ensure consistency in the order of loading res… [tomcat]

2024-04-02 Thread via GitHub


ChristopherSchultz commented on PR #708:
URL: https://github.com/apache/tomcat/pull/708#issuecomment-2031945781

   Anyone who wants this should lobby the Jakarta Servlet Experts Group. It's 
the only way this is likely to get into Tomcat.


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



Re: [PR] Sort the resource list,Ensure consistency in the order of loading res… [tomcat]

2024-04-02 Thread via GitHub


songxiaosheng commented on PR #708:
URL: https://github.com/apache/tomcat/pull/708#issuecomment-2031336540

   > https://bz.apache.org/bugzilla/show_bug.cgi?id=57129
   
   From the user's perspective, there is a greater risk in the uncertainty of 
not sorting. Previous discussions did not seem to pay much attention to this 
issue. After long-term research, it was found that SpringBoot has sorted the 
class loading order. The website From the user's perspective, this Tomcat 
sorting is necessary. If you just look at it from the perspective of historical 
habits and developers, it doesn't feel good.


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



Java 22 is GA + Heads-up!

2024-04-02 Thread David Delabassee
Welcome to the latest OpenJDK Quality Outreach update!

Java 22 was just released along with JavaFX 22 [1][2]. Thank you to all the 
projects who contributed to those releases by testing and providing feedback 
using their respective early-access builds. And to celebrate that, the Java 
DevRel Team hosted a +4h live-stream with guests such as Brian Goetz, Viktor 
Klang, Alan Bateman, etc. You can watch the launch stream replay here [3].

The JDK 23 schedule is now known [4] with rampdown starting early June and 
general availability sets for mid-September. So far, 2 JEPs have been targeted 
to JDK 23:
- JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [5]
- JEP 466: Class-File API (2nd Preview) [6]

The focus should now be shifted to testing your project(s) on JDK 23. And don't 
forget that the Oracle setup-java github action [7] supports, amongst others, 
the latest OpenJDK 23 Early-Access builds. So, JDK 23 EA testing is literally 
one pipeline away.

[1] https://mail.openjdk.org/pipermail/jdk-dev/2024-March/008827.html
[3] https://jdk.java.net/javafx22/
[3] https://www.youtube.com/live/AjjAZsnRXtE?feature=shared=278
[4] https://openjdk.org/projects/jdk/23/
[5] https://openjdk.org/jeps/455
[6] https://openjdk.org/jeps/466
[7] https://github.com/oracle-actions/setup-java


## Heads-up: JDK 20-23: Support for Unicode CLDR Version 42

The JDK update to CLDR version 42 included a change where regular spaces in 
date/time formats (and some other formatted values) were replaced with (narrow) 
non-breaking spaces. This lead to issues for existing code that relied on 
parsing such strings. To address that, JDK 23 allows loose matching of spaces 
when parsing date/time strings. Loose matching is performed in the lenient 
parsing style for both date/time parsers in `java.time.format` and `java.text` 
packages. In the default strict parsing style, those spaces are considered 
distinct as before.

Please read this updated heads-up [9] for details on how to configure 
strict/lenient parsing in the `java.time.format` (strict by default) and 
`java.text` (lenient by default) packages.

[9] https://inside.java/2024/03/29/quality-heads-up/


## Heads-up: macOS 14 users running on Apple silicon systems should update 
directly to macOS 14.4.1

An issue introduced by macOS 14.4 caused some Java processes, regardless of the 
Java version, to terminate unexpectedly on Apple silicon (AArch64). On March 25 
Apple released macOS 14.4.1 and indicated on their support site that it 
addresses this issue. Oracle can confirm that after applying macOS 14.4.1 we 
are unable to reproduce the problem. So, Java users on macOS 14 running on 
Apple silicon systems should skip macOS 14.4 and update directly to macOS 
14.4.1.

More details can be found on 
https://blogs.oracle.com/java/post/java-on-macos-14-4


## JDK 23 Early-Access Builds

The JDK 23 EA builds 16 are available [10], and are provided under the GNU 
General Public License v2, with the Classpath Exception. The Release Notes [11] 
are also available.

### Changes in recent JDK 23 builds that may be of interest:
- JDK-8324774: Add DejaVu web fonts (reported by AssertJ)
- JDK-8327385: Add JavaDoc option to exclude web fonts from generated 
documentation (reported by AssertJ)
- JDK-8328638: Fallback option for POST-only OCSP requests
- JDK-8320362: Load anchor certificates from Keychain keystore
- JDK-8327875: ChoiceFormat should advise throwing 
UnsupportedOperationException for unused methods
- JDK-8296244: Alternate implementation of user-based authorization Subject 
APIs that doesn’t depend on Security Manager APIs
- JDK-8327818: Implement Kerberos debug with sun.security.util.Debug
- JDK-7036144: GZIPInputStream readTrailer uses faulty available() test for 
end-of-stream
- JDK-8319251: Change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT
- JDK-8327651: Rename DictionaryEntry members related to protection domain
- JDK-8321408: Add Certainly roots R1 and E1
- JDK-8164094: javadoc allows to create a @link to a non-existent method
- JDK-8325496: Make TrimNativeHeapInterval a product switch
- JDK-8174269: Remove COMPAT locale data provider from JDK
- JDK-8322750: Test "api/java_awt/interactive/SystemTrayTests.html" failed 
because …
- JDK-8139457: Relax alignment of array elements
- JDK-8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly
- JDK-8326908: DecimalFormat::toPattern throws OutOfMemoryError when pattern is 
empty string
- JDK-8247972: incorrect implementation of JVM TI GetObjectMonitorUsage
- JDK-8325580: Remove "alternatives --remove" call from Java rpm installer
- JDK-8326838: JFR: Native mirror events
- JDK-8326106: Write and clear stack trace table outside of safepoint
- JDK-8323183: ClassFile API performance improvements
- JDK-8324829: Uniform use of synchronizations in NMT
- JDK-8326586: Improve Speed of System.map
- JDK-8318761: MessageFormat pattern support for CompactNumberFormat, 
ListFormat, and DateTimeFormatter