[GitHub] [tomcat] nathannaveen opened a new pull request, #522: chore: Set permissions for GitHub actions

2022-06-06 Thread GitBox


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

Restrict the GitHub token permissions only to the required ones; this way, 
even if the attackers will succeed in compromising your workflow, they won’t be 
able to do much.
   
   - Included permissions for the action. 
https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
   
   
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
   
   https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
   
   [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn 
requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)
   
   Signed-off-by: nathannaveen <42319948+nathannav...@users.noreply.github.com>
   


-- 
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-native] 01/01: Tag 1.2.34

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

markt pushed a commit to tag 1.2.34
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git

commit a0dd83ddac6dcd4fd315f083adaab3fd24a9f0b4
Author: Mark Thomas 
AuthorDate: Mon Jun 6 17:29:40 2022 +0100

Tag 1.2.34
---
 build.properties.default | 2 +-
 native/include/tcn_version.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 25121a043..9670d7fc6 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -20,7 +20,7 @@ version.major=1
 version.minor=2
 version.build=34
 version.patch=0
-version.suffix=-dev
+version.suffix=
 
 # - Default Base Path for Dependent Packages -
 # Please note this path must be absolute, not relative,
diff --git a/native/include/tcn_version.h b/native/include/tcn_version.h
index 60789f78c..f76e3e2e6 100644
--- a/native/include/tcn_version.h
+++ b/native/include/tcn_version.h
@@ -69,7 +69,7 @@ extern "C" {
  *  This symbol is defined for internal, "development" copies of TCN. This
  *  symbol will be #undef'd for releases.
  */
-#define TCN_IS_DEV_VERSION  1
+#define TCN_IS_DEV_VERSION  0
 
 
 /** The formatted string of APU's version */


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



[tomcat-native] tag 1.2.34 created (now a0dd83dda)

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

markt pushed a change to tag 1.2.34
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


  at a0dd83dda (commit)
This tag includes the following new commits:

 new a0dd83dda Tag 1.2.34

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



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



[tomcat-native] branch main updated: Fix git command in comment

2022-06-06 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-native.git


The following commit(s) were added to refs/heads/main by this push:
 new ad9b4a3fb Fix git command in comment
ad9b4a3fb is described below

commit ad9b4a3fb5c9d996751dd47d8c33aec51e50de44
Author: Mark Thomas 
AuthorDate: Mon Jun 6 17:22:03 2022 +0100

Fix git command in comment
---
 jnirelease.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jnirelease.sh b/jnirelease.sh
index bcaefe33e..c71403d57 100755
--- a/jnirelease.sh
+++ b/jnirelease.sh
@@ -176,7 +176,7 @@ if [ $diffcount -ne 0 ]; then
 echo " $TCJAVA_GITBASE"
 echo " Either correct now by running"
 echo " 'git rm -rf java/org/apache/tomcat/jni'"
-echo " 'git read-tree --prefix=java/org/apache/tomcat/jni/ -u 
main:java/org/apache/tomcat/jni'"
+echo " 'git read-tree --prefix=java/org/apache/tomcat/jni/ -u 
tcjava/main:java/org/apache/tomcat/jni'"
 echo " 'git commit'"
 echo " or run this script with -f (force)"
 if [ "X$JKJNIFORCE" = "X1" ]


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



[tomcat-native] branch 1.2.x updated: Align with 9.0.x

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

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


The following commit(s) were added to refs/heads/1.2.x by this push:
 new 14f7c6871 Align with 9.0.x
14f7c6871 is described below

commit 14f7c687121fba6848e9cce67550cc1991b6ad9c
Author: Mark Thomas 
AuthorDate: Mon Jun 6 17:21:17 2022 +0100

Align with 9.0.x
---
 java/org/apache/tomcat/jni/BIOCallback.java  |  3 ++
 java/org/apache/tomcat/jni/Buffer.java   | 29 +++--
 java/org/apache/tomcat/jni/Error.java|  3 ++
 java/org/apache/tomcat/jni/Library.java  | 39 -
 java/org/apache/tomcat/jni/OS.java   |  7 
 java/org/apache/tomcat/jni/PasswordCallback.java |  3 ++
 java/org/apache/tomcat/jni/Pool.java | 53 
 java/org/apache/tomcat/jni/SSL.java  | 48 +++--
 java/org/apache/tomcat/jni/SSLContext.java   | 31 ++
 9 files changed, 199 insertions(+), 17 deletions(-)

diff --git a/java/org/apache/tomcat/jni/BIOCallback.java 
b/java/org/apache/tomcat/jni/BIOCallback.java
index 7dfdce051..ea9ccff67 100644
--- a/java/org/apache/tomcat/jni/BIOCallback.java
+++ b/java/org/apache/tomcat/jni/BIOCallback.java
@@ -19,7 +19,10 @@ package org.apache.tomcat.jni;
 /** Open SSL BIO Callback Interface
  *
  * @author Mladen Turk
+ *
+ * @deprecated Unused. Will be removed in Tomcat 10.1
  */
+@Deprecated
 public interface BIOCallback {
 
 /**
diff --git a/java/org/apache/tomcat/jni/Buffer.java 
b/java/org/apache/tomcat/jni/Buffer.java
index 9802b114a..a9d29edb1 100644
--- a/java/org/apache/tomcat/jni/Buffer.java
+++ b/java/org/apache/tomcat/jni/Buffer.java
@@ -18,9 +18,9 @@ package org.apache.tomcat.jni;
 
 import java.nio.ByteBuffer;
 
-/** Buffer
- *
- * @author Mladen Turk
+/**
+ * Provides utilities related to the use of directly allocated
+ * {@link ByteBuffer} instances with native code.
  */
 public class Buffer {
 
@@ -28,7 +28,10 @@ public class Buffer {
  * Allocate a new ByteBuffer from memory
  * @param size The amount of memory to allocate
  * @return The ByteBuffer with allocated memory
+ *
+ * @deprecated Unused. Will be removed in Tomcat 10.1
  */
+@Deprecated
 public static native ByteBuffer malloc(int size);
 
 /**
@@ -36,7 +39,10 @@ public class Buffer {
  * @param num Number of elements.
  * @param size Length in bytes of each element.
  * @return The ByteBuffer with allocated memory
+ *
+ * @deprecated Unused. Will be removed in Tomcat 10.1
  */
+@Deprecated
 public static native ByteBuffer calloc(int num, int size);
 
 /**
@@ -44,7 +50,10 @@ public class Buffer {
  * @param p The pool to allocate from
  * @param size The amount of memory to allocate
  * @return The ByteBuffer with allocated memory
+ *
+ * @deprecated Unused. Will be removed in Tomcat 10.1
  */
+@Deprecated
 public static native ByteBuffer palloc(long p, int size);
 
 /**
@@ -52,7 +61,10 @@ public class Buffer {
  * @param p The pool to allocate from
  * @param size The amount of memory to allocate
  * @return The ByteBuffer with allocated memory
+ *
+ * @deprecated Unused. Will be removed in Tomcat 10.1
  */
+@Deprecated
 public static native ByteBuffer pcalloc(long p, int size);
 
 /**
@@ -62,7 +74,10 @@ public class Buffer {
  * @param mem The memory to use
  * @param size The amount of memory to use
  * @return The ByteBuffer with attached memory
+ *
+ * @deprecated Unused. Will be removed in Tomcat 10.1
  */
+@Deprecated
 public static native ByteBuffer create(long mem, int size);
 
 /**
@@ -70,12 +85,17 @@ public class Buffer {
  * Warning : Call this method only on ByteBuffers
  * that were created by calling Buffer.alloc or Buffer.calloc.
  * @param buf Previously allocated ByteBuffer to be freed.
+ *
+ * @deprecated Unused. Will be removed in Tomcat 10.1
  */
+@Deprecated
 public static native void free(ByteBuffer buf);
 
 /**
  * Returns the memory address of the ByteBuffer.
+ *
  * @param buf Previously allocated ByteBuffer.
+ *
  * @return the memory address
  */
 public static native long address(ByteBuffer buf);
@@ -84,7 +104,10 @@ public class Buffer {
  * Returns the allocated memory size of the ByteBuffer.
  * @param buf Previously allocated ByteBuffer.
  * @return the size
+ *
+ * @deprecated Unused. Will be removed in Tomcat 10.1
  */
+@Deprecated
 public static native long size(ByteBuffer buf);
 
 }
diff --git a/java/org/apache/tomcat/jni/Error.java 
b/java/org/apache/tomcat/jni/Error.java
index bd3d87b39..a72cc15d5 100644
--- a/java/org/apache/tomcat/jni/Error.java
+++ b/java/org/apache/tomcat/jni/Error.java
@@ -19,7 

[tomcat-native] branch 1.2.x updated: Fix script

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

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


The following commit(s) were added to refs/heads/1.2.x by this push:
 new 0082a11f2 Fix script
0082a11f2 is described below

commit 0082a11f23d6ea06eccdc299a57a9632edd7a304
Author: Mark Thomas 
AuthorDate: Mon Jun 6 17:20:30 2022 +0100

Fix script
---
 jnirelease.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jnirelease.sh b/jnirelease.sh
index 95f456647..cc1226088 100755
--- a/jnirelease.sh
+++ b/jnirelease.sh
@@ -176,7 +176,7 @@ if [ $diffcount -ne 0 ]; then
 echo " $TCJAVA_GITBASE"
 echo " Either correct now by running"
 echo " 'git rm -rf java/org/apache/tomcat/jni'"
-echo " 'git read-tree --prefix=java/org/apache/tomcat/jni/ -u 
9.0.x:java/org/apache/tomcat/jni'"
+echo " 'git read-tree --prefix=java/org/apache/tomcat/jni/ -u 
tcjava/9.0.x:java/org/apache/tomcat/jni'"
 echo " 'git commit'"
 echo " or run this script with -f (force)"
 if [ "X$JKJNIFORCE" = "X1" ]


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



[tomcat-native] branch 1.2.x updated: Additional version update

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

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


The following commit(s) were added to refs/heads/1.2.x by this push:
 new 1e46dd79e Additional version update
1e46dd79e is described below

commit 1e46dd79e3969c38560fcc2192d41f6e13f13c4b
Author: Mark Thomas 
AuthorDate: Mon Jun 6 17:07:40 2022 +0100

Additional version update
---
 jnirelease.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jnirelease.sh b/jnirelease.sh
index 129345723..95f456647 100755
--- a/jnirelease.sh
+++ b/jnirelease.sh
@@ -176,7 +176,7 @@ if [ $diffcount -ne 0 ]; then
 echo " $TCJAVA_GITBASE"
 echo " Either correct now by running"
 echo " 'git rm -rf java/org/apache/tomcat/jni'"
-echo " 'git read-tree --prefix=java/org/apache/tomcat/jni/ -u 
main:java/org/apache/tomcat/jni'"
+echo " 'git read-tree --prefix=java/org/apache/tomcat/jni/ -u 
9.0.x:java/org/apache/tomcat/jni'"
 echo " 'git commit'"
 echo " or run this script with -f (force)"
 if [ "X$JKJNIFORCE" = "X1" ]


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



[tomcat-native] 01/01: Tag 1.2.34

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

markt pushed a commit to tag 1.2.34
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git

commit b15d0031c468fe587bf43b9325212f15c828ac0a
Author: Mark Thomas 
AuthorDate: Mon Jun 6 16:59:26 2022 +0100

Tag 1.2.34
---
 build.properties.default | 2 +-
 native/include/tcn_version.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 25121a043..9670d7fc6 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -20,7 +20,7 @@ version.major=1
 version.minor=2
 version.build=34
 version.patch=0
-version.suffix=-dev
+version.suffix=
 
 # - Default Base Path for Dependent Packages -
 # Please note this path must be absolute, not relative,
diff --git a/native/include/tcn_version.h b/native/include/tcn_version.h
index 60789f78c..f76e3e2e6 100644
--- a/native/include/tcn_version.h
+++ b/native/include/tcn_version.h
@@ -69,7 +69,7 @@ extern "C" {
  *  This symbol is defined for internal, "development" copies of TCN. This
  *  symbol will be #undef'd for releases.
  */
-#define TCN_IS_DEV_VERSION  1
+#define TCN_IS_DEV_VERSION  0
 
 
 /** The formatted string of APU's version */


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



[tomcat-native] tag 1.2.34 created (now b15d0031c)

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

markt pushed a change to tag 1.2.34
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


  at b15d0031c (commit)
This tag includes the following new commits:

 new b15d0031c Tag 1.2.34

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



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



[tomcat-native] branch 1.2.x updated: This TODO item has been resolved (the classes are in the Tomcat code)

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

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


The following commit(s) were added to refs/heads/1.2.x by this push:
 new fec453fa5 This TODO item has been resolved (the classes are in the 
Tomcat code)
fec453fa5 is described below

commit fec453fa50b268b20700d5780c7e53fce08c61c4
Author: Mark Thomas 
AuthorDate: Mon Jun 6 16:55:54 2022 +0100

This TODO item has been resolved (the classes are in the Tomcat code)
---
 TODO.txt | 4 
 1 file changed, 4 deletions(-)

diff --git a/TODO.txt b/TODO.txt
index b3d06de4a..36660a190 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -60,10 +60,6 @@ Java Classes Source Distribution
 Check on how to handle the test and examples classes.
 I think they have no other home.
 
-Furthermore some of the Java files do not exist inside TC:
-- Apr.java, apr.properties, jni/Buffer.java and jni/Thread.java
-I don't know their purpose and whether we can delete them.
-
 
 Releasing
 -


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



[tomcat-native] branch main updated: This TODO item has been resolved (the classes are in the Tomcat code)

2022-06-06 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-native.git


The following commit(s) were added to refs/heads/main by this push:
 new b69b38d9b This TODO item has been resolved (the classes are in the 
Tomcat code)
b69b38d9b is described below

commit b69b38d9b6d75652e6a1fe4ef431c8f4a8933f32
Author: Mark Thomas 
AuthorDate: Mon Jun 6 16:55:54 2022 +0100

This TODO item has been resolved (the classes are in the Tomcat code)
---
 TODO.txt | 4 
 1 file changed, 4 deletions(-)

diff --git a/TODO.txt b/TODO.txt
index b3d06de4a..36660a190 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -60,10 +60,6 @@ Java Classes Source Distribution
 Check on how to handle the test and examples classes.
 I think they have no other home.
 
-Furthermore some of the Java files do not exist inside TC:
-- Apr.java, apr.properties, jni/Buffer.java and jni/Thread.java
-I don't know their purpose and whether we can delete them.
-
 
 Releasing
 -


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



[tomcat-native] branch 1.2.x updated: Back-port updates for new 1.2.x branch

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

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


The following commit(s) were added to refs/heads/1.2.x by this push:
 new b606869d4 Back-port updates for new 1.2.x branch
b606869d4 is described below

commit b606869d49d47ba450c6b93fdb2854bd1fe50f4a
Author: Mark Thomas 
AuthorDate: Mon Jun 6 16:48:57 2022 +0100

Back-port updates for new 1.2.x branch

Sync Java API in 1.2.x with 9.0.x since:
- 10.1.x has new, smaller API
- 10.0.x will be EOL long before 9.0.x
- 10.0.x and 9.0.x have the same Java API
---
 jnirelease.sh | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/jnirelease.sh b/jnirelease.sh
index 224658540..129345723 100755
--- a/jnirelease.sh
+++ b/jnirelease.sh
@@ -85,7 +85,7 @@ if [ "x$JKJNIEXT" = "x" ]; then
 echo ""
 echo "Unknown Git tag/branch"
 echo "Use:"
-echo "  --ver=|1.1.x|main|."
+echo "  --ver=|1.1.x|1.2.x|main|."
 echo ""
 exit 1
 fi
@@ -136,6 +136,9 @@ fi
 if [ "x$JKJNIEXT" = "xmain" ]; then
 JKJNIHASH=`git ls-remote $GITBASE refs/heads/main | awk '{print $1}'`
 JKJNIVER="$JKJNIEXT-$JKJNIHASH"
+elif [ "x$JKJNIEXT" = "x1.2.x" ]; then
+JKJNIHASH=`git ls-remote $GITBASE refs/heads/1.2.x | awk '{print $1}'`
+JKJNIVER="$JKJNIEXT-$JKJNIHASH"
 elif [ "x$JKJNIEXT" = "x1.1.x" ]; then
 JKJNIHASH=`git ls-remote $GITBASE refs/heads/1.1.x | awk '{print $1}'`
 JKJNIVER="$JKJNIEXT-$JKJNIHASH"
@@ -166,14 +169,14 @@ if [ ! -d .git/refs/remotes/tcjava ]; then
 git remote add -f tcjava ${TCJAVA_GITBASE}
 fi
 git remote update tcjava
-diffcount=`git diff HEAD remotes/tcjava/10.0.x java/org/apache/tomcat/jni | wc 
-l`
+diffcount=`git diff HEAD remotes/tcjava/9.0.x java/org/apache/tomcat/jni | wc 
-l`
 
 if [ $diffcount -ne 0 ]; then
 echo "WARNING: git subtree is not up to date with"
 echo " $TCJAVA_GITBASE"
 echo " Either correct now by running"
 echo " 'git rm -rf java/org/apache/tomcat/jni'"
-echo " 'git read-tree --prefix=java/org/apache/tomcat/jni/ -u 
10.0.x/main:java/org/apache/tomcat/jni'"
+echo " 'git read-tree --prefix=java/org/apache/tomcat/jni/ -u 
main:java/org/apache/tomcat/jni'"
 echo " 'git commit'"
 echo " or run this script with -f (force)"
 if [ "X$JKJNIFORCE" = "X1" ]


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



[GitHub] [tomcat] markt-asf closed pull request #521: Bugfix for 66104 - Check for the existence of the log directory before executing the cleanup task at startup

2022-06-06 Thread GitBox


markt-asf closed pull request #521: Bugfix for 66104 - Check for the existence 
of the log directory before executing the cleanup task at startup
URL: https://github.com/apache/tomcat/pull/521


-- 
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] markt-asf commented on pull request #521: Bugfix for 66104 - Check for the existence of the log directory before executing the cleanup task at startup

2022-06-06 Thread GitBox


markt-asf commented on PR #521:
URL: https://github.com/apache/tomcat/pull/521#issuecomment-1147364598

   Thanks for the bug report and the PR.
   
   I applied this manually so I could:
   - refactor this code and the other location that obtains a Path from the 
directory
   - used a Java 7+ compatible approach that could be back-ported and then 
changed this to the Java 11+ approach
   - add a changelog entry


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



[Bug 66104] Check for the existence of the log directory before executing the cleanup task at startup

2022-06-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66104

Mark Thomas  changed:

   What|Removed |Added

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

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

Fixed in:
- 10.1.x for 10.1.0-M17 onwards
- 10.0.x for 10.0.23 onwards
- 9.0.x for 9.0.65 onwards
- 8.5.x for 8.5.80 onwards

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



[tomcat] branch 9.0.x updated: Add bug reference

2022-06-06 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 b5c963f6ec Add bug reference
b5c963f6ec is described below

commit b5c963f6ecda59fecc7dcbf3a7d1a9ac3f76e461
Author: Mark Thomas 
AuthorDate: Mon Jun 6 12:47:58 2022 +0100

Add bug reference
---
 webapps/docs/changelog.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index deed19fd17..6c1d8aa47d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -108,9 +108,9 @@
   
 
   
-Avoid error message by not trying to clean up old files from the 
logging
-directory before the directory has been created. Based on 521
-by HanLi. (markt)
+66104: Avoid error message by not trying to clean up old
+files from the logging directory before the directory has been created.
+Based on 521 by HanLi. (markt)
   
 
   


-
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: Add bug reference

2022-06-06 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 4e4b25ffec Add bug reference
4e4b25ffec is described below

commit 4e4b25ffec5fbe1ffb07c4b354b05e13847a60e2
Author: Mark Thomas 
AuthorDate: Mon Jun 6 12:47:58 2022 +0100

Add bug reference
---
 webapps/docs/changelog.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 732f148b39..d8ea7a489f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -108,9 +108,9 @@
   
 
   
-Avoid error message by not trying to clean up old files from the 
logging
-directory before the directory has been created. Based on 521
-by HanLi. (markt)
+66104: Avoid error message by not trying to clean up old
+files from the logging directory before the directory has been created.
+Based on 521 by HanLi. (markt)
   
 
   


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



[tomcat] branch main updated: Add bug reference

2022-06-06 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 6cace47998 Add bug reference
6cace47998 is described below

commit 6cace47998fd40f67a5d274a1e02dfffbdee0167
Author: Mark Thomas 
AuthorDate: Mon Jun 6 12:47:58 2022 +0100

Add bug reference
---
 webapps/docs/changelog.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4a88e9974a..f53640dd00 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -108,9 +108,9 @@
   
 
   
-Avoid error message by not trying to clean up old files from the 
logging
-directory before the directory has been created. Based on 521
-by HanLi. (markt)
+66104: Avoid error message by not trying to clean up old
+files from the logging directory before the directory has been created.
+Based on 521 by HanLi. (markt)
   
 
   


-
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: Don't try and clean directory that doesn't exists + refactoring

2022-06-06 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 44044106be Don't try and clean directory that doesn't exists + 
refactoring
44044106be is described below

commit 44044106be18101d3c5e9a824681db847f66839b
Author: Mark Thomas 
AuthorDate: Mon Jun 6 12:37:48 2022 +0100

Don't try and clean directory that doesn't exists + refactoring

Avoid error message by not trying to clean up old files from the logging
directory before the directory has been created.
Based on #521 by HanLi.

Refactor obtaining Path for a given directory
---
 java/org/apache/juli/FileHandler.java | 9 +++--
 webapps/docs/changelog.xml| 5 +
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/juli/FileHandler.java 
b/java/org/apache/juli/FileHandler.java
index 38e50c111e..7e3cfc8ddc 100644
--- a/java/org/apache/juli/FileHandler.java
+++ b/java/org/apache/juli/FileHandler.java
@@ -25,6 +25,7 @@ import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.io.UnsupportedEncodingException;
 import java.nio.file.DirectoryStream;
+import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.security.AccessController;
@@ -527,7 +528,7 @@ public class FileHandler extends Handler {
 }
 
 private void clean() {
-if (maxDays <= 0) {
+if (maxDays <= 0 || Files.notExists(getDirectoryAsPath())) {
 return;
 }
 DELETE_FILES_SERVICE.submit(new Runnable() {
@@ -549,7 +550,7 @@ public class FileHandler extends Handler {
 private DirectoryStream streamFilesForDelete() throws IOException {
 final Date maxDaysOffset = getMaxDaysOffset();
 final SimpleDateFormat formatter = new SimpleDateFormat("-MM-dd");
-return Files.newDirectoryStream(new File(directory).toPath(),
+return Files.newDirectoryStream(getDirectoryAsPath(),
 new DirectoryStream.Filter() {
 
 @Override
@@ -569,6 +570,10 @@ public class FileHandler extends Handler {
 });
 }
 
+private Path getDirectoryAsPath() {
+return FileSystems.getDefault().getPath(directory);
+}
+
 private String obtainDateFromPath(Path path) {
 Path fileName = path.getFileName();
 if (fileName == null) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c7b1dd71fd..17d1d88eb0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -129,6 +129,11 @@
 Include the major version in the recommended version used for Tomcat
 Native with the AprLifecycleListener. (markt)
   
+  
+66104: Avoid error message by not trying to clean up old
+files from the logging directory before the directory has been created.
+Based on 521 by HanLi. (markt)
+  
 
   
   


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



[tomcat] branch 9.0.x updated: Don't try and clean directory that doesn't exists + refactoring

2022-06-06 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 9520015c12 Don't try and clean directory that doesn't exists + 
refactoring
9520015c12 is described below

commit 9520015c12d518d97ac83e27e8f9c77316ac5c81
Author: Mark Thomas 
AuthorDate: Mon Jun 6 12:37:48 2022 +0100

Don't try and clean directory that doesn't exists + refactoring

Avoid error message by not trying to clean up old files from the logging
directory before the directory has been created.
Based on #521 by HanLi.

Refactor obtaining Path for a given directory
---
 java/org/apache/juli/FileHandler.java | 9 +++--
 webapps/docs/changelog.xml| 9 +
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/juli/FileHandler.java 
b/java/org/apache/juli/FileHandler.java
index 0634a29fd5..974756aba1 100644
--- a/java/org/apache/juli/FileHandler.java
+++ b/java/org/apache/juli/FileHandler.java
@@ -25,6 +25,7 @@ import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.io.UnsupportedEncodingException;
 import java.nio.file.DirectoryStream;
+import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.security.AccessController;
@@ -537,7 +538,7 @@ public class FileHandler extends Handler {
 }
 
 private void clean() {
-if (maxDays.intValue() <= 0) {
+if (maxDays.intValue() <= 0 || Files.notExists(getDirectoryAsPath())) {
 return;
 }
 DELETE_FILES_SERVICE.submit(() -> {
@@ -554,7 +555,7 @@ public class FileHandler extends Handler {
 
 private DirectoryStream streamFilesForDelete() throws IOException {
 LocalDate maxDaysOffset = LocalDate.now().minus(maxDays.intValue(), 
ChronoUnit.DAYS);
-return Files.newDirectoryStream(new File(directory).toPath(), path -> {
+return Files.newDirectoryStream(getDirectoryAsPath(), path -> {
 boolean result = false;
 String date = obtainDateFromPath(path);
 if (date != null) {
@@ -569,6 +570,10 @@ public class FileHandler extends Handler {
 });
 }
 
+private Path getDirectoryAsPath() {
+return FileSystems.getDefault().getPath(directory);
+}
+
 private String obtainDateFromPath(Path path) {
 Path fileName = path.getFileName();
 if (fileName == null) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 132af3f39b..deed19fd17 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,15 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Avoid error message by not trying to clean up old files from the 
logging
+directory before the directory has been created. Based on 521
+by HanLi. (markt)
+  
+
+  
   
 
   


-
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: Don't try and clean directory that doesn't exists + refactoring

2022-06-06 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 58eb860703 Don't try and clean directory that doesn't exists + 
refactoring
58eb860703 is described below

commit 58eb860703066051e91f691da33cb993a6fe198a
Author: Mark Thomas 
AuthorDate: Mon Jun 6 12:37:48 2022 +0100

Don't try and clean directory that doesn't exists + refactoring

Avoid error message by not trying to clean up old files from the logging
directory before the directory has been created.
Based on #521 by HanLi.

Refactor obtaining Path for a given directory
---
 java/org/apache/juli/FileHandler.java | 9 +++--
 webapps/docs/changelog.xml| 9 +
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/juli/FileHandler.java 
b/java/org/apache/juli/FileHandler.java
index 189529750a..92118f75c0 100644
--- a/java/org/apache/juli/FileHandler.java
+++ b/java/org/apache/juli/FileHandler.java
@@ -25,6 +25,7 @@ import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.io.UnsupportedEncodingException;
 import java.nio.file.DirectoryStream;
+import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.security.AccessController;
@@ -538,7 +539,7 @@ public class FileHandler extends Handler {
 }
 
 private void clean() {
-if (maxDays.intValue() <= 0) {
+if (maxDays.intValue() <= 0 || Files.notExists(getDirectoryAsPath())) {
 return;
 }
 DELETE_FILES_SERVICE.submit(() -> {
@@ -555,7 +556,7 @@ public class FileHandler extends Handler {
 
 private DirectoryStream streamFilesForDelete() throws IOException {
 LocalDate maxDaysOffset = LocalDate.now().minus(maxDays.intValue(), 
ChronoUnit.DAYS);
-return Files.newDirectoryStream(new File(directory).toPath(), path -> {
+return Files.newDirectoryStream(getDirectoryAsPath(), path -> {
 boolean result = false;
 String date = obtainDateFromPath(path);
 if (date != null) {
@@ -570,6 +571,10 @@ public class FileHandler extends Handler {
 });
 }
 
+private Path getDirectoryAsPath() {
+return FileSystems.getDefault().getPath(directory);
+}
+
 private String obtainDateFromPath(Path path) {
 Path fileName = path.getFileName();
 if (fileName == null) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 225d534f14..732f148b39 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,15 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Avoid error message by not trying to clean up old files from the 
logging
+directory before the directory has been created. Based on 521
+by HanLi. (markt)
+  
+
+  
   
 
   


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



[tomcat] 01/02: Don't try and clean directory that doesn't exists + refactoring

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

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

commit 8ffc799b2d533437f3d2e7731b010ebad5e14206
Author: Mark Thomas 
AuthorDate: Mon Jun 6 12:37:48 2022 +0100

Don't try and clean directory that doesn't exists + refactoring

Avoid error message by not trying to clean up old files from the logging
directory before the directory has been created.
Based on #521 by HanLi.

Refactor obtaining Path for a given directory
---
 java/org/apache/juli/FileHandler.java | 9 +++--
 webapps/docs/changelog.xml| 9 +
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/juli/FileHandler.java 
b/java/org/apache/juli/FileHandler.java
index 189529750a..92118f75c0 100644
--- a/java/org/apache/juli/FileHandler.java
+++ b/java/org/apache/juli/FileHandler.java
@@ -25,6 +25,7 @@ import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.io.UnsupportedEncodingException;
 import java.nio.file.DirectoryStream;
+import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.security.AccessController;
@@ -538,7 +539,7 @@ public class FileHandler extends Handler {
 }
 
 private void clean() {
-if (maxDays.intValue() <= 0) {
+if (maxDays.intValue() <= 0 || Files.notExists(getDirectoryAsPath())) {
 return;
 }
 DELETE_FILES_SERVICE.submit(() -> {
@@ -555,7 +556,7 @@ public class FileHandler extends Handler {
 
 private DirectoryStream streamFilesForDelete() throws IOException {
 LocalDate maxDaysOffset = LocalDate.now().minus(maxDays.intValue(), 
ChronoUnit.DAYS);
-return Files.newDirectoryStream(new File(directory).toPath(), path -> {
+return Files.newDirectoryStream(getDirectoryAsPath(), path -> {
 boolean result = false;
 String date = obtainDateFromPath(path);
 if (date != null) {
@@ -570,6 +571,10 @@ public class FileHandler extends Handler {
 });
 }
 
+private Path getDirectoryAsPath() {
+return FileSystems.getDefault().getPath(directory);
+}
+
 private String obtainDateFromPath(Path path) {
 Path fileName = path.getFileName();
 if (fileName == null) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9ad990a912..4a88e9974a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,15 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Avoid error message by not trying to clean up old files from the 
logging
+directory before the directory has been created. Based on 521
+by HanLi. (markt)
+  
+
+  
   
 
   


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



[tomcat] 02/02: Use new Java 11 method

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

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

commit 40fefc7a64045bdf36534f0c216da17f7b886a64
Author: Mark Thomas 
AuthorDate: Mon Jun 6 12:38:45 2022 +0100

Use new Java 11 method
---
 java/org/apache/juli/FileHandler.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/org/apache/juli/FileHandler.java 
b/java/org/apache/juli/FileHandler.java
index 92118f75c0..7ce7f8ffb6 100644
--- a/java/org/apache/juli/FileHandler.java
+++ b/java/org/apache/juli/FileHandler.java
@@ -25,7 +25,6 @@ import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.io.UnsupportedEncodingException;
 import java.nio.file.DirectoryStream;
-import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.security.AccessController;
@@ -572,7 +571,7 @@ public class FileHandler extends Handler {
 }
 
 private Path getDirectoryAsPath() {
-return FileSystems.getDefault().getPath(directory);
+return Path.of(directory);
 }
 
 private String obtainDateFromPath(Path path) {


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



[tomcat] branch main updated (4c039adb67 -> 40fefc7a64)

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

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


from 4c039adb67 Replace the fixed message with endpoint.err.handshake
 new 8ffc799b2d Don't try and clean directory that doesn't exists + 
refactoring
 new 40fefc7a64 Use new Java 11 method

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/juli/FileHandler.java | 8 ++--
 webapps/docs/changelog.xml| 9 +
 2 files changed, 15 insertions(+), 2 deletions(-)


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



[GitHub] [tomcat] markt-asf closed pull request #519: Polish. NioEndpoint

2022-06-06 Thread GitBox


markt-asf closed pull request #519: Polish. NioEndpoint
URL: https://github.com/apache/tomcat/pull/519


-- 
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] markt-asf commented on pull request #519: Polish. NioEndpoint

2022-06-06 Thread GitBox


markt-asf commented on PR #519:
URL: https://github.com/apache/tomcat/pull/519#issuecomment-1147228273

   Applied manually go I could merge the polish commits and make a couple of 
minor changes.


-- 
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] 02/02: Replace the fixed message with endpoint.err.handshake

2022-06-06 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 da78c135e02b25d88962a5a364694aada545cd33
Author: lihan 
AuthorDate: Fri Jun 3 22:57:19 2022 +0800

Replace the fixed message with endpoint.err.handshake
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index c01e51d68a..70a1778338 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -1677,7 +1677,7 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 } catch (IOException x) {
 handshake = -1;
 if (log.isDebugEnabled()) {
-log.debug("Error during SSL handshake",x);
+log.debug(sm.getString("endpoint.err.handshake"),x);
 }
 } catch (CancelledKeyException ckx) {
 handshake = -1;


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



[tomcat] 01/02: Polish. NioEndpoint

2022-06-06 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 3e7ef99bcfe65307914ecb0a7ab889987d246863
Author: lihan 
AuthorDate: Thu Jun 2 16:57:39 2022 +0800

Polish. NioEndpoint
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 48 
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index a6eaac0b3a..c01e51d68a 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -563,6 +563,19 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 }
 }
 
+private PollerEvent createPollerEvent(NioSocketWrapper socketWrapper, 
int interestOps) {
+PollerEvent r = null;
+if (eventCache != null) {
+r = eventCache.pop();
+}
+if (r == null) {
+r = new PollerEvent(socketWrapper, interestOps);
+} else {
+r.reset(socketWrapper, interestOps);
+}
+return r;
+}
+
 /**
  * Add specified socket and associated pool to the poller. The socket 
will
  * be added to a temporary array, and polled first after a maximum 
amount
@@ -574,16 +587,8 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
  *the Poller
  */
 public void add(NioSocketWrapper socketWrapper, int interestOps) {
-PollerEvent r = null;
-if (eventCache != null) {
-r = eventCache.pop();
-}
-if (r == null) {
-r = new PollerEvent(socketWrapper, interestOps);
-} else {
-r.reset(socketWrapper, interestOps);
-}
-addEvent(r);
+PollerEvent pollerEvent = createPollerEvent(socketWrapper, 
interestOps);
+addEvent(pollerEvent);
 if (close) {
 processSocket(socketWrapper, SocketEvent.STOP, false);
 }
@@ -654,16 +659,8 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
  */
 public void register(final NioSocketWrapper socketWrapper) {
 socketWrapper.interestOps(SelectionKey.OP_READ);//this is what 
OP_REGISTER turns into.
-PollerEvent event = null;
-if (eventCache != null) {
-event = eventCache.pop();
-}
-if (event == null) {
-event = new PollerEvent(socketWrapper, OP_REGISTER);
-} else {
-event.reset(socketWrapper, OP_REGISTER);
-}
-addEvent(event);
+PollerEvent pollerEvent = createPollerEvent(socketWrapper, 
OP_REGISTER);
+addEvent(pollerEvent);
 }
 
 public void cancelledKey(SelectionKey sk, 
SocketWrapperBase socketWrapper) {
@@ -963,12 +960,12 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 // Avoid duplicate stop calls
 socketWrapper.interestOps(0);
 cancelledKey(key, socketWrapper);
-} else if ((socketWrapper.interestOps() & 
SelectionKey.OP_READ) == SelectionKey.OP_READ ||
-  (socketWrapper.interestOps() & 
SelectionKey.OP_WRITE) == SelectionKey.OP_WRITE) {
+} else if 
(socketWrapper.interestOpsHas(SelectionKey.OP_READ) ||
+  
socketWrapper.interestOpsHas(SelectionKey.OP_WRITE)) {
 boolean readTimeout = false;
 boolean writeTimeout = false;
 // Check for read timeout
-if ((socketWrapper.interestOps() & 
SelectionKey.OP_READ) == SelectionKey.OP_READ) {
+if 
(socketWrapper.interestOpsHas(SelectionKey.OP_READ)) {
 long delta = now - socketWrapper.getLastRead();
 long timeout = socketWrapper.getReadTimeout();
 if (timeout > 0 && delta > timeout) {
@@ -976,7 +973,7 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 }
 }
 // Check for write timeout
-if (!readTimeout && (socketWrapper.interestOps() & 
SelectionKey.OP_WRITE) == SelectionKey.OP_WRITE) {
+if (!readTimeout && 
socketWrapper.interestOpsHas(SelectionKey.OP_WRITE)) {
 long delta = now - 
socketWrapper.getLastWrite();
 long timeout = socketWrapper.getWriteTimeout();
 if (timeout > 0 && 

[tomcat] branch 8.5.x updated (9de72137c0 -> da78c135e0)

2022-06-06 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 9de72137c0 Fix typo
 new 3e7ef99bcf Polish. NioEndpoint
 new da78c135e0 Replace the fixed message with endpoint.err.handshake

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/tomcat/util/net/NioEndpoint.java | 50 
 1 file changed, 25 insertions(+), 25 deletions(-)


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



[tomcat] 02/02: Replace the fixed message with endpoint.err.handshake

2022-06-06 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 185fed5c2cba91b6b64da83f7667acc322b383de
Author: lihan 
AuthorDate: Fri Jun 3 22:57:19 2022 +0800

Replace the fixed message with endpoint.err.handshake
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index a3b970c7c0..a43d8ebda8 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -1773,7 +1773,7 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 } catch (IOException x) {
 handshake = -1;
 if (log.isDebugEnabled()) {
-log.debug("Error during SSL handshake",x);
+log.debug(sm.getString("endpoint.err.handshake"),x);
 }
 } catch (CancelledKeyException ckx) {
 handshake = -1;


-
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 (c3248fec6d -> 185fed5c2c)

2022-06-06 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 c3248fec6d Fix typo
 new 3b5ba159ec Polish. NioEndpoint
 new 185fed5c2c Replace the fixed message with endpoint.err.handshake

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/tomcat/util/net/NioEndpoint.java | 50 
 1 file changed, 25 insertions(+), 25 deletions(-)


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



[tomcat] 01/02: Polish. NioEndpoint

2022-06-06 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 3b5ba159ece757bacecd9113fa11e358936cf199
Author: lihan 
AuthorDate: Thu Jun 2 16:57:39 2022 +0800

Polish. NioEndpoint
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 48 
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index ea65dd6600..a3b970c7c0 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -654,6 +654,19 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 }
 }
 
+private PollerEvent createPollerEvent(NioSocketWrapper socketWrapper, 
int interestOps) {
+PollerEvent r = null;
+if (eventCache != null) {
+r = eventCache.pop();
+}
+if (r == null) {
+r = new PollerEvent(socketWrapper, interestOps);
+} else {
+r.reset(socketWrapper, interestOps);
+}
+return r;
+}
+
 /**
  * Add specified socket and associated pool to the poller. The socket 
will
  * be added to a temporary array, and polled first after a maximum 
amount
@@ -665,16 +678,8 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
  *the Poller
  */
 public void add(NioSocketWrapper socketWrapper, int interestOps) {
-PollerEvent r = null;
-if (eventCache != null) {
-r = eventCache.pop();
-}
-if (r == null) {
-r = new PollerEvent(socketWrapper, interestOps);
-} else {
-r.reset(socketWrapper, interestOps);
-}
-addEvent(r);
+PollerEvent pollerEvent = createPollerEvent(socketWrapper, 
interestOps);
+addEvent(pollerEvent);
 if (close) {
 processSocket(socketWrapper, SocketEvent.STOP, false);
 }
@@ -745,16 +750,8 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
  */
 public void register(final NioSocketWrapper socketWrapper) {
 socketWrapper.interestOps(SelectionKey.OP_READ);//this is what 
OP_REGISTER turns into.
-PollerEvent event = null;
-if (eventCache != null) {
-event = eventCache.pop();
-}
-if (event == null) {
-event = new PollerEvent(socketWrapper, OP_REGISTER);
-} else {
-event.reset(socketWrapper, OP_REGISTER);
-}
-addEvent(event);
+PollerEvent pollerEvent = createPollerEvent(socketWrapper, 
OP_REGISTER);
+addEvent(pollerEvent);
 }
 
 public void cancelledKey(SelectionKey sk, 
SocketWrapperBase socketWrapper) {
@@ -1054,12 +1051,12 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 // Avoid duplicate stop calls
 socketWrapper.interestOps(0);
 cancelledKey(key, socketWrapper);
-} else if ((socketWrapper.interestOps() & 
SelectionKey.OP_READ) == SelectionKey.OP_READ ||
-  (socketWrapper.interestOps() & 
SelectionKey.OP_WRITE) == SelectionKey.OP_WRITE) {
+} else if 
(socketWrapper.interestOpsHas(SelectionKey.OP_READ) ||
+  
socketWrapper.interestOpsHas(SelectionKey.OP_WRITE)) {
 boolean readTimeout = false;
 boolean writeTimeout = false;
 // Check for read timeout
-if ((socketWrapper.interestOps() & 
SelectionKey.OP_READ) == SelectionKey.OP_READ) {
+if 
(socketWrapper.interestOpsHas(SelectionKey.OP_READ)) {
 long delta = now - socketWrapper.getLastRead();
 long timeout = socketWrapper.getReadTimeout();
 if (timeout > 0 && delta > timeout) {
@@ -1067,7 +1064,7 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 }
 }
 // Check for write timeout
-if (!readTimeout && (socketWrapper.interestOps() & 
SelectionKey.OP_WRITE) == SelectionKey.OP_WRITE) {
+if (!readTimeout && 
socketWrapper.interestOpsHas(SelectionKey.OP_WRITE)) {
 long delta = now - 
socketWrapper.getLastWrite();
 long timeout = socketWrapper.getWriteTimeout();
 if (timeout > 0 && 

[tomcat] 02/02: Replace the fixed message with endpoint.err.handshake

2022-06-06 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 e7123476285ef6865c0074db0b9c4b695519d58a
Author: lihan 
AuthorDate: Fri Jun 3 22:57:19 2022 +0800

Replace the fixed message with endpoint.err.handshake
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index ce3445ed27..eb82a37c22 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -1746,7 +1746,7 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 } catch (IOException x) {
 handshake = -1;
 if (log.isDebugEnabled()) {
-log.debug("Error during SSL handshake",x);
+log.debug(sm.getString("endpoint.err.handshake"),x);
 }
 } catch (CancelledKeyException ckx) {
 handshake = -1;


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



[tomcat] 01/02: Polish. NioEndpoint

2022-06-06 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 9642d0ac0f208b883ad96e725103c96f983e652b
Author: lihan 
AuthorDate: Thu Jun 2 16:57:39 2022 +0800

Polish. NioEndpoint
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 48 
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index 05804c4f17..ce3445ed27 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -627,6 +627,19 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 }
 }
 
+private PollerEvent createPollerEvent(NioSocketWrapper socketWrapper, 
int interestOps) {
+PollerEvent r = null;
+if (eventCache != null) {
+r = eventCache.pop();
+}
+if (r == null) {
+r = new PollerEvent(socketWrapper, interestOps);
+} else {
+r.reset(socketWrapper, interestOps);
+}
+return r;
+}
+
 /**
  * Add specified socket and associated pool to the poller. The socket 
will
  * be added to a temporary array, and polled first after a maximum 
amount
@@ -638,16 +651,8 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
  *the Poller
  */
 public void add(NioSocketWrapper socketWrapper, int interestOps) {
-PollerEvent r = null;
-if (eventCache != null) {
-r = eventCache.pop();
-}
-if (r == null) {
-r = new PollerEvent(socketWrapper, interestOps);
-} else {
-r.reset(socketWrapper, interestOps);
-}
-addEvent(r);
+PollerEvent pollerEvent = createPollerEvent(socketWrapper, 
interestOps);
+addEvent(pollerEvent);
 if (close) {
 processSocket(socketWrapper, SocketEvent.STOP, false);
 }
@@ -718,16 +723,8 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
  */
 public void register(final NioSocketWrapper socketWrapper) {
 socketWrapper.interestOps(SelectionKey.OP_READ);//this is what 
OP_REGISTER turns into.
-PollerEvent event = null;
-if (eventCache != null) {
-event = eventCache.pop();
-}
-if (event == null) {
-event = new PollerEvent(socketWrapper, OP_REGISTER);
-} else {
-event.reset(socketWrapper, OP_REGISTER);
-}
-addEvent(event);
+PollerEvent pollerEvent = createPollerEvent(socketWrapper, 
OP_REGISTER);
+addEvent(pollerEvent);
 }
 
 public void cancelledKey(SelectionKey sk, 
SocketWrapperBase socketWrapper) {
@@ -1027,12 +1024,12 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 // Avoid duplicate stop calls
 socketWrapper.interestOps(0);
 cancelledKey(key, socketWrapper);
-} else if ((socketWrapper.interestOps() & 
SelectionKey.OP_READ) == SelectionKey.OP_READ ||
-  (socketWrapper.interestOps() & 
SelectionKey.OP_WRITE) == SelectionKey.OP_WRITE) {
+} else if 
(socketWrapper.interestOpsHas(SelectionKey.OP_READ) ||
+  
socketWrapper.interestOpsHas(SelectionKey.OP_WRITE)) {
 boolean readTimeout = false;
 boolean writeTimeout = false;
 // Check for read timeout
-if ((socketWrapper.interestOps() & 
SelectionKey.OP_READ) == SelectionKey.OP_READ) {
+if 
(socketWrapper.interestOpsHas(SelectionKey.OP_READ)) {
 long delta = now - socketWrapper.getLastRead();
 long timeout = socketWrapper.getReadTimeout();
 if (timeout > 0 && delta > timeout) {
@@ -1040,7 +1037,7 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 }
 }
 // Check for write timeout
-if (!readTimeout && (socketWrapper.interestOps() & 
SelectionKey.OP_WRITE) == SelectionKey.OP_WRITE) {
+if (!readTimeout && 
socketWrapper.interestOpsHas(SelectionKey.OP_WRITE)) {
 long delta = now - 
socketWrapper.getLastWrite();
 long timeout = socketWrapper.getWriteTimeout();
 if (timeout > 0 && 

[tomcat] branch 10.0.x updated (adf6fad4ab -> e712347628)

2022-06-06 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 adf6fad4ab Fix typo
 new 9642d0ac0f Polish. NioEndpoint
 new e712347628 Replace the fixed message with endpoint.err.handshake

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/tomcat/util/net/NioEndpoint.java | 50 
 1 file changed, 25 insertions(+), 25 deletions(-)


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



[tomcat] 02/02: Replace the fixed message with endpoint.err.handshake

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

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

commit 4c039adb67edf192e26a3a49ed12f36f83fb2a14
Author: lihan 
AuthorDate: Fri Jun 3 22:57:19 2022 +0800

Replace the fixed message with endpoint.err.handshake
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index b8785b6de3..3a47646e7a 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -1723,7 +1723,7 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 } catch (IOException x) {
 handshake = -1;
 if (log.isDebugEnabled()) {
-log.debug("Error during SSL handshake",x);
+log.debug(sm.getString("endpoint.err.handshake"),x);
 }
 } catch (CancelledKeyException ckx) {
 handshake = -1;


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



[tomcat] 01/02: Polish. NioEndpoint

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

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

commit 38dda6554fea4376534f00b99f1b466d59a3e757
Author: lihan 
AuthorDate: Thu Jun 2 16:57:39 2022 +0800

Polish. NioEndpoint
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 48 
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index d074153bbc..b8785b6de3 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -627,6 +627,19 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 }
 }
 
+private PollerEvent createPollerEvent(NioSocketWrapper socketWrapper, 
int interestOps) {
+PollerEvent r = null;
+if (eventCache != null) {
+r = eventCache.pop();
+}
+if (r == null) {
+r = new PollerEvent(socketWrapper, interestOps);
+} else {
+r.reset(socketWrapper, interestOps);
+}
+return r;
+}
+
 /**
  * Add specified socket and associated pool to the poller. The socket 
will
  * be added to a temporary array, and polled first after a maximum 
amount
@@ -638,16 +651,8 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
  *the Poller
  */
 public void add(NioSocketWrapper socketWrapper, int interestOps) {
-PollerEvent r = null;
-if (eventCache != null) {
-r = eventCache.pop();
-}
-if (r == null) {
-r = new PollerEvent(socketWrapper, interestOps);
-} else {
-r.reset(socketWrapper, interestOps);
-}
-addEvent(r);
+PollerEvent pollerEvent = createPollerEvent(socketWrapper, 
interestOps);
+addEvent(pollerEvent);
 if (close) {
 processSocket(socketWrapper, SocketEvent.STOP, false);
 }
@@ -718,16 +723,8 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
  */
 public void register(final NioSocketWrapper socketWrapper) {
 socketWrapper.interestOps(SelectionKey.OP_READ);//this is what 
OP_REGISTER turns into.
-PollerEvent event = null;
-if (eventCache != null) {
-event = eventCache.pop();
-}
-if (event == null) {
-event = new PollerEvent(socketWrapper, OP_REGISTER);
-} else {
-event.reset(socketWrapper, OP_REGISTER);
-}
-addEvent(event);
+PollerEvent pollerEvent = createPollerEvent(socketWrapper, 
OP_REGISTER);
+addEvent(pollerEvent);
 }
 
 /**
@@ -1002,12 +999,12 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 // Avoid duplicate stop calls
 socketWrapper.interestOps(0);
 socketWrapper.close();
-} else if ((socketWrapper.interestOps() & 
SelectionKey.OP_READ) == SelectionKey.OP_READ ||
-  (socketWrapper.interestOps() & 
SelectionKey.OP_WRITE) == SelectionKey.OP_WRITE) {
+} else if 
(socketWrapper.interestOpsHas(SelectionKey.OP_READ) ||
+  
socketWrapper.interestOpsHas(SelectionKey.OP_WRITE)) {
 boolean readTimeout = false;
 boolean writeTimeout = false;
 // Check for read timeout
-if ((socketWrapper.interestOps() & 
SelectionKey.OP_READ) == SelectionKey.OP_READ) {
+if 
(socketWrapper.interestOpsHas(SelectionKey.OP_READ)) {
 long delta = now - socketWrapper.getLastRead();
 long timeout = socketWrapper.getReadTimeout();
 if (timeout > 0 && delta > timeout) {
@@ -1015,7 +1012,7 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 }
 }
 // Check for write timeout
-if (!readTimeout && (socketWrapper.interestOps() & 
SelectionKey.OP_WRITE) == SelectionKey.OP_WRITE) {
+if (!readTimeout && 
socketWrapper.interestOpsHas(SelectionKey.OP_WRITE)) {
 long delta = now - 
socketWrapper.getLastWrite();
 long timeout = socketWrapper.getWriteTimeout();
 if (timeout > 0 && delta > timeout) {
@@ -1102,6 +1099,9 @@ public class NioEndpoint extends 

[tomcat] branch main updated (d378d5e24c -> 4c039adb67)

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

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


from d378d5e24c Fix typo
 new 38dda6554f Polish. NioEndpoint
 new 4c039adb67 Replace the fixed message with endpoint.err.handshake

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/tomcat/util/net/NioEndpoint.java | 50 
 1 file changed, 25 insertions(+), 25 deletions(-)


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



Re: [VOTE] Release Apache Tomcat 9.0.64

2022-06-06 Thread Mark Thomas

On 02/06/2022 20:46, Rémy Maucherat wrote:


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


Unit tests pass on Linux, Windows and MacOS.

Mark

-
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-06-06 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 9de72137c0 Fix typo
9de72137c0 is described below

commit 9de72137c0daa9132bcfcc08ea631fb16cf44129
Author: Youyu Song 
AuthorDate: Thu Jun 2 15:50:10 2022 +0800

Fix typo
---
 java/org/apache/catalina/tribes/transport/nio/NioReceiver.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java 
b/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
index 6d5ec93b98..7b1ac2e44a 100644
--- a/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
+++ b/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
@@ -367,7 +367,7 @@ public class NioReceiver extends ReceiverBase implements 
Runnable, NioReceiverMB
 Selector selector = this.selector.get();
 if (selector != null) {
 try {
-// Unlock the thread if is is blocked waiting for input
+// Unlock the thread if it is blocked waiting for input
 selector.wakeup();
 // Wait for the receiver thread to finish
 int count = 0;


-
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-06-06 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 c3248fec6d Fix typo
c3248fec6d is described below

commit c3248fec6de7069e6c4ecf28fb3aed73ba19c071
Author: Youyu Song 
AuthorDate: Thu Jun 2 15:50:10 2022 +0800

Fix typo
---
 java/org/apache/catalina/tribes/transport/nio/NioReceiver.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java 
b/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
index e026d71129..9ccda36f8d 100644
--- a/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
+++ b/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
@@ -366,7 +366,7 @@ public class NioReceiver extends ReceiverBase implements 
Runnable, NioReceiverMB
 Selector selector = this.selector.get();
 if (selector != null) {
 try {
-// Unlock the thread if is is blocked waiting for input
+// Unlock the thread if it is blocked waiting for input
 selector.wakeup();
 // Wait for the receiver thread to finish
 int count = 0;


-
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-06-06 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 adf6fad4ab Fix typo
adf6fad4ab is described below

commit adf6fad4ab29b55a3cc272ae45fd7d2ee504df06
Author: Youyu Song 
AuthorDate: Thu Jun 2 15:50:10 2022 +0800

Fix typo
---
 java/org/apache/catalina/tribes/transport/nio/NioReceiver.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java 
b/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
index e026d71129..9ccda36f8d 100644
--- a/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
+++ b/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
@@ -366,7 +366,7 @@ public class NioReceiver extends ReceiverBase implements 
Runnable, NioReceiverMB
 Selector selector = this.selector.get();
 if (selector != null) {
 try {
-// Unlock the thread if is is blocked waiting for input
+// Unlock the thread if it is blocked waiting for input
 selector.wakeup();
 // Wait for the receiver thread to finish
 int count = 0;


-
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-06-06 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 d378d5e24c Fix typo
d378d5e24c is described below

commit d378d5e24cf13c9652b33d40e65faabbcbf39916
Author: Youyu Song 
AuthorDate: Thu Jun 2 15:50:10 2022 +0800

Fix typo
---
 java/org/apache/catalina/tribes/transport/nio/NioReceiver.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java 
b/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
index e026d71129..9ccda36f8d 100644
--- a/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
+++ b/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
@@ -366,7 +366,7 @@ public class NioReceiver extends ReceiverBase implements 
Runnable, NioReceiverMB
 Selector selector = this.selector.get();
 if (selector != null) {
 try {
-// Unlock the thread if is is blocked waiting for input
+// Unlock the thread if it is blocked waiting for input
 selector.wakeup();
 // Wait for the receiver thread to finish
 int count = 0;


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



[GitHub] [tomcat] markt-asf merged pull request #518: Fix typo

2022-06-06 Thread GitBox


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


-- 
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] markt-asf closed pull request #520: Testing java 19 virtual thread

2022-06-06 Thread GitBox


markt-asf closed pull request #520: Testing java 19 virtual thread
URL: https://github.com/apache/tomcat/pull/520


-- 
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] markt-asf commented on pull request #520: Testing java 19 virtual thread

2022-06-06 Thread GitBox


markt-asf commented on PR #520:
URL: https://github.com/apache/tomcat/pull/520#issuecomment-1147123905

   Tomcat 10.1.x must compile with Java 11.


-- 
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] branch 8.5.x updated: Add support for Java 19 JSP compilation (if JDT supports it)

2022-06-06 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 e5e3beb149 Add support for Java 19 JSP compilation (if JDT supports it)
e5e3beb149 is described below

commit e5e3beb149ac31ab4189bdcfade4d32901ea3dd1
Author: Mark Thomas 
AuthorDate: Thu Jun 2 18:21:31 2022 +0100

Add support for Java 19 JSP compilation (if JDT supports it)
---
 java/org/apache/jasper/compiler/JDTCompiler.java | 11 +++
 webapps/docs/changelog.xml   |  7 +++
 2 files changed, 18 insertions(+)

diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java 
b/java/org/apache/jasper/compiler/JDTCompiler.java
index 1afc4dcadb..4dacf9eb8c 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -371,6 +371,11 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 // May be supported in a snapshot build.
 // This is checked against the actual version below.
 settings.put(CompilerOptions.OPTION_Source, "18");
+} else if (opt.equals("19")) {
+// Constant not available in latest ECJ version shipped with
+// Tomcat. May be supported in a snapshot build.
+// This is checked against the actual version below.
+settings.put(CompilerOptions.OPTION_Source, "19");
 } else {
 log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", 
opt));
 settings.put(CompilerOptions.OPTION_Source, 
CompilerOptions.VERSION_1_7);
@@ -462,6 +467,12 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 // This is checked against the actual version below.
 settings.put(CompilerOptions.OPTION_TargetPlatform, "18");
 settings.put(CompilerOptions.OPTION_Compliance, "18");
+} else if (opt.equals("19")) {
+// Constant not available in latest ECJ version shipped with
+// Tomcat. May be supported in a snapshot build.
+// This is checked against the actual version below.
+settings.put(CompilerOptions.OPTION_TargetPlatform, "19");
+settings.put(CompilerOptions.OPTION_Compliance, "19");
 } else {
 log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", 
opt));
 settings.put(CompilerOptions.OPTION_TargetPlatform, 
CompilerOptions.VERSION_1_7);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cad8313c6d..c7b1dd71fd 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -165,6 +165,13 @@
 Update ImportHandler optimisation for new classes
 introduced in Java 19. (markt)
   
+  
+Add support for specifying Java 19 (with the value 19) as
+the compiler source and/or compiler target for JSP compilation. If used
+with an Eclipse JDT compiler version that does not support these 
values,
+a warning will be logged and the default will used.
+(markt)
+  
 
   
   


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



[tomcat] branch 9.0.x updated: Add support for Java 19 JSP compilation (if JDT supports it)

2022-06-06 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 41a9a5b035 Add support for Java 19 JSP compilation (if JDT supports it)
41a9a5b035 is described below

commit 41a9a5b035d665d59fafb41e114717d747fae2b1
Author: Mark Thomas 
AuthorDate: Thu Jun 2 18:21:31 2022 +0100

Add support for Java 19 JSP compilation (if JDT supports it)
---
 java/org/apache/jasper/compiler/JDTCompiler.java | 11 +++
 webapps/docs/changelog.xml   | 11 +++
 2 files changed, 22 insertions(+)

diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java 
b/java/org/apache/jasper/compiler/JDTCompiler.java
index 2e361f28b0..5bbae6b5fe 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -321,6 +321,11 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 // Tomcat. May be supported in a snapshot build.
 // This is checked against the actual version below.
 settings.put(CompilerOptions.OPTION_Source, "18");
+} else if (opt.equals("19")) {
+// Constant not available in latest ECJ version shipped with
+// Tomcat. May be supported in a snapshot build.
+// This is checked against the actual version below.
+settings.put(CompilerOptions.OPTION_Source, "19");
 } else {
 log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", 
opt));
 settings.put(CompilerOptions.OPTION_Source, 
CompilerOptions.VERSION_1_8);
@@ -391,6 +396,12 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 // This is checked against the actual version below.
 settings.put(CompilerOptions.OPTION_TargetPlatform, "18");
 settings.put(CompilerOptions.OPTION_Compliance, "18");
+} else if (opt.equals("19")) {
+// Constant not available in latest ECJ version shipped with
+// Tomcat. May be supported in a snapshot build.
+// This is checked against the actual version below.
+settings.put(CompilerOptions.OPTION_TargetPlatform, "19");
+settings.put(CompilerOptions.OPTION_Compliance, "19");
 } else {
 log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", 
opt));
 settings.put(CompilerOptions.OPTION_TargetPlatform, 
CompilerOptions.VERSION_1_8);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ba51845d53..132af3f39b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,17 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Add support for specifying Java 19 (with the value 19) as
+the compiler source and/or compiler target for JSP compilation. If used
+with an Eclipse JDT compiler version that does not support these 
values,
+a warning will be logged and the default will used.
+(markt)
+  
+
+  
 
 
   


-
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: Add support for Java 19 JSP compilation (if JDT supports it)

2022-06-06 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 e4f4c595f4 Add support for Java 19 JSP compilation (if JDT supports it)
e4f4c595f4 is described below

commit e4f4c595f46f4c6dbd470b50ce7125c1c05b7f61
Author: Mark Thomas 
AuthorDate: Thu Jun 2 18:21:31 2022 +0100

Add support for Java 19 JSP compilation (if JDT supports it)
---
 java/org/apache/jasper/compiler/JDTCompiler.java | 11 +++
 webapps/docs/changelog.xml   | 11 +++
 2 files changed, 22 insertions(+)

diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java 
b/java/org/apache/jasper/compiler/JDTCompiler.java
index 2e361f28b0..5bbae6b5fe 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -321,6 +321,11 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 // Tomcat. May be supported in a snapshot build.
 // This is checked against the actual version below.
 settings.put(CompilerOptions.OPTION_Source, "18");
+} else if (opt.equals("19")) {
+// Constant not available in latest ECJ version shipped with
+// Tomcat. May be supported in a snapshot build.
+// This is checked against the actual version below.
+settings.put(CompilerOptions.OPTION_Source, "19");
 } else {
 log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", 
opt));
 settings.put(CompilerOptions.OPTION_Source, 
CompilerOptions.VERSION_1_8);
@@ -391,6 +396,12 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 // This is checked against the actual version below.
 settings.put(CompilerOptions.OPTION_TargetPlatform, "18");
 settings.put(CompilerOptions.OPTION_Compliance, "18");
+} else if (opt.equals("19")) {
+// Constant not available in latest ECJ version shipped with
+// Tomcat. May be supported in a snapshot build.
+// This is checked against the actual version below.
+settings.put(CompilerOptions.OPTION_TargetPlatform, "19");
+settings.put(CompilerOptions.OPTION_Compliance, "19");
 } else {
 log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", 
opt));
 settings.put(CompilerOptions.OPTION_TargetPlatform, 
CompilerOptions.VERSION_1_8);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 0d89737c95..225d534f14 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,17 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Add support for specifying Java 19 (with the value 19) as
+the compiler source and/or compiler target for JSP compilation. If used
+with an Eclipse JDT compiler version that does not support these 
values,
+a warning will be logged and the default will used.
+(markt)
+  
+
+  
 
 
   


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



[tomcat] branch main updated: Add support for Java 19 JSP compilation (if JDT supports it)

2022-06-06 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 3b209deed2 Add support for Java 19 JSP compilation (if JDT supports it)
3b209deed2 is described below

commit 3b209deed2bf14a437a8c8b11aed80de36dfccd3
Author: Mark Thomas 
AuthorDate: Thu Jun 2 18:21:31 2022 +0100

Add support for Java 19 JSP compilation (if JDT supports it)
---
 java/org/apache/jasper/compiler/JDTCompiler.java | 11 +++
 webapps/docs/changelog.xml   | 11 +++
 2 files changed, 22 insertions(+)

diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java 
b/java/org/apache/jasper/compiler/JDTCompiler.java
index 0a3528d04d..94876897bd 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -318,6 +318,11 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 // Tomcat. May be supported in a snapshot build.
 // This is checked against the actual version below.
 settings.put(CompilerOptions.OPTION_Source, "18");
+} else if (opt.equals("19")) {
+// Constant not available in latest ECJ version shipped with
+// Tomcat. May be supported in a snapshot build.
+// This is checked against the actual version below.
+settings.put(CompilerOptions.OPTION_Source, "19");
 } else {
 log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", 
opt));
 settings.put(CompilerOptions.OPTION_Source, 
CompilerOptions.VERSION_11);
@@ -385,6 +390,12 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
 // This is checked against the actual version below.
 settings.put(CompilerOptions.OPTION_TargetPlatform, "18");
 settings.put(CompilerOptions.OPTION_Compliance, "18");
+} else if (opt.equals("19")) {
+// Constant not available in latest ECJ version shipped with
+// Tomcat. May be supported in a snapshot build.
+// This is checked against the actual version below.
+settings.put(CompilerOptions.OPTION_TargetPlatform, "19");
+settings.put(CompilerOptions.OPTION_Compliance, "19");
 } else {
 log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", 
opt));
 settings.put(CompilerOptions.OPTION_TargetPlatform, 
CompilerOptions.VERSION_11);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4a65b68ef1..9ad990a912 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,17 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Add support for specifying Java 19 (with the value 19) as
+the compiler source and/or compiler target for JSP compilation. If used
+with an Eclipse JDT compiler version that does not support these 
values,
+a warning will be logged and the default will used.
+(markt)
+  
+
+  
 
 
   


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