[tomcat] branch 9.0.x updated: Fix typo in exception message about quote character in repository path

2020-04-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 d95ede1  Fix typo in exception message about quote character in 
repository path
d95ede1 is described below

commit d95ede108726a9af6979c25b7f3a70b43eec35cd
Author: Paul Muriel Biya-Bi 
AuthorDate: Fri Apr 3 23:54:54 2020 -0400

Fix typo in exception message about quote character in repository path
---
 java/org/apache/catalina/startup/Bootstrap.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/startup/Bootstrap.java 
b/java/org/apache/catalina/startup/Bootstrap.java
index 177a59d..08ad013 100644
--- a/java/org/apache/catalina/startup/Bootstrap.java
+++ b/java/org/apache/catalina/startup/Bootstrap.java
@@ -581,7 +581,7 @@ public final class Bootstrap {
 // Too early to use standard i18n support. The class path 
hasn't
 // been configured.
 throw new IllegalArgumentException(
-"The double quote [\"] character only be used to quote 
paths. It must " +
+"The double quote [\"] character can only be used to 
quote paths. It must " +
 "not appear in a path. This loader path is not valid: 
[" + value + "]");
 } else {
 // Not quoted - NO-OP


-
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 in exception message about quote character in repository path

2020-04-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 ae0eb6b  Fix typo in exception message about quote character in 
repository path
ae0eb6b is described below

commit ae0eb6bf7905b1c398cc92b27f2ef47dc367e0ca
Author: Paul Muriel Biya-Bi 
AuthorDate: Fri Apr 3 23:54:54 2020 -0400

Fix typo in exception message about quote character in repository path
---
 java/org/apache/catalina/startup/Bootstrap.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/startup/Bootstrap.java 
b/java/org/apache/catalina/startup/Bootstrap.java
index e554886..d3f25a5 100644
--- a/java/org/apache/catalina/startup/Bootstrap.java
+++ b/java/org/apache/catalina/startup/Bootstrap.java
@@ -581,7 +581,7 @@ public final class Bootstrap {
 // Too early to use standard i18n support. The class path 
hasn't
 // been configured.
 throw new IllegalArgumentException(
-"The double quote [\"] character only be used to quote 
paths. It must " +
+"The double quote [\"] character can only be used to 
quote paths. It must " +
 "not appear in a path. This loader path is not valid: 
[" + value + "]");
 } else {
 // Not quoted - NO-OP


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



[Bug 64317] org.apache.tomcat.util.net.TestSsl testPost() test failing on Windows

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

--- Comment #7 from Konstantin Kolinko  ---
Rerunning the test:

1. Additional 10 runs with the same Java 8 (AdoptOpenJDK 8.0.242.08-hotspot),

- APR failures: 2 - The same "bad record MAC" as earlier (Comment 4) - 03_*txt
- NIO2 failures: 4 - The same "Connection reset" as earlier (Comment 2) -
02_*txt
- NIO failures: 2 - "Byte in position...", similar to Comment 1 - 01_*txt


1. 20 runs with Java 11 (AdoptOpenJDK 11.0.6.10-hotspot):

All runs completed successfully. No issues noted.

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



Re: [tomcat-jakartaee-migration] branch master updated (5c96c0b -> 61ba095)

2020-04-06 Thread Mark Thomas
On 06/04/2020 14:34, ebo...@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> ebourg pushed a change to branch master
> in repository 
> https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git.
> 
> 
> from 5c96c0b  Ignore the IntelliJ project files
>  new 29ea189  Replaced NonClosing{In,Out}putStream with the equivalent 
> classes from Commons IO

-1. It adds 220k of bloat for no benefit.

>  new 528ccfa  Made the internal classes package private

I am close to -1 on this change.

I would rather these were left public at this stage in the development
of this tool to make it as easy as possible for folks to tinker with
this code, re-using the bits that work for them. Longer term I had the
possibility in mind that users might need to register custom Converters
so making that package private seems very out of place.

I get that we can always relax visibility rules later but this change
looks premature to me.

>  new 61ba095  Relocated the dependencies in the shaded jar

Again, I am close to -1 on this change.

Why? I don't see the need for this. It just makes debugging potentially
harder.

Mark

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



[tomcat] branch master updated: Improve format of debugging message

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

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


The following commit(s) were added to refs/heads/master by this push:
 new ca66cfd  Improve format of debugging message
ca66cfd is described below

commit ca66cfd3d6fae198fbcf76be09b3e8f3f8232c0a
Author: Mark Thomas 
AuthorDate: Mon Apr 6 17:12:14 2020 +0100

Improve format of debugging message
---
 test/org/apache/tomcat/util/net/TestSsl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/tomcat/util/net/TestSsl.java 
b/test/org/apache/tomcat/util/net/TestSsl.java
index a560b55..f4d2c27 100644
--- a/test/org/apache/tomcat/util/net/TestSsl.java
+++ b/test/org/apache/tomcat/util/net/TestSsl.java
@@ -134,8 +134,8 @@ public class TestSsl extends TomcatBaseTest {
 for (int i = 0; i < bytes.length; i++) {
 int read = is.read();
 if (bytes[i] != read) {
-System.err.print("Byte in position [" + i + "] 
had value [" + read +
-"] rather than " + 
Byte.toString(bytes[i]));
+System.err.println("Byte in position [" + i + 
"] had value [" + read +
+"] rather than [" + 
Byte.toString(bytes[i]) + "]");
 errorCount.incrementAndGet();
 break;
 }


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



[Bug 63671] libtcnative does not compile with OpenSSL < 1.1.0 and APR w/o threading support

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63671

--- Comment #4 from Mark Thomas  ---
It is 1.0.2 that is required for FIPS support (and 1.0.2 is currently the
minimum required OpenSSL version for Tomcat Native).

Yes, that is a good reason not to start removing the support for 1.0.2/1.1.0
just yet.

We need to factor in the timing of OpenSSL 3.0 as we figure out what we want to
do with the APR/Native connector in Tomcat 10 and the impact that has on a
possible Tomcat Native 2.0

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



Re: [tomcat-jakartaee-migration] branch master updated (5c96c0b -> 61ba095)

2020-04-06 Thread Mark Thomas
On 06/04/2020 17:18, Emmanuel Bourg wrote:
> Le 06/04/2020 à 17:50, Mark Thomas a écrit :
> 
>>> from 5c96c0b  Ignore the IntelliJ project files
>>>  new 29ea189  Replaced NonClosing{In,Out}putStream with the equivalent 
>>> classes from Commons IO
>>
>> -1. It adds 220k of bloat for no benefit.
> 
> No the dependencies are shaded with the minimizeJar option enabled, only
> the classes used are kept in the final jar.

OK. But that is still 7.2k of classes rather than 2.4k of classes for
zero benefit.

I'll withdraw my -1 because we are approaching the point where the
differences aren't worth the time spent discussing them but I still
don't like this change.

>>>  new 528ccfa  Made the internal classes package private
>>
>> I am close to -1 on this change.
>>
>> I would rather these were left public at this stage in the development
>> of this tool to make it as easy as possible for folks to tinker with
>> this code, re-using the bits that work for them. Longer term I had the
>> possibility in mind that users might need to register custom Converters
>> so making that package private seems very out of place.
>>
>> I get that we can always relax visibility rules later but this change
>> looks premature to me.
> 
> Ok sounds fair, I've reverted it.

And the relocation of the dependencies? At the moment, I only see a
downside (harder debugging). What is the benefit?

Mark

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



[tomcat-jakartaee-migration] branch master updated (a7db414 -> 77850c7)

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a change to branch master
in repository 
https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git.


from a7db414  Revert "Made the internal classes package private"
 new 4eb136a  Added an extension to the license and notice files
 new 77850c7  Removed the meta files from the included dendencies

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:
 LICENSE => LICENSE.txt |  0
 NOTICE => NOTICE.txt   |  0
 pom.xml| 14 ++
 3 files changed, 14 insertions(+)
 rename LICENSE => LICENSE.txt (100%)
 rename NOTICE => NOTICE.txt (100%)


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



[tomcat-jakartaee-migration] 02/02: Removed the meta files from the included dendencies

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit 77850c7226173692cbc0c2399148d42bf82df7f8
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 18:34:13 2020 +0200

Removed the meta files from the included dendencies
---
 pom.xml | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/pom.xml b/pom.xml
index 61ef6f5..8ba872a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,6 +121,20 @@
   true
   true
   false
+  
+
+  org.apache.bcel:*
+  
+META-INF/**
+  
+
+
+  commons-io:*
+  
+META-INF/**
+  
+
+  
   
 
   org.apache.bcel


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



[tomcat-jakartaee-migration] 01/02: Added an extension to the license and notice files

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit 4eb136aa04ca925ffe99ae856d834da27f247dd1
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 18:22:03 2020 +0200

Added an extension to the license and notice files
---
 LICENSE => LICENSE.txt | 0
 NOTICE => NOTICE.txt   | 0
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/LICENSE b/LICENSE.txt
similarity index 100%
rename from LICENSE
rename to LICENSE.txt
diff --git a/NOTICE b/NOTICE.txt
similarity index 100%
rename from NOTICE
rename to NOTICE.txt


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



[Bug 64315] configure output for OpenSSL wrong/incomplete sometimes

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64315

--- Comment #1 from Michael Osipov  ---
More over, the ssllibdir is always wrong on HP-UX. It has to be either
lib/hpux32 or lib/hpux64.

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



Re: [tomcat] branch master updated: Use a separate mbean type for SocketProperties

2020-04-06 Thread Mark Thomas
On 06/04/2020 12:41, Rémy Maucherat wrote:
> On Mon, Apr 6, 2020 at 1:36 PM  > wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> remm pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
> 
> The following commit(s) were added to refs/heads/master by this push:
>      new 14406c0  Use a separate mbean type for SocketProperties
> 14406c0 is described below
> 
> commit 14406c0b49c29fd05dd8f707b62ece38429e16f8
> Author: remm mailto:r...@apache.org>>
> AuthorDate: Mon Apr 6 13:36:10 2020 +0200
> 
>     Use a separate mbean type for SocketProperties
> 
>     A subType seems to not be handled well by some tools so it's
> likely more
>     robust to avoid it. Inspired by BZ64314, and similarly I cannot
> see the
>     mbean in visualvm.
> 
> 
> Should I backport this ?
> Although it is a breaking change (in theory), the mbean name used
> doesn't seem very reliable in tools.

I don't recall why I used a subType for that.

I think in this case the risk of breakage is outweighed by the benefits
of making the MBean accessible to more/most tools.

Mark


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



[Bug 64317] org.apache.tomcat.util.net.TestSsl testPost() test failing on Windows

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

--- Comment #9 from Konstantin Kolinko  ---
(In reply to Konstantin Kolinko from comment #7)
> Rerunning the test:

3. 20 runs with Java 14 (OpenJDK 14 GA (14.0.0)):

All runs completed successfully. No issues noted.

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



[Bug 63671] libtcnative does not compile with OpenSSL < 1.1.0 and APR w/o threading support

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63671

--- Comment #2 from Mark Thomas  ---
I think INVALID would have been a better resolution here. OpenSSL 1.1.0 and
earlier are no longer supported.

There are probably still OpenSSL 1.1.0 and earlier specific workarounds in the
Tomcat Native code base. We should be removing that cruft rather than
continuing to fix build issues with unsupported OpenSSL versions.

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



[GitHub] [tomcat] fhanik opened a new pull request #267: Remove reflection from Connector.java

2020-04-06 Thread GitBox
fhanik opened a new pull request #267: Remove reflection from Connector.java
URL: https://github.com/apache/tomcat/pull/267
 
 
   I will start a discussion on dev@tomcat.apache.org
   
   TL;DR; We are using Apache Tomcat embedded in native images (GraalVM). 
   Reflection causes images to be unnecessarily large, and Apache Tomcat has 
many places where reflection can be avoided in an embedded scenario. 


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[Bug 64317] org.apache.tomcat.util.net.TestSsl testPost() test failing on Windows

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

--- Comment #4 from Konstantin Kolinko  ---
Created attachment 37149
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37149=edit
03_TEST-org.apache.tomcat.util.net.TestSsl.APR.txt

An APR failure. I observed it once.

javax.net.ssl.SSLException: bad record MAC
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1022)
at
sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:71)
at org.apache.tomcat.util.net.TestSsl$1.run(TestSsl.java:132)
Caused by: javax.crypto.BadPaddingException: bad record MAC
at sun.security.ssl.InputRecord.decrypt(InputRecord.java:219)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1017)
... 4 more

It is a read error as well, but the error message is an odd one.

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



[Bug 64317] org.apache.tomcat.util.net.TestSsl testPost() test failing on Windows

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

--- Comment #8 from Konstantin Kolinko  ---
Created attachment 37150
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37150=edit
04_TEST-org.apache.tomcat.util.net.TestSsl.NIO.txt

Java 8  (AdoptOpenJDK 8.0.242.08-hotspot), NIO

The same "Byte in position" failure as in Comment 1 - 01_*.txt
In this test run this error occurred several times:

Byte in position [15393480] had value [-1] rather than 1Byte in position
[14987496] had value [-1] rather than 1Byte in position [15173572] had value
[-1] rather than 1Byte in position [14886000] had value [-1] rather than 1

-- 
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 (b7d9b2f -> 5ef320c)

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

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


from b7d9b2f  Use a constant for the data size
 new c5d20f3  Use a separate mbean type for SocketProperties
 new 5ef320c  Filtering is no longer necessary now SocketProperties is 
separate type

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/catalina/manager/StatusManagerServlet.java | 7 +--
 java/org/apache/tomcat/util/net/AbstractEndpoint.java  | 2 +-
 test/org/apache/catalina/mbeans/TestRegistration.java  | 5 ++---
 webapps/docs/changelog.xml | 8 
 4 files changed, 12 insertions(+), 10 deletions(-)


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



[tomcat] 01/02: Use a separate mbean type for SocketProperties

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

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

commit c5d20f3dba03c5759142423be8a268eab89e0a66
Author: remm 
AuthorDate: Mon Apr 6 13:36:10 2020 +0200

Use a separate mbean type for SocketProperties

A subType seems to not be handled well by some tools so it's likely more
robust to avoid it. Inspired by BZ64314, and similarly I cannot see the
mbean in visualvm.
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 2 +-
 test/org/apache/catalina/mbeans/TestRegistration.java | 5 ++---
 webapps/docs/changelog.xml| 8 
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index db9fa70..fdb172d 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -1160,7 +1160,7 @@ public abstract class AbstractEndpoint {
 Registry.getRegistry(null, null).registerComponent(this, oname, 
null);
 
 ObjectName socketPropertiesOname = new ObjectName(domain +
-":type=ThreadPool,name=\"" + getName() + 
"\",subType=SocketProperties");
+":type=SocketProperties,name=\"" + getName() + "\"");
 socketProperties.setObjectName(socketPropertiesOname);
 Registry.getRegistry(null, 
null).registerComponent(socketProperties, socketPropertiesOname, null);
 
diff --git a/test/org/apache/catalina/mbeans/TestRegistration.java 
b/test/org/apache/catalina/mbeans/TestRegistration.java
index 2049f81..bffd2c5 100644
--- a/test/org/apache/catalina/mbeans/TestRegistration.java
+++ b/test/org/apache/catalina/mbeans/TestRegistration.java
@@ -135,9 +135,8 @@ public class TestRegistration extends TomcatBaseTest {
 + ObjectName.quote(ADDRESS),
 "Tomcat:type=ThreadPool,name="
 + ObjectName.quote("http-" + type + "-" + ADDRESS + "-" + 
port),
-"Tomcat:type=ThreadPool,name="
-+ ObjectName.quote("http-" + type + "-" + ADDRESS + "-" + 
port) +
-",subType=SocketProperties",
+"Tomcat:type=SocketProperties,name="
++ ObjectName.quote("http-" + type + "-" + ADDRESS + "-" + 
port),
 };
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 11d9a12..279f78e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -45,6 +45,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Move SocketProperties mbean to its own type rather than
+use a subType to improve robustness with tools. (remm)
+  
+
+  
 
 
   


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



[tomcat] 02/02: Filtering is no longer necessary now SocketProperties is separate type

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

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

commit 5ef320c286412f76891fe4d176ae52505d2ac8a6
Author: Mark Thomas 
AuthorDate: Mon Apr 6 16:14:39 2020 +0100

Filtering is no longer necessary now SocketProperties is separate type
---
 java/org/apache/catalina/manager/StatusManagerServlet.java | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/manager/StatusManagerServlet.java 
b/java/org/apache/catalina/manager/StatusManagerServlet.java
index 1fc7be2..ec02588 100644
--- a/java/org/apache/catalina/manager/StatusManagerServlet.java
+++ b/java/org/apache/catalina/manager/StatusManagerServlet.java
@@ -119,15 +119,10 @@ public class StatusManagerServlet
 onStr = "*:type=ThreadPool,*";
 objectName = new ObjectName(onStr);
 set = mBeanServer.queryMBeans(objectName, null);
-onStr = "*:type=ThreadPool,*,subType=SocketProperties";
-objectName = new ObjectName(onStr);
-Set set2 = mBeanServer.queryMBeans(objectName, 
null);
 iterator = set.iterator();
 while (iterator.hasNext()) {
 ObjectInstance oi = iterator.next();
-if (!set2.contains(oi)) {
-threadPools.addElement(oi.getObjectName());
-}
+threadPools.addElement(oi.getObjectName());
 }
 
 // Query Global Request Processors


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



Re: [tomcat-jakartaee-migration] branch master updated (5c96c0b -> 61ba095)

2020-04-06 Thread Emmanuel Bourg
Le 06/04/2020 à 17:50, Mark Thomas a écrit :

>> from 5c96c0b  Ignore the IntelliJ project files
>>  new 29ea189  Replaced NonClosing{In,Out}putStream with the equivalent 
>> classes from Commons IO
> 
> -1. It adds 220k of bloat for no benefit.

No the dependencies are shaded with the minimizeJar option enabled, only
the classes used are kept in the final jar.


>>  new 528ccfa  Made the internal classes package private
> 
> I am close to -1 on this change.
> 
> I would rather these were left public at this stage in the development
> of this tool to make it as easy as possible for folks to tinker with
> this code, re-using the bits that work for them. Longer term I had the
> possibility in mind that users might need to register custom Converters
> so making that package private seems very out of place.
> 
> I get that we can always relax visibility rules later but this change
> looks premature to me.

Ok sounds fair, I've reverted it.

Emmanuel Bourg

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



[Bug 64317] org.apache.tomcat.util.net.TestSsl testPost() test failing on Windows

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

--- Comment #5 from Michael Osipov  ---
I see similar errors in other tests once in a while. Doesn't this simply mean
tests are flaky since sockets are not 100% reliable?

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



[Bug 64317] org.apache.tomcat.util.net.TestSsl testPost() test failing on Windows

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

Michael Osipov  changed:

   What|Removed |Added

 CC||micha...@apache.org

-- 
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 8.5.x updated: Use a constant for the data size

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

remm 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 6d2d07d  Use a constant for the data size
6d2d07d is described below

commit 6d2d07d74c9471818d4cfc327df176a55a197e29
Author: remm 
AuthorDate: Mon Apr 6 16:50:36 2020 +0200

Use a constant for the data size
---
 test/org/apache/tomcat/util/net/TestSsl.java | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/tomcat/util/net/TestSsl.java 
b/test/org/apache/tomcat/util/net/TestSsl.java
index b072106..4acbaec 100644
--- a/test/org/apache/tomcat/util/net/TestSsl.java
+++ b/test/org/apache/tomcat/util/net/TestSsl.java
@@ -78,6 +78,8 @@ public class TestSsl extends TomcatBaseTest {
 TesterSupport.getLastClientAuthRequestedIssuerCount() == 0);
 }
 
+private static final int POST_DATA_SIZE = 16 * 1024 * 1024;
+
 @Test
 public void testPost() throws Exception {
 final SocketFactory socketFactory = TesterSupport.configureClientSsl();
@@ -102,7 +104,7 @@ public class TestSsl extends TomcatBaseTest {
 
 OutputStream os = socket.getOutputStream();
 
-byte[] bytes = new byte[16 * 1024 * 1024]; // 16MB
+byte[] bytes = new byte[POST_DATA_SIZE]; // 16MB
 Arrays.fill(bytes, (byte) 1);
 
 os.write("POST /post HTTP/1.1\r\n".getBytes());
@@ -283,7 +285,7 @@ public class TestSsl extends TomcatBaseTest {
 
 @Override
 protected void doPost(HttpServletRequest req, HttpServletResponse 
resp) throws ServletException, IOException {
-ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ByteArrayOutputStream baos = new 
ByteArrayOutputStream(POST_DATA_SIZE);
 byte[] in = new byte[1500];
 InputStream input = req.getInputStream();
 while (true) {
@@ -295,6 +297,7 @@ public class TestSsl extends TomcatBaseTest {
 }
 }
 byte[] out = baos.toByteArray();
+// Set the content-length to avoid having to parse chunked
 resp.setContentLength(out.length);
 resp.getOutputStream().write(out);
 }


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



[tomcat] branch 9.0.x updated: Use a constant for the data size

2020-04-06 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 b7d9b2f  Use a constant for the data size
b7d9b2f is described below

commit b7d9b2fb4e73a2fb79ee2879e2191df6c6745e7f
Author: remm 
AuthorDate: Mon Apr 6 16:50:36 2020 +0200

Use a constant for the data size
---
 test/org/apache/tomcat/util/net/TestSsl.java | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/tomcat/util/net/TestSsl.java 
b/test/org/apache/tomcat/util/net/TestSsl.java
index ae23179..15dcea8 100644
--- a/test/org/apache/tomcat/util/net/TestSsl.java
+++ b/test/org/apache/tomcat/util/net/TestSsl.java
@@ -78,6 +78,8 @@ public class TestSsl extends TomcatBaseTest {
 TesterSupport.getLastClientAuthRequestedIssuerCount() == 0);
 }
 
+private static final int POST_DATA_SIZE = 16 * 1024 * 1024;
+
 @Test
 public void testPost() throws Exception {
 SocketFactory socketFactory = TesterSupport.configureClientSsl();
@@ -102,7 +104,7 @@ public class TestSsl extends TomcatBaseTest {
 
 OutputStream os = socket.getOutputStream();
 
-byte[] bytes = new byte[16 * 1024 * 1024]; // 16MB
+byte[] bytes = new byte[POST_DATA_SIZE]; // 16MB
 Arrays.fill(bytes, (byte) 1);
 
 os.write("POST /post HTTP/1.1\r\n".getBytes());
@@ -283,7 +285,7 @@ public class TestSsl extends TomcatBaseTest {
 
 @Override
 protected void doPost(HttpServletRequest req, HttpServletResponse 
resp) throws ServletException, IOException {
-ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ByteArrayOutputStream baos = new 
ByteArrayOutputStream(POST_DATA_SIZE);
 byte[] in = new byte[1500];
 InputStream input = req.getInputStream();
 while (true) {
@@ -295,6 +297,7 @@ public class TestSsl extends TomcatBaseTest {
 }
 }
 byte[] out = baos.toByteArray();
+// Set the content-length to avoid having to parse chunked
 resp.setContentLength(out.length);
 resp.getOutputStream().write(out);
 }


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

2020-04-06 Thread Coty Sutherland
On Fri, Apr 3, 2020 at 8:49 AM Mark Thomas  wrote:

> The proposed Apache Tomcat 9.0.34 release is now available for voting.
>
> The major changes compared to the 9.0.34 release are:
>
> - Add support for default values when using ${...} property replacement
>   in configuration files. Based on a pull request provided by Bernd
>   Bohmann.
>
> - When configuring an HTTP Connector, warn if the encoding specified for
>   URIEncoding is not a superset of US-ASCII as required by RFC7230.
>
> - Replace the system property
>   org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH with the
>   Connector attribute encodedSolidusHandling that adds an additional
>   option to pass the %2f sequence through to the application without
>   decoding it in addition to rejecting such sequences and decoding such
>   sequences.
>
> Along with lots of other bug fixes and improvements.
>
> For full details, see the changelog:
> https://ci.apache.org/projects/tomcat/tomcat9/docs/changelog.html
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.34/
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1263/
> The tag is:
> https://github.com/apache/tomcat/tree/9.0.34
> 1031a8edb864ac001a8f172161aa8a13b7a4e712
>
> The proposed 9.0.34 release is:
> [ ] Broken - do not release
> [x] Stable - go ahead and release as 9.0.34
>

+1


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


[tomcat] branch master updated: Filtering is no longer necessary now SocketProperties is separate type

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

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


The following commit(s) were added to refs/heads/master by this push:
 new dc0e4fe  Filtering is no longer necessary now SocketProperties is 
separate type
dc0e4fe is described below

commit dc0e4fe5c78e05d93fa3e1e4f784ff35850432fb
Author: Mark Thomas 
AuthorDate: Mon Apr 6 16:14:39 2020 +0100

Filtering is no longer necessary now SocketProperties is separate type
---
 java/org/apache/catalina/manager/StatusManagerServlet.java | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/manager/StatusManagerServlet.java 
b/java/org/apache/catalina/manager/StatusManagerServlet.java
index a022630..035bf63 100644
--- a/java/org/apache/catalina/manager/StatusManagerServlet.java
+++ b/java/org/apache/catalina/manager/StatusManagerServlet.java
@@ -120,15 +120,10 @@ public class StatusManagerServlet
 onStr = "*:type=ThreadPool,*";
 objectName = new ObjectName(onStr);
 set = mBeanServer.queryMBeans(objectName, null);
-onStr = "*:type=ThreadPool,*,subType=SocketProperties";
-objectName = new ObjectName(onStr);
-Set set2 = mBeanServer.queryMBeans(objectName, 
null);
 iterator = set.iterator();
 while (iterator.hasNext()) {
 ObjectInstance oi = iterator.next();
-if (!set2.contains(oi)) {
-threadPools.addElement(oi.getObjectName());
-}
+threadPools.addElement(oi.getObjectName());
 }
 
 // Query Global Request Processors


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



[tomcat] 01/02: Use a separate mbean type for SocketProperties

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

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

commit edbb6bf704246cd64a2a0af6b023b95664bfe30c
Author: remm 
AuthorDate: Mon Apr 6 13:36:10 2020 +0200

Use a separate mbean type for SocketProperties

A subType seems to not be handled well by some tools so it's likely more
robust to avoid it. Inspired by BZ64314, and similarly I cannot see the
mbean in visualvm.
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 2 +-
 test/org/apache/catalina/mbeans/TestRegistration.java | 5 ++---
 webapps/docs/changelog.xml| 8 
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index 81c0ad8..2b47dee 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -1124,7 +1124,7 @@ public abstract class AbstractEndpoint {
 Registry.getRegistry(null, null).registerComponent(this, oname, 
null);
 
 ObjectName socketPropertiesOname = new ObjectName(domain +
-":type=ThreadPool,name=\"" + getName() + 
"\",subType=SocketProperties");
+":type=SocketProperties,name=\"" + getName() + "\"");
 socketProperties.setObjectName(socketPropertiesOname);
 Registry.getRegistry(null, 
null).registerComponent(socketProperties, socketPropertiesOname, null);
 
diff --git a/test/org/apache/catalina/mbeans/TestRegistration.java 
b/test/org/apache/catalina/mbeans/TestRegistration.java
index 5fb89f8..badd59b 100644
--- a/test/org/apache/catalina/mbeans/TestRegistration.java
+++ b/test/org/apache/catalina/mbeans/TestRegistration.java
@@ -134,9 +134,8 @@ public class TestRegistration extends TomcatBaseTest {
 + ObjectName.quote(ADDRESS),
 "Tomcat:type=ThreadPool,name="
 + ObjectName.quote("http-" + type + "-" + ADDRESS + "-" + 
port),
-"Tomcat:type=ThreadPool,name="
-+ ObjectName.quote("http-" + type + "-" + ADDRESS + "-" + 
port) +
-",subType=SocketProperties",
+"Tomcat:type=SocketProperties,name="
++ ObjectName.quote("http-" + type + "-" + ADDRESS + "-" + 
port),
 };
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7ad9daf..f2f2d87 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -55,6 +55,14 @@
   
 
   
+  
+
+  
+Move SocketProperties mbean to its own type rather than
+use a subType to improve robustness with tools. (remm)
+  
+
+  
 
 
   


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



[tomcat] 02/02: Filtering is no longer necessary now SocketProperties is separate type

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

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

commit 0e76570b07dcad5a4da3fedaee053b0e37fdb1a5
Author: Mark Thomas 
AuthorDate: Mon Apr 6 16:14:39 2020 +0100

Filtering is no longer necessary now SocketProperties is separate type
---
 java/org/apache/catalina/manager/StatusManagerServlet.java | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/manager/StatusManagerServlet.java 
b/java/org/apache/catalina/manager/StatusManagerServlet.java
index 1fc7be2..ec02588 100644
--- a/java/org/apache/catalina/manager/StatusManagerServlet.java
+++ b/java/org/apache/catalina/manager/StatusManagerServlet.java
@@ -119,15 +119,10 @@ public class StatusManagerServlet
 onStr = "*:type=ThreadPool,*";
 objectName = new ObjectName(onStr);
 set = mBeanServer.queryMBeans(objectName, null);
-onStr = "*:type=ThreadPool,*,subType=SocketProperties";
-objectName = new ObjectName(onStr);
-Set set2 = mBeanServer.queryMBeans(objectName, 
null);
 iterator = set.iterator();
 while (iterator.hasNext()) {
 ObjectInstance oi = iterator.next();
-if (!set2.contains(oi)) {
-threadPools.addElement(oi.getObjectName());
-}
+threadPools.addElement(oi.getObjectName());
 }
 
 // Query Global Request Processors


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



[tomcat-native] branch master updated: Fix broken XMl

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 6cc89ce  Fix broken XMl
6cc89ce is described below

commit 6cc89ce6b026f763f74b7c55f761cfb12fd8417e
Author: Mark Thomas 
AuthorDate: Mon Apr 6 16:35:58 2020 +0100

Fix broken XMl
---
 xdocs/miscellaneous/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 6321079..7ce5696 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -37,7 +37,7 @@
 
   
 
-  63671: libtcnative does not compile with OpenSSL  1.1.0
+  63671: libtcnative does not compile with OpenSSL  1.1.0
   and APR w/o threading support. (michaelo)
 
 


-
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 (6d2d07d -> 0e76570)

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

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


from 6d2d07d  Use a constant for the data size
 new edbb6bf  Use a separate mbean type for SocketProperties
 new 0e76570  Filtering is no longer necessary now SocketProperties is 
separate type

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/catalina/manager/StatusManagerServlet.java | 7 +--
 java/org/apache/tomcat/util/net/AbstractEndpoint.java  | 2 +-
 test/org/apache/catalina/mbeans/TestRegistration.java  | 5 ++---
 webapps/docs/changelog.xml | 8 
 4 files changed, 12 insertions(+), 10 deletions(-)


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



[tomcat-jakartaee-migration] branch master updated: Revert "Made the internal classes package private"

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new a7db414  Revert "Made the internal classes package private"
a7db414 is described below

commit a7db414084c12b9e02461aae1a52eeb4bc05e50f
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 18:16:37 2020 +0200

Revert "Made the internal classes package private"

This reverts commit 528ccfade4ef07ac5ee240767ed7fe09ead71ab5.
---
 src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/Converter.java  | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/Info.java   | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java  | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/StringManager.java  | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/TextConverter.java  | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/Util.java   | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
index 3b7f3bc..4bb 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
@@ -25,7 +25,7 @@ import org.apache.bcel.classfile.Constant;
 import org.apache.bcel.classfile.ConstantUtf8;
 import org.apache.bcel.classfile.JavaClass;
 
-class ClassConverter implements Converter {
+public class ClassConverter implements Converter {
 
 @Override
 public boolean accepts(String filename) {
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Converter.java 
b/src/main/java/org/apache/tomcat/jakartaee/Converter.java
index cf22616..f3d62ec 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Converter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Converter.java
@@ -20,7 +20,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-interface Converter {
+public interface Converter {
 
 boolean accepts(String filename);
 
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Info.java 
b/src/main/java/org/apache/tomcat/jakartaee/Info.java
index c1ad499..a8de1a0 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Info.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Info.java
@@ -19,7 +19,7 @@ package org.apache.tomcat.jakartaee;
 import java.io.IOException;
 import java.util.Properties;
 
-class Info {
+public class Info {
 
 private static final String VERSION;
 
diff --git a/src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java
index 3444ebf..cd1152a 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java
@@ -20,7 +20,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-class NoOpConverter implements Converter {
+public class NoOpConverter implements Converter {
 
 @Override
 public boolean accepts(String filename) {
diff --git a/src/main/java/org/apache/tomcat/jakartaee/StringManager.java 
b/src/main/java/org/apache/tomcat/jakartaee/StringManager.java
index 8e1680f..7df8faf 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/StringManager.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/StringManager.java
@@ -49,7 +49,7 @@ import java.util.ResourceBundle;
  * @author Mel Martinez [mmarti...@g1440.com]
  * @see java.util.ResourceBundle
  */
-class StringManager {
+public class StringManager {
 
 private static int LOCALE_CACHE_SIZE = 10;
 
diff --git a/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
index 3911850..d0a0db2 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
@@ -25,7 +25,7 @@ import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
 
-class TextConverter implements Converter {
+public class TextConverter implements Converter {
 
 private static final List supportedExtensions;
 
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Util.java 
b/src/main/java/org/apache/tomcat/jakartaee/Util.java
index 4c2bce6..2a2ae81 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Util.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Util.java
@@ -20,7 +20,7 @@ import java.util.Locale;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-class Util {
+public class Util {
 
 public enum EESpecProfile { TOMCAT, EE };
 


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

[Bug 64309] Improve repository regular expression performance used for bootstrapping Catalina

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64309

--- Comment #1 from Mark Thomas  ---
No objections but I do wonder if the performance difference is noticeable or
even measurable given that this happens once on start-up.

-- 
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-native] branch master updated: Increment missed version number in 045721a

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

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


The following commit(s) were added to refs/heads/master by this push:
 new d5b811e  Increment missed version number in 045721a
d5b811e is described below

commit d5b811ed9ac7be10343bfc34fca683056383e137
Author: Mark Thomas 
AuthorDate: Mon Apr 6 16:28:17 2020 +0100

Increment missed version number in 045721a
---
 build.properties.default | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.properties.default b/build.properties.default
index 70f5adc..8b32326 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -18,7 +18,7 @@
 # - Version Control Flags -
 version.major=1
 version.minor=2
-version.build=23
+version.build=24
 version.patch=0
 version.suffix=-dev
 


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



buildbot failure in on tomcat-trunk

2020-04-06 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/5095

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch master] dc0e4fe5c78e05d93fa3e1e4f784ff35850432fb
Blamelist: Mark Thomas ,remm 

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




-
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: Improve format of debugging message

2020-04-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 f1c6d66  Improve format of debugging message
f1c6d66 is described below

commit f1c6d66dc05b1295e4dc7feaaa572df33694ebba
Author: Mark Thomas 
AuthorDate: Mon Apr 6 17:12:14 2020 +0100

Improve format of debugging message
---
 test/org/apache/tomcat/util/net/TestSsl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/tomcat/util/net/TestSsl.java 
b/test/org/apache/tomcat/util/net/TestSsl.java
index 4acbaec..f5ae28b 100644
--- a/test/org/apache/tomcat/util/net/TestSsl.java
+++ b/test/org/apache/tomcat/util/net/TestSsl.java
@@ -133,8 +133,8 @@ public class TestSsl extends TomcatBaseTest {
 for (int i = 0; i < bytes.length; i++) {
 int read = is.read();
 if (bytes[i] != read) {
-System.err.print("Byte in position [" + i + "] 
had value [" + read +
-"] rather than " + 
Byte.toString(bytes[i]));
+System.err.println("Byte in position [" + i + 
"] had value [" + read +
+"] rather than [" + 
Byte.toString(bytes[i]) + "]");
 errorCount.incrementAndGet();
 break;
 }


-
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 format of debugging message

2020-04-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 bcebf49  Improve format of debugging message
bcebf49 is described below

commit bcebf49fc4a1b2fb342740e14727e6e0733c5bf4
Author: Mark Thomas 
AuthorDate: Mon Apr 6 17:12:14 2020 +0100

Improve format of debugging message
---
 test/org/apache/tomcat/util/net/TestSsl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/tomcat/util/net/TestSsl.java 
b/test/org/apache/tomcat/util/net/TestSsl.java
index 15dcea8..f55a794 100644
--- a/test/org/apache/tomcat/util/net/TestSsl.java
+++ b/test/org/apache/tomcat/util/net/TestSsl.java
@@ -133,8 +133,8 @@ public class TestSsl extends TomcatBaseTest {
 for (int i = 0; i < bytes.length; i++) {
 int read = is.read();
 if (bytes[i] != read) {
-System.err.print("Byte in position [" + i + "] 
had value [" + read +
-"] rather than " + 
Byte.toString(bytes[i]));
+System.err.println("Byte in position [" + i + 
"] had value [" + read +
+"] rather than [" + 
Byte.toString(bytes[i]) + "]");
 errorCount.incrementAndGet();
 break;
 }


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



[Bug 63671] libtcnative does not compile with OpenSSL < 1.1.0 and APR w/o threading support

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63671

--- Comment #3 from George Stanchev  ---
Would keeping 1.0.1 for the FIPS support be incentive not to deprecate/remove
support for 1.0.1 completely?

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



Re: [tomcat-jakartaee-migration] branch master updated (5c96c0b -> 61ba095)

2020-04-06 Thread Emmanuel Bourg
Le 06/04/2020 à 18:33, Mark Thomas a écrit :

> OK. But that is still 7.2k of classes rather than 2.4k of classes for
> zero benefit.
> 
> I'll withdraw my -1 because we are approaching the point where the
> differences aren't worth the time spent discussing them but I still
> don't like this change.

I've removed the duplicated Apache license in the shaded jar, so the
difference is now near zero.

I agree this change is trivial and doesn't bring significant changes.
Apache Commons was created to share and reuse common code used at the
ASF, I always feel a bit sad when the code produced there isn't reused.


> And the relocation of the dependencies? At the moment, I only see a
> downside (harder debugging). What is the benefit?

Relocating embedded dependencies is a best practice to prevent classpath
conflicts. If the tools ends up being integrated in a bigger software it
could clash with another version of BCEL on the classpath.

Emmanuel Bourg

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



[Bug 64317] org.apache.tomcat.util.net.TestSsl testPost() test failing on Windows

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

--- Comment #6 from Konstantin Kolinko  ---
(In reply to Remy Maucherat from comment #3)
> Do you imply what the testPost test does is incorrect ?

I do not see any obvious flaw in the design. I think that many clients behave
like that.

The servlet design is a bit unusual for me, as Content-Length of the request is
known in advance.

I wonder whether "Connection reset" is caused by some timeout. The test runs
for 9-10 seconds for me, and other tests in the testsuite complete in about 1
second.


> The test does work for me [so far]. As with the rather equivalent HTTP/2 TLS
> test, it is meant to test large POSTs with TLS since that's what people
> often complain about.
> 
> The test was included in 9.0.33 already (since there was a regression) and
> there are no relevant changes in 9.0.34 (only NIO got a minor change, but
> you are saying it works). Why did it work then ?

The detailed logging of errors was added just recently, by Mark on April 2nd:

SHA-1: f8da18d362b8a773afd557fdda0fe50a3748c90c
* Failed test on Windows. Expand logging to aid debugging of failures.

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



[Bug 64312] Many memberDisappeared messages are logged on all nodes of the cluster with JDK versions 12 or above, even when system is idle

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64312

Pavana Sai Mahathi Vavilala  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #3 from Pavana Sai Mahathi Vavilala  
---
The exact same setup works without any problem when configured with JDK 11.

However, with JDK 12 and 14, there are too many memberDisappeared messages
logged (almost for every 2 minutes).

Note:
In the JDK 12 environment, on increasing the dropTime to 1, we identified
that they are scarcely generated.

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



[GitHub] [tomcat] markt-asf merged pull request #266: Fix typo in exception message about quote character in repository path

2020-04-06 Thread GitBox
markt-asf merged pull request #266: Fix typo in exception message about quote 
character in repository path
URL: https://github.com/apache/tomcat/pull/266
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
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 issue #266: Fix typo in exception message about quote character in repository path

2020-04-06 Thread GitBox
markt-asf commented on issue #266: Fix typo in exception message about quote 
character in repository path
URL: https://github.com/apache/tomcat/pull/266#issuecomment-609835720
 
 
   Thanks for the PR. I'll get it back-ported to the other supported branches.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[tomcat] branch master updated: Fix typo in exception message about quote character in repository path

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

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


The following commit(s) were added to refs/heads/master by this push:
 new ac54135  Fix typo in exception message about quote character in 
repository path
ac54135 is described below

commit ac54135351e3f49aa43ede7b50475781b8fc547d
Author: Paul Muriel Biya-Bi 
AuthorDate: Fri Apr 3 23:54:54 2020 -0400

Fix typo in exception message about quote character in repository path
---
 java/org/apache/catalina/startup/Bootstrap.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/startup/Bootstrap.java 
b/java/org/apache/catalina/startup/Bootstrap.java
index 177a59d..08ad013 100644
--- a/java/org/apache/catalina/startup/Bootstrap.java
+++ b/java/org/apache/catalina/startup/Bootstrap.java
@@ -581,7 +581,7 @@ public final class Bootstrap {
 // Too early to use standard i18n support. The class path 
hasn't
 // been configured.
 throw new IllegalArgumentException(
-"The double quote [\"] character only be used to quote 
paths. It must " +
+"The double quote [\"] character can only be used to 
quote paths. It must " +
 "not appear in a path. This loader path is not valid: 
[" + value + "]");
 } else {
 // Not quoted - NO-OP


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



[tomcat] branch master updated: Use a constant for the data size

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 80576b4  Use a constant for the data size
80576b4 is described below

commit 80576b44860c3db119a8c3b8caa48852f74e4d02
Author: remm 
AuthorDate: Mon Apr 6 16:50:36 2020 +0200

Use a constant for the data size
---
 test/org/apache/tomcat/util/net/TestSsl.java | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/tomcat/util/net/TestSsl.java 
b/test/org/apache/tomcat/util/net/TestSsl.java
index 715cefa..a560b55 100644
--- a/test/org/apache/tomcat/util/net/TestSsl.java
+++ b/test/org/apache/tomcat/util/net/TestSsl.java
@@ -79,6 +79,8 @@ public class TestSsl extends TomcatBaseTest {
 TesterSupport.getLastClientAuthRequestedIssuerCount() == 0);
 }
 
+private static final int POST_DATA_SIZE = 16 * 1024 * 1024;
+
 @Test
 public void testPost() throws Exception {
 SocketFactory socketFactory = TesterSupport.configureClientSsl();
@@ -103,7 +105,7 @@ public class TestSsl extends TomcatBaseTest {
 
 OutputStream os = socket.getOutputStream();
 
-byte[] bytes = new byte[16 * 1024 * 1024]; // 16MB
+byte[] bytes = new byte[POST_DATA_SIZE]; // 16MB
 Arrays.fill(bytes, (byte) 1);
 
 os.write("POST /post HTTP/1.1\r\n".getBytes());
@@ -284,7 +286,7 @@ public class TestSsl extends TomcatBaseTest {
 
 @Override
 protected void doPost(HttpServletRequest req, HttpServletResponse 
resp) throws ServletException, IOException {
-ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ByteArrayOutputStream baos = new 
ByteArrayOutputStream(POST_DATA_SIZE);
 byte[] in = new byte[1500];
 InputStream input = req.getInputStream();
 while (true) {
@@ -296,6 +298,7 @@ public class TestSsl extends TomcatBaseTest {
 }
 }
 byte[] out = baos.toByteArray();
+// Set the content-length to avoid having to parse chunked
 resp.setContentLength(out.length);
 resp.getOutputStream().write(out);
 }


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



[Bug 64317] org.apache.tomcat.util.net.TestSsl testPost() test failing on Windows

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

--- Comment #10 from Remy Maucherat  ---
A defect from the testsuite is that it tests either JSSE or OpenSSL, not both
[it would need two extra full runs to test it]. Personally, I always use
OpenSSL rather than JSSE. It is a bit unexpected that things would work better
with Java 11, so I wonder if you could also try OpenSSL.

Adding this property to build.properties switches to it:
test.sslImplementation=org.apache.tomcat.util.net.openssl.OpenSSLImplementation

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



API Change - Connector.java Constructor

2020-04-06 Thread Filip Hanik
Team,

As I'm slowly transitioning between projects, Apache Tomcat has once again
showed up in my workspace. I'm currently working on improving the embedded
experience for native images.

I have a pull request, [1] ,
that I'd like to open up a discussion about

Goal: Able to start embedded Apache Tomcat without using reflection.

This PR: Changes the constructor for Connector to not use reflection.
Instead the calling components will instantiate the ProtocolHandler

Besides the constructor change, functionality should remain backwards
compatible.

Please provide feedback, such as
1. Are we open to making API changes like this?
2. Does the PR introduce any problems?

Thank you
Filip

[1] https://github.com/apache/tomcat/pull/267


[tomcat-jakartaee-migration] branch master updated: Travis integration

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 397ff8a  Travis integration
397ff8a is described below

commit 397ff8a6da354b4f63889894ebe432d3c2347e7a
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 20:08:21 2020 +0200

Travis integration
---
 .travis.yml | 21 +
 1 file changed, 21 insertions(+)

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000..eb98a0a
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+language: java
+
+jdk:
+  - openjdk8
+  - openjdk11
+  - openjdk-ea


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



Re: API Change - Connector.java Constructor

2020-04-06 Thread Mark Thomas
On 06/04/2020 17:56, Filip Hanik wrote:
> Team,
> 
> As I'm slowly transitioning between projects, Apache Tomcat has once
> again showed up in my workspace. I'm currently working on improving the
> embedded experience for native images.
> 
> I have a pull request,[1] ,
> that I'd like to open up a discussion about
> 
> Goal: Able to start embedded Apache Tomcat without using reflection.

Do you have a test case you are working to? It would be helpful to see
exactly where the problems are in terms of what is considered reflection
and what isn't.

On that point, can we tell the tooling that reflection isn't used even
if the automated analysis can't tell that? I'm thinking of something
along the lines of ensuring that most execution paths - including
embedded - avoid reflection. We should, hopefully, be able to document
the scenarios where reflection is triggered so users know to avoid them.

> This PR: Changes the constructor for Connector to not use reflection.
> Instead the calling components will instantiate the ProtocolHandler
> 
> Besides the constructor change, functionality should remain backwards
> compatible.

I am very uncomfortable changing the constructor for a fundamental
component like Connector this far into a stable release - hence wanting
to explore options.

Mark


> Please provide feedback, such as
> 1. Are we open to making API changes like this?
> 2. Does the PR introduce any problems?
> 
> Thank you
> Filip
> 
> [1] https://github.com/apache/tomcat/pull/267


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



[tomcat-jakartaee-migration] branch master updated: Added a new line at the end of the files

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 418604f  Added a new line at the end of the files
418604f is described below

commit 418604f4b4b9def240c5a481de9c123824de1e7f
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 19:55:03 2020 +0200

Added a new line at the end of the files
---
 pom.xml| 2 +-
 src/assembly/bin.xml   | 2 +-
 src/main/resources/info.properties | 2 +-
 src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index dfbbaf2..3da57ee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -160,4 +160,4 @@
 
   
 
-
\ No newline at end of file
+
diff --git a/src/assembly/bin.xml b/src/assembly/bin.xml
index 6397296..9ce5462 100644
--- a/src/assembly/bin.xml
+++ b/src/assembly/bin.xml
@@ -31,4 +31,4 @@
   
 
   
-
\ No newline at end of file
+
diff --git a/src/main/resources/info.properties 
b/src/main/resources/info.properties
index 2ba48b9..5ebe760 100644
--- a/src/main/resources/info.properties
+++ b/src/main/resources/info.properties
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-version=migrated-${project.version}
\ No newline at end of file
+version=migrated-${project.version}
diff --git 
a/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties 
b/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
index f1c0e85..93a7649 100644
--- a/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
+++ b/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
@@ -24,4 +24,4 @@ migration.removeSignature=Remove cryptographic signature for 
[{0}]
 migration.skipSignatureFile=Drop cryptographic signature file [{0}]
 migration.stream=Migrating stream [{0}]
 migration.usage=Usage: Migration [-profile=TOMCAT|-profile=EE]  

-migration.warnSignatureRemoval=Removed cryptographic signature from JAR file
\ No newline at end of file
+migration.warnSignatureRemoval=Removed cryptographic signature from JAR file


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



buildbot failure in on tomcat-9-trunk

2020-04-06 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-9-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-9-trunk/builds/157

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-9-commit' 
triggered this build
Build Source Stamp: [branch 9.0.x] bcebf49fc4a1b2fb342740e14727e6e0733c5bf4
Blamelist: Mark Thomas 

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



Re: [VOTE] Release Apache Tomcat 8.5.54

2020-04-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 4/3/20 10:30, Mark Thomas wrote:
> The proposed Apache Tomcat 8.5.54 release is now available for
> voting.
>
> The major changes compared to the 8.5.53 release are:
>
> - Add support for default values when using ${...} property
> replacement in configuration files. Based on a pull request
> provided by Bernd Bohmann.
>
> - When configuring an HTTP Connector, warn if the encoding
> specified for URIEncoding is not a superset of US-ASCII as required
> by RFC7230.
>
> - Replace the system property
> org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH with the
> Connector attribute encodedSolidusHandling that adds an additional
> option to pass the %2f sequence through to the application without
> decoding it in addition to rejecting such sequences and decoding
> such sequences.
>
> Along with lots of other bug fixes and improvements.
>
> For full details, see the changelog:
> https://ci.apache.org/projects/tomcat/tomcat85/docs/changelog.html
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.5.54/
>
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-126
4/
>
>  The tag is: https://github.com/apache/tomcat/tree/8.5.54
> 0b365bb7032a5e30b35fedc56e7def82a3e55f94
>
> The proposed 8.5.54 release is: [ ] Broken - do not release [X]
> Stable - go ahead and release as 8.5.54

Thanks for RM'ing.

Works on an application in a development environment (vanilla
servlets, AjpNioProtocol, Http11NioProtocol, no TLS). Details below.

Failed tests are expected in this environment. (I still need to take
some time to adjust the environment to avoid complaints about my
OpenSSL version versus the Java version).

Thanks,
- -chris

* Environment
*  Java (build): openjdk version "1.8.0_242" OpenJDK Runtime
Environment (build 1.8.0_242-8u242-b08-1~deb9u1-b08) OpenJDK 64-Bit
Server VM (build 25.242-b08, mixed mode)
*  Java (test): openjdk version "1.8.0_242" OpenJDK Runtime
Environment (build 1.8.0_242-8u242-b08-1~deb9u1-b08) OpenJDK 64-Bit
Server VM (build 25.242-b08, mixed mode)
*  OS:   Linux 4.9.0-9-amd64 x86_64
*  cc:   cc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
*  make: GNU Make 4.1
*  OpenSSL:  OpenSSL 1.1.1 11 Sep 2018
*  APR:  1.5.2
*
* Valid SHA-512 signature for apache-tomcat-8.5.54.zip
* Valid GPG signature for apache-tomcat-8.5.54.zip
* Valid SHA-512 signature for apache-tomcat-8.5.54.tar.gz
* Valid GPG signature for apache-tomcat-8.5.54.tar.gz
* Valid SHA-512 signature for apache-tomcat-8.5.54.exe
* Valid GPG signature for apache-tomcat-8.5.54.exe
* Valid SHA512 signature for apache-tomcat-8.5.54-src.zip
* Valid GPG signature for apache-tomcat-8.5.54-src.zip
* Valid SHA512 signature for apache-tomcat-8.5.54-src.tar.gz
* Valid GPG signature for apache-tomcat-8.5.54-src.tar.gz
*
* Binary Zip and tarball: Same
* Source Zip and tarball: Same
*
* Building dependencies returned: 0
* tcnative builds cleanly
* Tomcat builds cleanly
* Junit Tests: FAILED
*
* Tests that failed:
* org.apache.tomcat.util.net.openssl.ciphers.TestCipher.APR.txt
* org.apache.tomcat.util.net.openssl.ciphers.TestCipher.NIO.txt
* org.apache.tomcat.util.net.openssl.ciphers.TestCipher.NIO2.txt
*
org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfiguratio
nParser.APR.txt
*
org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfiguratio
nParser.NIO.txt
*
org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfiguratio
nParser.NIO2.txt
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl6LgHYACgkQHPApP6U8
pFi8IRAAgEGPSynl9JqlDEko2mwGmq7EUBZLU6pfWI4XqabCbloMt3YpIBzLdNEs
67YOz4Dai+NokIEQH+T1hrRh+jhLP7U1vMaCnqHIly2p1uyMkA3TTz3w1kRTSa3F
tTYPXPtF3baLpP0mQ5vCgRkrpdvj1tIebOue3wTq4wUV60kPqlSWYuDHM6B1xGsc
uXO1PMWWt/4EVJKn9ZOFcT9PhJJHlFHSdjj9tT3HNzxoEGfYrNUHmbx5DFdlSe4X
E8ljUNDC/4LBvqbQGUeoKQbHYVYuOqGzPJaeB2Bwe5iQ+jXwk4qFcT4BmIax7Z2u
IXpu932skTLADVdbvo/TohtOivCfpQZUKIFDkuL3+9iKTPVq8eRSprZU2wYta482
6cXe8clbprn0hcVQVFCQ8fRff8Bqq0jiVfHekFLWRbuAI5h495DeZrFT1CBj7Hux
foEFH5j5N3YCkfzeQVuM4NX7X8Ro2LgGxNQi+QTG4ue7X1kgw4E3p90DpmzajmDM
f40O5DGy4Fh5LMvXxgpLmpnV7aPVoNu+jSsHAM+BP9RrklxhQoOht3ONyoZ2AHm2
ZWgePzkoCC71MNSip4SUhC0z+GTVMOa3vZdg8BWf7KmfNCpsYHHbPyIB32Fh8pxF
Ic7jaWpFskPa6tKjs01OecB2JrZQPS4+zVuuLZ+UZrpQc+ylC6A=
=NRry
-END PGP SIGNATURE-

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



[GitHub] [tomcat] rmaucher commented on issue #267: Remove reflection from Connector.java

2020-04-06 Thread GitBox
rmaucher commented on issue #267: Remove reflection from Connector.java
URL: https://github.com/apache/tomcat/pull/267#issuecomment-609967157
 
 
   The main target of Tomcat remains Tomcat standalone, server.xml and the 
digester. So this means tons of reflection here and there, and I expect it will 
stay that way.
   You're in luck here since the Connector is a mess and some things could be 
improved. You need to continue working on the PR though, as the code changed to 
be less messy already.
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



buildbot success in on tomcat-trunk

2020-04-06 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/5096

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch master] ca66cfd3d6fae198fbcf76be09b3e8f3f8232c0a
Blamelist: Mark Thomas 

Build succeeded!

Sincerely,
 -The Buildbot




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



[tomcat-jakartaee-migration] branch master updated: Added a unit test checking the migration of a single source file

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new f6294dd  Added a unit test checking the migration of a single source 
file
f6294dd is described below

commit f6294dd5583e2912eac533adec8a8ee3aefb260d
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 19:52:21 2020 +0200

Added a unit test checking the migration of a single source file
---
 pom.xml|  8 +
 .../org/apache/tomcat/jakartaee/MigrationTest.java | 40 ++
 src/test/resources/HelloServlet.java   | 30 
 3 files changed, 78 insertions(+)

diff --git a/pom.xml b/pom.xml
index 8ba872a..dfbbaf2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,6 +76,14 @@
   commons-io
   2.6
 
+
+
+
+  junit
+  junit
+  4.13
+  test
+
   
 
   
diff --git a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java 
b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
new file mode 100644
index 000..a531d1d
--- /dev/null
+++ b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tomcat.jakartaee;
+
+import java.io.File;
+
+import org.apache.commons.io.FileUtils;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class MigrationTest {
+
+@Test
+public void testMigrateSingleSourceFile() throws Exception {
+File migratedFile = new 
File("target/test-classes/HelloServlet.migrated.java");
+Migration.main(new String[] {"target/test-classes/HelloServlet.java", 
migratedFile.getAbsolutePath()});
+
+assertTrue("Migrated file not found", migratedFile.exists());
+
+String migratedSource = FileUtils.readFileToString(migratedFile);
+assertFalse("Imports not migrated", migratedSource.contains("import 
javax.servlet"));
+assertTrue("Migrated imports not found", 
migratedSource.contains("import jakarta.servlet"));
+}
+}
diff --git a/src/test/resources/HelloServlet.java 
b/src/test/resources/HelloServlet.java
new file mode 100644
index 000..4ab645c
--- /dev/null
+++ b/src/test/resources/HelloServlet.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.GenericServlet;
+
+public class HelloServlet extends GenericServlet {
+
+public void service(ServletRequest request, ServletResponse response) 
throws IOException, ServletException {
+response.setContentType("text/plain");
+response.getWriter().print("Hello JakartaEE!");
+}
+}


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



[Bug 63671] libtcnative does not compile with OpenSSL < 1.1.0 and APR w/o threading support

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63671

--- Comment #5 from Michael Osipov  ---
(In reply to Mark Thomas from comment #2)
> I think INVALID would have been a better resolution here. OpenSSL 1.1.0 and
> earlier are no longer supported.
> 
> There are probably still OpenSSL 1.1.0 and earlier specific workarounds in
> the Tomcat Native code base. We should be removing that cruft rather than
> continuing to fix build issues with unsupported OpenSSL versions.

I concur because many OS vendors still bundle 1.0.2 and provide fixes to those.
Only upstream is not supported anymore. E.g., default OpenSSL on RHEL 7 is
still 1.0.2, as sad as it sounds.

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



Re: API Change - Connector.java Constructor

2020-04-06 Thread Filip Hanik
On Mon, Apr 6, 2020 at 11:20 AM Mark Thomas  wrote:

> On 06/04/2020 17:56, Filip Hanik wrote:
> > Team,
> >
> > As I'm slowly transitioning between projects, Apache Tomcat has once
> > again showed up in my workspace. I'm currently working on improving the
> > embedded experience for native images.
> >
> > I have a pull request,[1] ,
> > that I'd like to open up a discussion about
> >
> > Goal: Able to start embedded Apache Tomcat without using reflection.
>
> Do you have a test case you are working to? It would be helpful to see
> exactly where the problems are in terms of what is considered reflection
> and what isn't.
>

Yes, I'm working on a sample that should demonstrate it.


> On that point, can we tell the tooling that reflection isn't used even
> if the automated analysis can't tell that? I'm thinking of something
> along the lines of ensuring that most execution paths - including
> embedded - avoid reflection. We should, hopefully, be able to document
> the scenarios where reflection is triggered so users know to avoid them.
>
> > This PR: Changes the constructor for Connector to not use reflection.
> > Instead the calling components will instantiate the ProtocolHandler
> >
> > Besides the constructor change, functionality should remain backwards
> > compatible.
>
> I am very uncomfortable changing the constructor for a fundamental
> component like Connector this far into a stable release - hence wanting
> to explore options.
>

Noted, I think a compromise may be in order. Where we simply add a
constructor that avoids the Class.forName
and that allows the developer to explicitly invoke a constructor that
avoids it.

Filip


[Bug 63671] libtcnative does not compile with OpenSSL < 1.1.0 and APR w/o threading support

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63671

--- Comment #6 from Michael Osipov  ---
(In reply to Michael Osipov from comment #5)
> (In reply to Mark Thomas from comment #2)
> > I think INVALID would have been a better resolution here. OpenSSL 1.1.0 and
> > earlier are no longer supported.
> > 
> > There are probably still OpenSSL 1.1.0 and earlier specific workarounds in
> > the Tomcat Native code base. We should be removing that cruft rather than
> > continuing to fix build issues with unsupported OpenSSL versions.
> 
> I concur because many OS vendors still bundle 1.0.2 and provide fixes to
> those. Only upstream is not supported anymore. E.g., default OpenSSL on RHEL
> 7 is still 1.0.2, as sad as it sounds.

Here is the ref: https://access.redhat.com/discussions/4285911

I think that a potentional libtcnative 2.0 can drop pre-1.1.1 support.

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



[tomcat-native] branch master updated: Bug 64315: configure output for OpenSSL wrong/incomplete sometimes

2020-04-06 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new ebd4e93  Bug 64315: configure output for OpenSSL wrong/incomplete 
sometimes
ebd4e93 is described below

commit ebd4e932b05b46b99795d8db8bfdcfc788e031c6
Author: Michael Osipov 
AuthorDate: Mon Apr 6 22:32:51 2020 +0200

Bug 64315: configure output for OpenSSL wrong/incomplete sometimes

Set $ssllibdir in all cases not just the non-default ones.
---
 native/build/tcnative.m4  | 4 +++-
 xdocs/miscellaneous/changelog.xml | 4 
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/native/build/tcnative.m4 b/native/build/tcnative.m4
index 23e3010..3047371 100644
--- a/native/build/tcnative.m4
+++ b/native/build/tcnative.m4
@@ -204,18 +204,20 @@ case "$use_openssl" in
 fi
 USE_OPENSSL='-DOPENSSL'
 
+test -d $use_openssl/lib64 && ssllibdir=lib64 || ssllibdir=lib
 if test "$use_openssl" = "/usr"
 then
 TCN_OPENSSL_INC=""
 TCN_OPENSSL_LIBS="-lssl -lcrypto"
 else
 TCN_OPENSSL_INC="-I$use_openssl/include"
-test -d $use_openssl/lib64 && ssllibdir=lib64 || ssllibdir=lib
 case $host in
 *-solaris*)
 TCN_OPENSSL_LIBS="-L$use_openssl/$ssllibdir 
-R$use_openssl/$ssllibdir -lssl -lcrypto"
 ;;
 *-hp-hpux*)
+# By default cc/aCC on HP-UX IA64 will produce 32 bit output
+ssllibdir=lib/hpux32
 TCN_OPENSSL_LIBS="-L$use_openssl/$ssllibdir -Wl,+b: -lssl 
-lcrypto"
 ;;
 *linux*)
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 7ce5696..9a89667 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -46,6 +46,10 @@
 
   64260: Clean up install target. (michaelo)
 
+
+  64315: configure output for OpenSSL wrong/incomplete 
sometimes.
+  (michaelo)
+
 
   Drop obsolete build time workarounds for HP-UX. (michaelo)
 


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



[Bug 64315] configure output for OpenSSL wrong/incomplete sometimes

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64315

Michael Osipov  changed:

   What|Removed |Added

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

--- Comment #2 from Michael Osipov  ---
Fix in 1.2.24 and 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



Re: sources repository for taglibs-standard-impl/specs-1.2.5-migrated-0.0.1

2020-04-06 Thread Olivier Lamy
Hi
This weekend I have started running this on a server

svn2git https://svn.apache.org/repos/asf/tomcat/taglibs/standard/

It may take few days to finish...

Working with a svndump might be easier. Do you know if INFRA can provide
this?

On Sat, 28 Mar 2020 at 20:58, Olivier Lamy  wrote:

>
>
> On Fri, 27 Mar 2020 at 20:01, Mark Thomas  wrote:
>
>> On 27/03/2020 04:58, Olivier Lamy wrote:
>> > Hi
>> > We have to move this https://svn.apache.org/repos/asf/tomcat/taglibs/
>> > to git.
>> > As it's few separate Maven projects, maybe we could create one git repo
>> > per project:
>> > - https://github.com/apache/tomcat-taglibs-site
>> > - https://github.com/apache/tomcat-taglibs-standard (standard-examples
>> > can be integrated in standard source tree but not part of the release
>> > just here for documentation purpose)
>> > - https://github.com/apache/tomcat-taglibs-parent
>> >
>> > - https://github.com/apache/tomcat-taglibs can contain some modules to
>> > ease clone of only git repo (or maybe we simply put the site here) I
>> > don't have strong opinion for this
>> >
>> > Do we still need rdc?
>>
>> The above seems reasonable to me but I have never worked on taglibs so
>> my opinion shouldn't count for much.
>>
>> > during the migration each tags/branches (if any) will be integrated in
>> > the created git repo
>>
>> This is the bit that interests me. I know from experience with previous
>> Tomcat projects that the svn -> git migration for a project that has
>> previously gone through an cvs -> svn migration is very slow. It took
>> over a week to process the Tomcat Connectors project. This is because
>> the migration tool ends up searching back through the history repeatedly
>> for each tag.
>>
>> I might be able to help put by running the migration directly on one of
>> the ASF servers. I'll need to talk to infra if we want to try that route.
>>
>
> Great. Let me know if you need any help?
>
>
>>
>> Mark
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>>
>>
>
> --
> Olivier Lamy
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>


-- 
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy


[tomcat-jakartaee-migration] 10/10: Test invalid options

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit c4e5c1840652d44523b38b49c3057187bfef0efb
Author: Emmanuel Bourg 
AuthorDate: Tue Apr 7 02:52:51 2020 +0200

Test invalid options
---
 .../org/apache/tomcat/jakartaee/MigrationTest.java | 25 +++
 .../tomcat/jakartaee/NoExitSecurityManager.java| 36 ++
 2 files changed, 61 insertions(+)

diff --git a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java 
b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
index 80e595d..8ed7f81 100644
--- a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
+++ b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
@@ -20,12 +20,24 @@ package org.apache.tomcat.jakartaee;
 import java.io.File;
 
 import org.apache.commons.io.FileUtils;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
 
 public class MigrationTest {
 
+@Before
+public void setUp() {
+System.setSecurityManager(new NoExitSecurityManager());
+}
+
+@After
+public void tearDown() {
+System.setSecurityManager(null);
+}
+
 @Test
 public void testMigrateSingleSourceFile() throws Exception {
 File migratedFile = new 
File("target/test-classes/HelloServlet.migrated.java");
@@ -64,4 +76,17 @@ public class MigrationTest {
 assertFalse("Imports not migrated", migratedSource.contains("import 
javax.servlet"));
 assertTrue("Migrated imports not found", 
migratedSource.contains("import jakarta.servlet"));
 }
+
+@Test
+public void testInvalidOption() throws Exception {
+File sourceFile = new File("target/test-classes/HelloServlet.java");
+File migratedFile = new 
File("target/test-classes/HelloServlet.migrated.java");
+
+try {
+Migration.main(new String[] {"-invalid", 
sourceFile.getAbsolutePath(), migratedFile.getAbsolutePath()});
+fail("No error code returned");
+} catch (SecurityException e) {
+assertEquals("error code", "1", e.getMessage());
+}
+}
 }
diff --git 
a/src/test/java/org/apache/tomcat/jakartaee/NoExitSecurityManager.java 
b/src/test/java/org/apache/tomcat/jakartaee/NoExitSecurityManager.java
new file mode 100644
index 000..446e96c
--- /dev/null
+++ b/src/test/java/org/apache/tomcat/jakartaee/NoExitSecurityManager.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tomcat.jakartaee;
+
+import java.security.Permission;
+
+public class NoExitSecurityManager extends SecurityManager {
+
+@Override
+public void checkPermission(Permission perm) {
+}
+
+@Override
+public void checkPermission(Permission perm, Object context) {
+}
+
+@Override
+public void checkExit(int status) {
+throw new SecurityException("" + status);
+}
+}


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



[tomcat-jakartaee-migration] 04/10: Renamed getEESpecLevel() to getEESpecProfile()

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit e58d4c5f5f13cfa7221cea762e046ee9df7c4936
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 23:16:29 2020 +0200

Renamed getEESpecLevel() to getEESpecProfile()
---
 src/main/java/org/apache/tomcat/jakartaee/Migration.java | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/Util.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index e671b98..dcaec1e 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -76,7 +76,7 @@ public class Migration {
 
 public boolean execute() throws IOException {
 logger.log(Level.INFO, sm.getString("migration.execute", 
source.getAbsolutePath(),
-destination.getAbsolutePath(), 
Util.getEESpecLevel().toString()));
+destination.getAbsolutePath(), 
Util.getEESpecProfile().toString()));
 boolean result = true;
 long t1 = System.nanoTime();
 if (source.isDirectory()) {
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Util.java 
b/src/main/java/org/apache/tomcat/jakartaee/Util.java
index b879e92..af0bb12 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Util.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Util.java
@@ -44,7 +44,7 @@ public class Util {
  * Get the Jakarta EE profile being used.
  * @return the profile
  */
-public static EESpecProfile getEESpecLevel() {
+public static EESpecProfile getEESpecProfile() {
 return profile;
 }
 


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



[tomcat-jakartaee-migration] 06/10: Added a -verbose option

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit ec703144edb902b1db9f7298165684fd912e45f8
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 23:47:43 2020 +0200

Added a -verbose option
---
 .../org/apache/tomcat/jakartaee/Migration.java | 24 ++
 .../org/apache/tomcat/jakartaee/MigrationTest.java |  2 +-
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index 5c8d41b..75d3007 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -256,27 +257,34 @@ public class Migration {
 public static void main(String[] args) {
 System.setProperty("java.util.logging.SimpleFormatter.format", 
"%5$s%n");
 
+List arguments = new ArrayList<>(Arrays.asList(args));
+if (arguments.contains("-verbose")) {
+
Logger.getGlobal().getParent().getHandlers()[0].setLevel(Level.FINE);
+Logger.getGlobal().getParent().setLevel(Level.FINE);
+arguments.remove("-verbose");
+}
+
 Migration migration = new Migration();
 
 boolean valid = false;
 String source = null;
 String dest = null;
-if (args.length == 3) {
-if (args[0].startsWith(PROFILE_ARG)) {
-source = args[1];
-dest = args[2];
+if (arguments.size() == 3) {
+if (arguments.get(0).startsWith(PROFILE_ARG)) {
+source = arguments.get(1);
+dest = arguments.get(2);
 valid = true;
 try {
-
migration.setEESpecProfile(EESpecProfile.valueOf(args[0].substring(PROFILE_ARG.length(;
+
migration.setEESpecProfile(EESpecProfile.valueOf(arguments.get(0).substring(PROFILE_ARG.length(;
 } catch (IllegalArgumentException e) {
 // Invalid profile value
 valid = false;
 }
 }
 }
-if (args.length == 2) {
-source = args[0];
-dest = args[1];
+if (arguments.size() == 2) {
+source = arguments.get(0);
+dest = arguments.get(1);
 valid = true;
 }
 if (!valid) {
diff --git a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java 
b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
index fa0fa74..5ddda03 100644
--- a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
+++ b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
@@ -41,7 +41,7 @@ public class MigrationTest {
 @Test
 public void testMigrateSingleSourceFileWithProfile() throws Exception {
 File migratedFile = new 
File("target/test-classes/HelloServlet.migrated.java");
-Migration.main(new String[] {"-profile=EE", 
"target/test-classes/HelloServlet.java", migratedFile.getAbsolutePath()});
+Migration.main(new String[] {"-verbose", "-profile=EE", 
"target/test-classes/HelloServlet.java", migratedFile.getAbsolutePath()});
 
 assertTrue("Migrated file not found", migratedFile.exists());
 


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



[tomcat-jakartaee-migration] 09/10: Moved common stream operation methods to the Util class

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit 884aa46156a8d12634737e4bf1d73c3afc8cd51c
Author: Emmanuel Bourg 
AuthorDate: Tue Apr 7 02:37:29 2020 +0200

Moved common stream operation methods to the Util class
---
 .../tomcat/jakartaee/PassThroughConverter.java |  6 +-
 .../org/apache/tomcat/jakartaee/TextConverter.java | 22 --
 .../java/org/apache/tomcat/jakartaee/Util.java | 21 +
 3 files changed, 26 insertions(+), 23 deletions(-)

diff --git 
a/src/main/java/org/apache/tomcat/jakartaee/PassThroughConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/PassThroughConverter.java
index 9b44ca5..24c01f9 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/PassThroughConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/PassThroughConverter.java
@@ -31,10 +31,6 @@ public class PassThroughConverter implements Converter {
 @Override
 public void convert(InputStream src, OutputStream dest, EESpecProfile 
profile) throws IOException {
 // This simply copies the source to the destination
-byte[] buf = new byte[8192];
-int numRead;
-while ((numRead = src.read(buf)) >= 0) {
-dest.write(buf, 0, numRead);
-}
+Util.copy(src, dest);
 }
 }
diff --git a/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
index e0fdc2f..5ad1b0b 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
@@ -17,7 +17,6 @@
 package org.apache.tomcat.jakartaee;
 
 import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -60,25 +59,12 @@ public class TextConverter implements Converter {
  */
 @Override
 public void convert(InputStream src, OutputStream dest, EESpecProfile 
profile) throws IOException {
-ByteArrayOutputStream baos = new ByteArrayOutputStream();
-flow(src, baos);
-
-String srcString = new String(baos.toByteArray(), 
StandardCharsets.ISO_8859_1);
-
+String srcString = Util.toString(src, StandardCharsets.ISO_8859_1);
 String destString = profile.convert(srcString);
 
-ByteArrayInputStream bais = new 
ByteArrayInputStream(destString.getBytes(StandardCharsets.ISO_8859_1));
-flow (bais, dest);
-}
-
+dest.write(destString.getBytes());
 
-private static void flow(InputStream is, OutputStream os) throws 
IOException {
-byte[] buf = new byte[8192];
-int numRead;
-while ( (numRead = is.read(buf) ) >= 0) {
-if (os != null) {
-os.write(buf, 0, numRead);
-}
-}
+ByteArrayInputStream bais = new 
ByteArrayInputStream(destString.getBytes(StandardCharsets.ISO_8859_1));
+Util.copy(bais, dest);
 }
 }
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Util.java 
b/src/main/java/org/apache/tomcat/jakartaee/Util.java
index edd7203..7189d8a 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Util.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Util.java
@@ -16,6 +16,12 @@
  */
 package org.apache.tomcat.jakartaee;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 import java.util.Locale;
 
 public class Util {
@@ -36,6 +42,21 @@ public class Util {
 return filename.substring(lastPeriod + 1).toLowerCase(Locale.ENGLISH);
 }
 
+public static void copy(InputStream is, OutputStream os) throws 
IOException {
+byte[] buf = new byte[8192];
+int numRead;
+while ( (numRead = is.read(buf) ) >= 0) {
+os.write(buf, 0, numRead);
+}
+}
+
+public static String toString(InputStream is, Charset charset) throws 
IOException {
+ByteArrayOutputStream baos = new ByteArrayOutputStream();
+Util.copy(is, baos);
+
+return new String(baos.toByteArray(), StandardCharsets.ISO_8859_1);
+}
+
 private Util() {
 // Hide default constructor. Utility class.
 }


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



[tomcat-jakartaee-migration] 07/10: Renamed NoOpConverter to PassThroughConverter

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit 3618367bef264a5f34ff7eb046843dee1397a91e
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 23:51:32 2020 +0200

Renamed NoOpConverter to PassThroughConverter
---
 src/main/java/org/apache/tomcat/jakartaee/Migration.java  | 4 ++--
 .../jakartaee/{NoOpConverter.java => PassThroughConverter.java}   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index 75d3007..422e723 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -57,8 +57,8 @@ public class Migration {
 converters.add(new TextConverter());
 converters.add(new ClassConverter());
 
-// Final converter is the NoOpConverter
-converters.add(new NoOpConverter());
+// Final converter is the pass-through converter
+converters.add(new PassThroughConverter());
 }
 
 /**
diff --git a/src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/PassThroughConverter.java
similarity index 96%
rename from src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java
rename to src/main/java/org/apache/tomcat/jakartaee/PassThroughConverter.java
index aeedb00..9b44ca5 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/PassThroughConverter.java
@@ -20,7 +20,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-public class NoOpConverter implements Converter {
+public class PassThroughConverter implements Converter {
 
 @Override
 public boolean accepts(String filename) {


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



[tomcat-jakartaee-migration] 08/10: Support inplace file migration

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit f69a7d986c0105d392ac3b33f2717a6a6263ce5d
Author: Emmanuel Bourg 
AuthorDate: Tue Apr 7 01:16:49 2020 +0200

Support inplace file migration
---
 .../org/apache/tomcat/jakartaee/Migration.java | 26 +++---
 .../org/apache/tomcat/jakartaee/MigrationTest.java | 15 +
 2 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index 422e723..4ba79bd 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -16,6 +16,7 @@
  */
 package org.apache.tomcat.jakartaee;
 
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -144,10 +145,29 @@ public class Migration {
 
 
 private boolean migrateFile(File src, File dest) throws IOException {
-try (InputStream is = new FileInputStream(src);
-OutputStream os = new FileOutputStream(dest)) {
-return migrateStream(src.getName(), is, os);
+boolean result = false;
+
+boolean inplace = src.equals(dest);
+if (!inplace) {
+try (InputStream is = new FileInputStream(src);
+ OutputStream os = new FileOutputStream(dest)) {
+result = migrateStream(src.getName(), is, os);
+}
+} else {
+File tmp = new File(dest.getParentFile(), dest.getName() + ".tmp");
+
+ByteArrayOutputStream buffer = new ByteArrayOutputStream((int) 
(src.length() * 1.05));
+
+try (InputStream is = new FileInputStream(src)) {
+result = migrateStream(src.getName(), is, buffer);
+}
+
+try (OutputStream os = new FileOutputStream(dest)) {
+os.write(buffer.toByteArray());
+}
 }
+
+return result;
 }
 
 
diff --git a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java 
b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
index 5ddda03..80e595d 100644
--- a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
+++ b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
@@ -49,4 +49,19 @@ public class MigrationTest {
 assertFalse("Imports not migrated", migratedSource.contains("import 
javax.servlet"));
 assertTrue("Migrated imports not found", 
migratedSource.contains("import jakarta.servlet"));
 }
+
+@Test
+public void testMigrateSingleSourceFileInPlace() throws Exception {
+File sourceFile = new File("target/test-classes/HelloServlet.java");
+File migratedFile = new 
File("target/test-classes/HelloServlet.inplace.java");
+FileUtils.copyFile(sourceFile, migratedFile);
+
+Migration.main(new String[] {"-profile=EE", 
migratedFile.getAbsolutePath(), migratedFile.getAbsolutePath()});
+
+assertTrue("Migrated file not found", migratedFile.exists());
+
+String migratedSource = FileUtils.readFileToString(migratedFile);
+assertFalse("Imports not migrated", migratedSource.contains("import 
javax.servlet"));
+assertTrue("Migrated imports not found", 
migratedSource.contains("import jakarta.servlet"));
+}
 }


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



[tomcat-jakartaee-migration] 02/10: Test with an alternative profile

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit 07b9ad1bb056706922985b9f6eb3a13bc11b98cd
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 23:01:41 2020 +0200

Test with an alternative profile
---
 src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java | 12 
 1 file changed, 12 insertions(+)

diff --git a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java 
b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
index a531d1d..fa0fa74 100644
--- a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
+++ b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
@@ -37,4 +37,16 @@ public class MigrationTest {
 assertFalse("Imports not migrated", migratedSource.contains("import 
javax.servlet"));
 assertTrue("Migrated imports not found", 
migratedSource.contains("import jakarta.servlet"));
 }
+
+@Test
+public void testMigrateSingleSourceFileWithProfile() throws Exception {
+File migratedFile = new 
File("target/test-classes/HelloServlet.migrated.java");
+Migration.main(new String[] {"-profile=EE", 
"target/test-classes/HelloServlet.java", migratedFile.getAbsolutePath()});
+
+assertTrue("Migrated file not found", migratedFile.exists());
+
+String migratedSource = FileUtils.readFileToString(migratedFile);
+assertFalse("Imports not migrated", migratedSource.contains("import 
javax.servlet"));
+assertTrue("Migrated imports not found", 
migratedSource.contains("import jakarta.servlet"));
+}
 }


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



[tomcat-jakartaee-migration] 01/10: One line log messages when running from the command line

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit c8afe9b579d312d8dc7f1be97e158e304c1230b4
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 22:45:12 2020 +0200

One line log messages when running from the command line
---
 src/main/java/org/apache/tomcat/jakartaee/Migration.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index 5d8fdf1..e671b98 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -236,6 +236,8 @@ public class Migration {
 private static final String PROFILE_ARG = "-profile=";
 
 public static void main(String[] args) {
+System.setProperty("java.util.logging.SimpleFormatter.format", 
"%5$s%n");
+
 boolean valid = false;
 String source = null;
 String dest = null;


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



[tomcat-jakartaee-migration] 03/10: Moved EESpecProfile to the top level

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit 703262fce1cf10af87715696e38d3e6328594f0d
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 23:13:00 2020 +0200

Moved EESpecProfile to the top level
---
 .../org/apache/tomcat/jakartaee/EESpecProfile.java | 44 ++
 .../java/org/apache/tomcat/jakartaee/Util.java | 18 +
 2 files changed, 45 insertions(+), 17 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java 
b/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
new file mode 100644
index 000..3d77867
--- /dev/null
+++ b/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tomcat.jakartaee;
+
+import java.util.regex.Pattern;
+
+/**
+ * Specification profile defining the replacements performed.
+ */
+public enum EESpecProfile {
+
+
TOMCAT("javax([/\\.](annotation|ejb|el|mail|persistence|security[/\\.]auth[/\\.]message|servlet|transaction|websocket))"),
+
+
EE("javax([/\\.](activation|annotation|decorator|ejb|el|enterprise|json|interceptor|inject|mail|persistence|"
++ 
"security[/\\.]auth[/\\.]message|servlet|transaction|validation|websocket|ws[/\\.]rs|"
++ 
"xml[/\\.](bind|namespace|rpc|soap|stream|ws|XMLConstants)))");
+
+private Pattern pattern;
+
+EESpecProfile(String pattern) {
+this.pattern = Pattern.compile(pattern);
+}
+
+/**
+ * Return the replacement pattern for this profile.
+ */
+public Pattern getPattern() {
+return pattern;
+}
+}
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Util.java 
b/src/main/java/org/apache/tomcat/jakartaee/Util.java
index 2a2ae81..b879e92 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Util.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Util.java
@@ -22,18 +22,7 @@ import java.util.regex.Pattern;
 
 public class Util {
 
-public enum EESpecProfile { TOMCAT, EE };
-
-private static final Pattern TOMCAT_PATTERN = Pattern.compile(
-
"javax([/\\.](annotation|ejb|el|mail|persistence|security[/\\.]auth[/\\.]message|servlet|transaction|websocket))");
-
-private static final Pattern EE_PATTERN = Pattern.compile(
-
"javax([/\\.](activation|annotation|decorator|ejb|el|enterprise|json|interceptor|inject|mail|persistence|"
-+ 
"security[/\\.]auth[/\\.]message|servlet|transaction|validation|websocket|ws[/\\.]rs|"
-+ "xml[/\\.](bind|namespace|rpc|soap|stream|ws|XMLConstants)))");
-
 private static EESpecProfile profile = EESpecProfile.TOMCAT;
-private static Pattern pattern = TOMCAT_PATTERN;
 
 /**
  * Set the Jakarta EE specifications that should be used.
@@ -49,11 +38,6 @@ public class Util {
  */
 public static void setEESpecProfile(EESpecProfile profile) {
 Util.profile = profile;
-if (profile == EESpecProfile.TOMCAT) {
-pattern = TOMCAT_PATTERN;
-} else if (profile == EESpecProfile.EE) {
-pattern = EE_PATTERN;
-}
 }
 
 /**
@@ -82,7 +66,7 @@ public class Util {
 
 
 public static String convert(String name) {
-Matcher m = pattern.matcher(name);
+Matcher m = profile.getPattern().matcher(name);
 return m.replaceAll("jakarta$1");
 }
 


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



[tomcat-jakartaee-migration] branch master updated (397ff8a -> c4e5c18)

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a change to branch master
in repository 
https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git.


from 397ff8a  Travis integration
 new c8afe9b  One line log messages when running from the command line
 new 07b9ad1  Test with an alternative profile
 new 703262f  Moved EESpecProfile to the top level
 new e58d4c5  Renamed getEESpecLevel() to getEESpecProfile()
 new 39ada70  Turned the migration profile into an instance field of the 
Migration class
 new ec70314  Added a -verbose option
 new 3618367  Renamed NoOpConverter to PassThroughConverter
 new f69a7d9  Support inplace file migration
 new 884aa46  Moved common stream operation methods to the Util class
 new c4e5c18  Test invalid options

The 10 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:
 .../apache/tomcat/jakartaee/ClassConverter.java|  4 +-
 .../org/apache/tomcat/jakartaee/Converter.java |  2 +-
 .../org/apache/tomcat/jakartaee/EESpecProfile.java | 50 +
 .../org/apache/tomcat/jakartaee/Migration.java | 84 +-
 ...oOpConverter.java => PassThroughConverter.java} | 10 +--
 .../org/apache/tomcat/jakartaee/TextConverter.java | 24 ++-
 .../java/org/apache/tomcat/jakartaee/Util.java | 66 +
 .../org/apache/tomcat/jakartaee/MigrationTest.java | 52 ++
 .../tomcat/jakartaee/NoExitSecurityManager.java}   | 64 +
 9 files changed, 234 insertions(+), 122 deletions(-)
 create mode 100644 src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
 rename src/main/java/org/apache/tomcat/jakartaee/{NoOpConverter.java => 
PassThroughConverter.java} (79%)
 copy src/{main/java/org/apache/tomcat/jakartaee/Converter.java => 
test/java/org/apache/tomcat/jakartaee/NoExitSecurityManager.java} (67%)


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



[tomcat-jakartaee-migration] 05/10: Turned the migration profile into an instance field of the Migration class

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit 39ada7099918e7f571e4119b200e79f242cf72a2
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 23:28:39 2020 +0200

Turned the migration profile into an instance field of the Migration class
---
 .../apache/tomcat/jakartaee/ClassConverter.java|  4 +--
 .../org/apache/tomcat/jakartaee/Converter.java |  2 +-
 .../org/apache/tomcat/jakartaee/EESpecProfile.java |  6 
 .../org/apache/tomcat/jakartaee/Migration.java | 30 +++
 .../org/apache/tomcat/jakartaee/NoOpConverter.java |  2 +-
 .../org/apache/tomcat/jakartaee/TextConverter.java |  4 +--
 .../java/org/apache/tomcat/jakartaee/Util.java | 35 --
 7 files changed, 37 insertions(+), 46 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
index 4bb..9d398d7 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
@@ -35,7 +35,7 @@ public class ClassConverter implements Converter {
 
 
 @Override
-public void convert(InputStream src, OutputStream dest) throws IOException 
{
+public void convert(InputStream src, OutputStream dest, EESpecProfile 
profile) throws IOException {
 
 ClassParser parser = new ClassParser(src, "unknown");
 JavaClass javaClass = parser.parse();
@@ -46,7 +46,7 @@ public class ClassConverter implements Converter {
 if (constantPool[i] instanceof ConstantUtf8) {
 ConstantUtf8 c = (ConstantUtf8) constantPool[i];
 String str = c.getBytes();
-c = new ConstantUtf8(Util.convert(str));
+c = new ConstantUtf8(profile.convert(str));
 constantPool[i] = c;
 }
 }
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Converter.java 
b/src/main/java/org/apache/tomcat/jakartaee/Converter.java
index f3d62ec..92ef1dd 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Converter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Converter.java
@@ -24,5 +24,5 @@ public interface Converter {
 
 boolean accepts(String filename);
 
-void convert(InputStream src, OutputStream dest) throws IOException;
+void convert(InputStream src, OutputStream dest, EESpecProfile profile) 
throws IOException;
 }
diff --git a/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java 
b/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
index 3d77867..45aed81 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/EESpecProfile.java
@@ -16,6 +16,7 @@
  */
 package org.apache.tomcat.jakartaee;
 
+import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 /**
@@ -41,4 +42,9 @@ public enum EESpecProfile {
 public Pattern getPattern() {
 return pattern;
 }
+
+public String convert(String name) {
+Matcher m = pattern.matcher(name);
+return m.replaceAll("jakarta$1");
+}
 }
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index dcaec1e..5c8d41b 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -44,6 +44,7 @@ public class Migration {
 private static final Logger logger = 
Logger.getLogger(Migration.class.getCanonicalName());
 private static final StringManager sm = 
StringManager.getManager(Migration.class);
 
+private EESpecProfile profile = EESpecProfile.TOMCAT;
 private File source;
 private File destination;
 private final List converters;
@@ -59,6 +60,23 @@ public class Migration {
 converters.add(new NoOpConverter());
 }
 
+/**
+ * Set the Jakarta EE specifications that should be used.
+ *
+ * @param profile the Jakarta EE specification profile
+ */
+public void setEESpecProfile(EESpecProfile profile) {
+this.profile = profile;
+}
+
+/**
+ * Get the Jakarta EE profile being used.
+ *
+ * @return the profile
+ */
+public EESpecProfile getEESpecProfile() {
+return profile;
+}
 
 public void setSource(File source) {
 if (!source.canRead()) {
@@ -76,7 +94,7 @@ public class Migration {
 
 public boolean execute() throws IOException {
 logger.log(Level.INFO, sm.getString("migration.execute", 
source.getAbsolutePath(),
-destination.getAbsolutePath(), 
Util.getEESpecProfile().toString()));
+destination.getAbsolutePath(), profile.toString()));
 boolean result = true;
 long t1 = System.nanoTime();
 if (source.isDirectory()) {
@@ 

[Bug 64314] New: Tomcat 9.0.31 Manager Server Status Errors. javax.management.AttributeNotFoundException: Cannot find attribute [maxThreads] on resource [org.apache.tomcat.util.net.SocketProperties@7d

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64314

Bug ID: 64314
   Summary: Tomcat 9.0.31 Manager Server Status Errors.
javax.management.AttributeNotFoundException: Cannot
find attribute [maxThreads] on resource
[org.apache.tomcat.util.net.SocketProperties@7d396ec1]
   Product: Tomcat 9
   Version: 9.0.31
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Manager
  Assignee: dev@tomcat.apache.org
  Reporter: 372669...@qq.com
  Target Milestone: -

Created attachment 37146
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37146=edit
Error message

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



Re: [tomcat-native] branch BZ-63671 created (now b73ecc1)

2020-04-06 Thread Rémy Maucherat
On Mon, Apr 6, 2020 at 1:22 PM  wrote:

> This is an automated email from the ASF dual-hosted git repository.
>
> michaelo pushed a change to branch BZ-63671
> in repository https://gitbox.apache.org/repos/asf/tomcat-native.git.
>
>
>   at b73ecc1  BZ 63671: libtcnative does not compile with OpenSSL <
> 1.1.0 and APR w/o threading support
>
> This branch includes the following new commits:
>
>  new b73ecc1  BZ 63671: libtcnative does not compile with OpenSSL <
> 1.1.0 and APR w/o threading support
>
> 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.
>

Again: Can you stop using pointless branches ?

Rémy


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


[tomcat-native] branch master updated (57da160 -> b73ecc1)

2020-04-06 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git.


from 57da160  Correct configure message for OpenSSL libdir
 add b73ecc1  BZ 63671: libtcnative does not compile with OpenSSL < 1.1.0 
and APR w/o threading support

No new revisions were added by this update.

Summary of changes:
 java/org/apache/tomcat/jni/Library.java | 2 +-
 native/include/tcn.h| 4 ++--
 native/include/tcn_api.h| 4 ++--
 xdocs/miscellaneous/changelog.xml   | 4 
 4 files changed, 9 insertions(+), 5 deletions(-)


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



[Bug 64311] New: org.apache.tomcat.jni.TestSocketServerAnyLocalAddress locks entire testbed run under certain conditions

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64311

Bug ID: 64311
   Summary: org.apache.tomcat.jni.TestSocketServerAnyLocalAddress
locks entire testbed run under certain conditions
   Product: Tomcat 10
   Version: 10.0.0-M3
  Hardware: All
OS: FreeBSD
Status: NEW
  Severity: major
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: micha...@apache.org
  Target Milestone: --

This took me a bit to find. Following happens with:

* Tomcat master/4d5048f9826627ad9f80627bf28ff7b15bd489ac
* Tomcat native from master
* APR from 1.7.x w/o threading support, testing a patch for Bug 63671
* OpenSSL 1.1.1e-freebsd
* OpenJDK 64-Bit Server VM (build 25.242-b07, mixed mode)
* FreeBSD 12.1-STABLE #0 r359195, amd64
* Network settings:
> bge0: flags=8843 metric 0 mtu 1500
> 
> options=c019b
> ether 20:67:7c:d4:58:40
> inet 147.54.64.17 netmask 0xfc00 broadcast 147.54.67.255
> inet 147.54.64.149 netmask 0x broadcast 147.54.64.149
> media: Ethernet autoselect (1000baseT )
> status: active
> nd6 options=29
> lo0: flags=8049 metric 0 mtu 16384
> options=680003
> inet6 ::1 prefixlen 128
> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
> inet 127.0.0.1 netmask 0xff00
> groups: lo
> nd6 options=21
* build.properties contains:
> execute.test.apr=true
> java.net.preferIPv4Stack=true

When the test is started, it completely locks up. No progress. What happens:
* APR binds on any socket, in this case it is:
> $ procstat -f 33340
> 33340 java21 s - rw--   2   0 TCP 0 0 ::.22303 ::.0
* I have applied the following patch to tackle it down:
> diff --git a/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java 
> b/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java
> index 866ba772c5..3e56ebeff3 100644
> --- a/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java
> +++ b/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java
> @@ -127,0 +128 @@ public class TestSocketServerAnyLocalAddress extends 
> AbstractJniTest {
> +System.out.println("Connecting to: " + connectAddress);
> @@ -164,0 +166 @@ public class TestSocketServerAnyLocalAddress extends 
> AbstractJniTest {
> +System.out.println("Listenting at: " + localAddress);
> @@ -188,0 +191 @@ public class TestSocketServerAnyLocalAddress extends 
> AbstractJniTest {
> +System.out.println("from enumeration");
> @@ -197,0 +201 @@ public class TestSocketServerAnyLocalAddress extends 
> AbstractJniTest {
> +System.out.println("from loopback");
> @@ -200,0 +205 @@ public class TestSocketServerAnyLocalAddress extends 
> AbstractJniTest {
> +System.out.println("from linklocal");
> @@ -203,0 +209 @@ public class TestSocketServerAnyLocalAddress extends 
> AbstractJniTest {
> +System.out.println("from localhost");

I see then:
> test-nio2:
> [junit] Running org.apache.tomcat.jni.TestSocketServerAnyLocalAddress in 
> thread 1
> [junit] Listenting at: /0:0:0:0:0:0:0:0:22303
> [junit] java.net.ConnectException: Connection refused (Connection refused)
> [junit] from localhost
> [junit] at java.net.PlainSocketImpl.socketConnect(Native Method)
> [junit] Connecting to: localhost/127.0.0.1:22303
> [junit] at 
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
> [junit] at 
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
> [junit] at 
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> [junit] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> [junit] at java.net.Socket.connect(Socket.java:607)
> [junit] at 
> org.apache.tomcat.jni.TestSocketServerAnyLocalAddress$Client.run(TestSocketServerAnyLocalAddress.java:129)

As soon as I disable the IPv4 preference the connection works on IPv6. Or this
one works with the 10-second timeout:
> $ nc -6 :: 64054

Suprisingly, as soon as I recompile the same APR version with threading support
the behavior of APR changes:
> test-nio2:
> [junit] Running org.apache.tomcat.jni.TestSocketServerAnyLocalAddress in 
> thread 1
> [junit] Listenting at: /0.0.0.0:20726
> [junit] from enumeration
> [junit] Connecting to: /147.54.64.149:20726
> [junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
> 0,03 sec, Thread: 1, Class: 
> org.apache.tomcat.jni.TestSocketServerAnyLocalAddress

So I see two bugs here:
* Tomcat test code does not properly handle APR on IPv6, but Java preference on
IPv4
* APR should not change its behavior when threading is disabled or a bug in
libtcnative?


[Bug 64312] New: Many memberDisappeared messages are logged on all nodes of the cluster with JDK versions 12 or above, even when system is idle

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64312

Bug ID: 64312
   Summary: Many memberDisappeared messages are logged on all
nodes of the cluster with JDK versions 12 or above,
even when system is idle
   Product: Tomcat 8
   Version: 8.5.50
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Cluster
  Assignee: dev@tomcat.apache.org
  Reporter: mahathivavilal...@gmail.com
  Target Milestone: 

When a cluster is installed with  TOMEE 7.0.7 (uses Tomcat 8.5.50.0) with JDK
12 or above only, for default values of frequency (=500) and dropTime (=3000),
many memberDisappeared messages are logged on all nodes of the cluster. This is
occuring even when the system is idle.

The following messages are seen in the logs:

Mar 19, 2020 9:43:56 AM jdk.internal.reflect.DelegatingMethodAccessorImpl
invoke
INFO: Received
memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://{10,
18, 88, 143}:4001,{10, 18, 88, 143},4001, alive=1683768, securePort=-1, UDP
Port=-1, id={-16 81 -2 100 -1 -27 65 77 -100 123 96 -67 -54 -14 107 84 },
payload={}, command={}, domain={}]] message. Will verify.
Mar 19, 2020 9:43:56 AM jdk.internal.reflect.DelegatingMethodAccessorImpl
invoke
INFO: Verification complete. Member still
alive[org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 18, 88,
143}:4001,{10, 18, 88, 143},4001, alive=1683768, securePort=-1, UDP Port=-1,
id={-16 81 -2 100 -1 -27 65 77 -100 123 96 -67 -54 -14 107 84 }, payload={},
command={}, domain={}]]

We have tried to increase the dropTime value to 8500 and observed very few
messages logged in some of the nodes.

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



Re: [VOTE] Release Apache Tomcat 8.5.54

2020-04-06 Thread Rémy Maucherat
On Fri, Apr 3, 2020 at 4:30 PM Mark Thomas  wrote:

> The proposed Apache Tomcat 8.5.54 release is now available for voting.
>
> The major changes compared to the 8.5.53 release are:
>
> - Add support for default values when using ${...} property replacement
>   in configuration files. Based on a pull request provided by Bernd
>   Bohmann.
>
> - When configuring an HTTP Connector, warn if the encoding specified for
>   URIEncoding is not a superset of US-ASCII as required by RFC7230.
>
> - Replace the system property
>   org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH with the
>   Connector attribute encodedSolidusHandling that adds an additional
>   option to pass the %2f sequence through to the application without
>   decoding it in addition to rejecting such sequences and decoding such
>   sequences.
>
> Along with lots of other bug fixes and improvements.
>
> For full details, see the changelog:
> https://ci.apache.org/projects/tomcat/tomcat85/docs/changelog.html
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.5.54/
>
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1264/
>
> The tag is:
> https://github.com/apache/tomcat/tree/8.5.54
> 0b365bb7032a5e30b35fedc56e7def82a3e55f94
>
> The proposed 8.5.54 release is:
> [ ] Broken - do not release
> [X] Stable - go ahead and release as 8.5.54
>

Rémy

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


[tomcat-native] branch master updated: Bump version to 1.2.24-dev

2020-04-06 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 045721a  Bump version to 1.2.24-dev
045721a is described below

commit 045721a37d51a345fc91b991c3457421ca8665b5
Author: Michael Osipov 
AuthorDate: Mon Apr 6 13:53:19 2020 +0200

Bump version to 1.2.24-dev
---
 native/include/tcn_version.h   | 2 +-
 native/os/win32/libtcnative.rc | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/native/include/tcn_version.h b/native/include/tcn_version.h
index 7f15e2c..2483044 100644
--- a/native/include/tcn_version.h
+++ b/native/include/tcn_version.h
@@ -63,7 +63,7 @@ extern "C" {
 #define TCN_MINOR_VERSION   2
 
 /** patch level */
-#define TCN_PATCH_VERSION   23
+#define TCN_PATCH_VERSION   24
 
 /**
  *  This symbol is defined for internal, "development" copies of TCN. This
diff --git a/native/os/win32/libtcnative.rc b/native/os/win32/libtcnative.rc
index dfb0622..c7793f5 100644
--- a/native/os/win32/libtcnative.rc
+++ b/native/os/win32/libtcnative.rc
@@ -20,7 +20,7 @@ LANGUAGE 0x9,0x1
  "See the License for the specific language governing " \
  "permissions and limitations under the License."
 
-#define TCN_VERSION "1.2.23"
+#define TCN_VERSION "1.2.24"
 1000 ICON "apache.ico"
 
 1001 DIALOGEX 0, 0, 252, 51
@@ -36,8 +36,8 @@ BEGIN
 END
 
 1 VERSIONINFO
- FILEVERSION 1,2,23,0
- PRODUCTVERSION 1,2,23,0
+ FILEVERSION 1,2,24,0
+ PRODUCTVERSION 1,2,24,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L


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



[Bug 63199] sslsocket handshake JVM crash

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63199

--- Comment #2 from Michael Osipov  ---
Does this still occur with the most recent versions of Tomcat, libtcnative and
libapr?

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



[Bug 63405] Tomcat 7.0.91.0 EXCEPTION_ACCESS_VIOLATION - Problematic frame tcnative-1.dll+0x802e

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63405

Michael Osipov  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #3 from Michael Osipov  ---
Does this still occur with the most recent versions of Tomcat, libtcnative and
libapr?

-- 
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-jakartaee-migration] 02/03: Made the internal classes package private

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit 528ccfade4ef07ac5ee240767ed7fe09ead71ab5
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 15:27:15 2020 +0200

Made the internal classes package private
---
 src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/Converter.java  | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/Info.java   | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java  | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/StringManager.java  | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/TextConverter.java  | 2 +-
 src/main/java/org/apache/tomcat/jakartaee/Util.java   | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
index 4bb..3b7f3bc 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
@@ -25,7 +25,7 @@ import org.apache.bcel.classfile.Constant;
 import org.apache.bcel.classfile.ConstantUtf8;
 import org.apache.bcel.classfile.JavaClass;
 
-public class ClassConverter implements Converter {
+class ClassConverter implements Converter {
 
 @Override
 public boolean accepts(String filename) {
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Converter.java 
b/src/main/java/org/apache/tomcat/jakartaee/Converter.java
index f3d62ec..cf22616 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Converter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Converter.java
@@ -20,7 +20,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-public interface Converter {
+interface Converter {
 
 boolean accepts(String filename);
 
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Info.java 
b/src/main/java/org/apache/tomcat/jakartaee/Info.java
index a8de1a0..c1ad499 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Info.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Info.java
@@ -19,7 +19,7 @@ package org.apache.tomcat.jakartaee;
 import java.io.IOException;
 import java.util.Properties;
 
-public class Info {
+class Info {
 
 private static final String VERSION;
 
diff --git a/src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java
index cd1152a..3444ebf 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/NoOpConverter.java
@@ -20,7 +20,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-public class NoOpConverter implements Converter {
+class NoOpConverter implements Converter {
 
 @Override
 public boolean accepts(String filename) {
diff --git a/src/main/java/org/apache/tomcat/jakartaee/StringManager.java 
b/src/main/java/org/apache/tomcat/jakartaee/StringManager.java
index 7df8faf..8e1680f 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/StringManager.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/StringManager.java
@@ -49,7 +49,7 @@ import java.util.ResourceBundle;
  * @author Mel Martinez [mmarti...@g1440.com]
  * @see java.util.ResourceBundle
  */
-public class StringManager {
+class StringManager {
 
 private static int LOCALE_CACHE_SIZE = 10;
 
diff --git a/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
index d0a0db2..3911850 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
@@ -25,7 +25,7 @@ import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
 
-public class TextConverter implements Converter {
+class TextConverter implements Converter {
 
 private static final List supportedExtensions;
 
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Util.java 
b/src/main/java/org/apache/tomcat/jakartaee/Util.java
index 2a2ae81..4c2bce6 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Util.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Util.java
@@ -20,7 +20,7 @@ import java.util.Locale;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-public class Util {
+class Util {
 
 public enum EESpecProfile { TOMCAT, EE };
 


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



[tomcat-jakartaee-migration] branch master updated (5c96c0b -> 61ba095)

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a change to branch master
in repository 
https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git.


from 5c96c0b  Ignore the IntelliJ project files
 new 29ea189  Replaced NonClosing{In,Out}putStream with the equivalent 
classes from Commons IO
 new 528ccfa  Made the internal classes package private
 new 61ba095  Relocated the dependencies in the shaded jar

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


Summary of changes:
 pom.xml| 15 
 .../apache/tomcat/jakartaee/ClassConverter.java|  2 +-
 .../org/apache/tomcat/jakartaee/Converter.java |  2 +-
 .../java/org/apache/tomcat/jakartaee/Info.java |  2 +-
 .../org/apache/tomcat/jakartaee/Migration.java |  7 +-
 .../org/apache/tomcat/jakartaee/NoOpConverter.java |  2 +-
 .../tomcat/jakartaee/NonClosingInputStream.java| 84 --
 .../tomcat/jakartaee/NonClosingOutputStream.java   | 60 
 .../org/apache/tomcat/jakartaee/StringManager.java |  2 +-
 .../org/apache/tomcat/jakartaee/TextConverter.java |  2 +-
 .../java/org/apache/tomcat/jakartaee/Util.java |  2 +-
 11 files changed, 27 insertions(+), 153 deletions(-)
 delete mode 100644 
src/main/java/org/apache/tomcat/jakartaee/NonClosingInputStream.java
 delete mode 100644 
src/main/java/org/apache/tomcat/jakartaee/NonClosingOutputStream.java


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



[tomcat-jakartaee-migration] 03/03: Relocated the dependencies in the shaded jar

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit 61ba09577afc9fecf542d19c5cad6e79f1008ebd
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 15:31:29 2020 +0200

Relocated the dependencies in the shaded jar
---
 pom.xml | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/pom.xml b/pom.xml
index ab74cfe..61ef6f5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,6 +121,16 @@
   true
   true
   false
+  
+
+  org.apache.bcel
+  
org.apache.tomcat.jakartaee.bcel
+
+
+  org.apache.commons
+  
org.apache.tomcat.jakartaee.commons
+
+  
 
   
 


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



[Bug 64317] org.apache.tomcat.util.net.TestSsl testPost() test failing on Windows

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

Remy Maucherat  changed:

   What|Removed |Added

 OS||All

--- Comment #3 from Remy Maucherat  ---
Do you imply what the testPost test does is incorrect ? The amount of allocated
memory is as intended, and it's not too extreme (IMO). Maybe the memory could
be preallocated using ByteArrayOutputStream(int size) ? I don't think it would
make a big difference, this is only a test, not "best practices".

The test does work for me [so far]. As with the rather equivalent HTTP/2 TLS
test, it is meant to test large POSTs with TLS since that's what people often
complain about.

The test was included in 9.0.33 already (since there was a regression) and
there are no relevant changes in 9.0.34 (only NIO got a minor change, but you
are saying it works). Why did it work then ?

-- 
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-jakartaee-migration] branch master updated: Ignore the IntelliJ project files

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 5c96c0b  Ignore the IntelliJ project files
5c96c0b is described below

commit 5c96c0b6d2131eb41a5e8e7da8e76e0ec9e6e9c4
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 15:07:48 2020 +0200

Ignore the IntelliJ project files
---
 .gitignore | 4 
 1 file changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
index beef00d..2a968e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,7 @@
 .project
 .settings
 target
+.idea
+*.iml
+*.ipr
+*.iws


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



[Bug 64316] New: Duplicate code for obtaining native current thread id

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64316

Bug ID: 64316
   Summary: Duplicate code for obtaining native current thread id
   Product: Tomcat Native
   Version: 1.2.23
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Library
  Assignee: dev@tomcat.apache.org
  Reporter: micha...@apache.org
  Target Milestone: ---

We can improve/reduce code by collapsing those two into one internal function:

src/thread.c:
> TCN_IMPLEMENT_CALL(jlong, Thread, current)(TCN_STDARGS)
> {
> UNREFERENCED_STDARGS;
> return (jlong)((unsigned long)apr_os_thread_current());
> }

and src/ssl.c:
> static unsigned long ssl_thread_id(void)
> {
> /* OpenSSL needs this to return an unsigned long.  On OS/390, the pthread
>  * id is a structure twice that big.  Use the TCB pointer instead as a
>  * unique unsigned long.
>  */
> #ifdef __MVS__
> struct PSA {
> char unmapped[540];
> unsigned long PSATOLD;
> } *psaptr = 0;
> 
> return psaptr->PSATOLD;
> #elif defined(WIN32)
> return (unsigned long)GetCurrentThreadId();
> #elif defined(DARWIN)
> uint64_t tid;
> pthread_threadid_np(NULL, );
> return (unsigned long)tid;
> #elif defined(__FreeBSD__)
> return (unsigned long)pthread_getthreadid_np();
> #elif defined(__linux__)
> return (unsigned long)syscall(SYS_gettid);
> #else
> return (unsigned long)(apr_os_thread_current());
> #endif
> }

I think that we can throw away the apr_os_thread_current() because we already
have the thread id for Windows and for Unix is it merely:
> APR_DECLARE(apr_os_thread_t) apr_os_thread_current(void)
> {
> return pthread_self();
> }

There are implementations for BeOS, Netware and OS/2, but we don't care for
them.

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



[Bug 62626] Tomcat 9.0.10 APR/Native crashes

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62626

--- Comment #31 from Michael Osipov  ---
Does this still occur with the most recent versions of Tomcat, libtcnative and
libapr?

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



Re: [tomcat-jakartaee-migration] 01/03: Replaced NonClosing{In, Out}putStream with the equivalent classes from Commons IO

2020-04-06 Thread Emmanuel Bourg
Le 06/04/2020 à 15:38, Rémy Maucherat a écrit :

> commit 29ea1891489060f3b3e40259098def5ae47645ef
> Author: Emmanuel Bourg mailto:ebo...@apache.org>>
> AuthorDate: Mon Apr 6 15:24:35 2020 +0200
> 
>     Replaced NonClosing{In,Out}putStream with the equivalent classes
> from Commons IO
> 
> 
> Ah, the beauty of having Maven. Actual benefit: zero. Trouble with
> updating dependencies: one. Possible incompatibilities: one.
> So I think it's a total of -2 for the commit.

Sorry but I'm not sure to understand your objection. Commons IO is dead
stable, these classes have been around for over 10 years and haven't
changed much since. There is really no point reimplementing them.

Emmanuel Bourg

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



[Bug 64317] org.apache.tomcat.util.net.TestSsl testPost() test failing on Windows

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64317

--- Comment #2 from Konstantin Kolinko  ---
Created attachment 37148
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37148=edit
02_TEST-org.apache.tomcat.util.net.TestSsl.NIO2.txt

Out of 4 NIO2 failures, this kind of failure occurred in 3 runs.

The error here is:

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
at
sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:71)
at org.apache.tomcat.util.net.TestSsl$1.run(TestSsl.java:132)
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
at
sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:71)
at org.apache.tomcat.util.net.TestSsl$1.run(TestSsl.java:132)

The same read error occurs for several threads at once. The attached log file
has 5 of them.

-- 
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 master updated: Use a separate mbean type for SocketProperties

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 14406c0  Use a separate mbean type for SocketProperties
14406c0 is described below

commit 14406c0b49c29fd05dd8f707b62ece38429e16f8
Author: remm 
AuthorDate: Mon Apr 6 13:36:10 2020 +0200

Use a separate mbean type for SocketProperties

A subType seems to not be handled well by some tools so it's likely more
robust to avoid it. Inspired by BZ64314, and similarly I cannot see the
mbean in visualvm.
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 2 +-
 test/org/apache/catalina/mbeans/TestRegistration.java | 5 ++---
 webapps/docs/changelog.xml| 8 
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index ba30767..23a2c16 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -1131,7 +1131,7 @@ public abstract class AbstractEndpoint {
 Registry.getRegistry(null, null).registerComponent(this, oname, 
null);
 
 ObjectName socketPropertiesOname = new ObjectName(domain +
-":type=ThreadPool,name=\"" + getName() + 
"\",subType=SocketProperties");
+":type=SocketProperties,name=\"" + getName() + "\"");
 socketProperties.setObjectName(socketPropertiesOname);
 Registry.getRegistry(null, 
null).registerComponent(socketProperties, socketPropertiesOname, null);
 
diff --git a/test/org/apache/catalina/mbeans/TestRegistration.java 
b/test/org/apache/catalina/mbeans/TestRegistration.java
index 2049f81..bffd2c5 100644
--- a/test/org/apache/catalina/mbeans/TestRegistration.java
+++ b/test/org/apache/catalina/mbeans/TestRegistration.java
@@ -135,9 +135,8 @@ public class TestRegistration extends TomcatBaseTest {
 + ObjectName.quote(ADDRESS),
 "Tomcat:type=ThreadPool,name="
 + ObjectName.quote("http-" + type + "-" + ADDRESS + "-" + 
port),
-"Tomcat:type=ThreadPool,name="
-+ ObjectName.quote("http-" + type + "-" + ADDRESS + "-" + 
port) +
-",subType=SocketProperties",
+"Tomcat:type=SocketProperties,name="
++ ObjectName.quote("http-" + type + "-" + ADDRESS + "-" + 
port),
 };
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 8f2bf49..02bda5e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -64,6 +64,14 @@
   
 
   
+  
+
+  
+Move SocketProperties mbean to its own type rather than
+use a subType to improve robustness with tools. (remm)
+  
+
+  
 
 
   


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



Re: [tomcat] branch master updated: Use a separate mbean type for SocketProperties

2020-04-06 Thread Rémy Maucherat
On Mon, Apr 6, 2020 at 1:36 PM  wrote:

> This is an automated email from the ASF dual-hosted git repository.
>
> remm pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
>  new 14406c0  Use a separate mbean type for SocketProperties
> 14406c0 is described below
>
> commit 14406c0b49c29fd05dd8f707b62ece38429e16f8
> Author: remm 
> AuthorDate: Mon Apr 6 13:36:10 2020 +0200
>
> Use a separate mbean type for SocketProperties
>
> A subType seems to not be handled well by some tools so it's likely
> more
> robust to avoid it. Inspired by BZ64314, and similarly I cannot see the
> mbean in visualvm.
>

Should I backport this ?
Although it is a breaking change (in theory), the mbean name used doesn't
seem very reliable in tools.

Rémy


> ---
>  java/org/apache/tomcat/util/net/AbstractEndpoint.java | 2 +-
>  test/org/apache/catalina/mbeans/TestRegistration.java | 5 ++---
>  webapps/docs/changelog.xml| 8 
>  3 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
> b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
> index ba30767..23a2c16 100644
> --- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
> +++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
> @@ -1131,7 +1131,7 @@ public abstract class AbstractEndpoint {
>  Registry.getRegistry(null, null).registerComponent(this,
> oname, null);
>
>  ObjectName socketPropertiesOname = new ObjectName(domain +
> -":type=ThreadPool,name=\"" + getName() +
> "\",subType=SocketProperties");
> +":type=SocketProperties,name=\"" + getName() + "\"");
>  socketProperties.setObjectName(socketPropertiesOname);
>  Registry.getRegistry(null,
> null).registerComponent(socketProperties, socketPropertiesOname, null);
>
> diff --git a/test/org/apache/catalina/mbeans/TestRegistration.java
> b/test/org/apache/catalina/mbeans/TestRegistration.java
> index 2049f81..bffd2c5 100644
> --- a/test/org/apache/catalina/mbeans/TestRegistration.java
> +++ b/test/org/apache/catalina/mbeans/TestRegistration.java
> @@ -135,9 +135,8 @@ public class TestRegistration extends TomcatBaseTest {
>  + ObjectName.quote(ADDRESS),
>  "Tomcat:type=ThreadPool,name="
>  + ObjectName.quote("http-" + type + "-" + ADDRESS + "-" +
> port),
> -"Tomcat:type=ThreadPool,name="
> -+ ObjectName.quote("http-" + type + "-" + ADDRESS + "-" +
> port) +
> -",subType=SocketProperties",
> +"Tomcat:type=SocketProperties,name="
> ++ ObjectName.quote("http-" + type + "-" + ADDRESS + "-" +
> port),
>  };
>  }
>
> diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
> index 8f2bf49..02bda5e 100644
> --- a/webapps/docs/changelog.xml
> +++ b/webapps/docs/changelog.xml
> @@ -64,6 +64,14 @@
>
>  
>
> +  
> +
> +  
> +Move SocketProperties mbean to its own type rather
> than
> +use a subType to improve robustness with tools. (remm)
> +  
> +
> +  
>  
>  
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Re: [VOTE] Release Apache Tomcat 10.0.0-M4

2020-04-06 Thread Emmanuel Bourg
Le 03/04/2020 à 13:28, Mark Thomas a écrit :

> The proposed 10.0.0-M4 release is:
> [ ] Broken - do not release
> [X] Alpha  - go ahead and release as 10.0.0-M4

Good in Debian with OpenJDK 11. Just got taglibs related test failures
because the jars haven't been migrated yet.

Emmanuel Bourg

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



[tomcat-jakartaee-migration] 01/03: Replaced NonClosing{In, Out}putStream with the equivalent classes from Commons IO

2020-04-06 Thread ebourg
This is an automated email from the ASF dual-hosted git repository.

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git

commit 29ea1891489060f3b3e40259098def5ae47645ef
Author: Emmanuel Bourg 
AuthorDate: Mon Apr 6 15:24:35 2020 +0200

Replaced NonClosing{In,Out}putStream with the equivalent classes from 
Commons IO
---
 pom.xml|  5 ++
 .../org/apache/tomcat/jakartaee/Migration.java |  7 +-
 .../tomcat/jakartaee/NonClosingInputStream.java| 84 --
 .../tomcat/jakartaee/NonClosingOutputStream.java   | 60 
 4 files changed, 10 insertions(+), 146 deletions(-)

diff --git a/pom.xml b/pom.xml
index cf7f18b..ab74cfe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,6 +71,11 @@
   bcel
   6.4.1
 
+
+  commons-io
+  commons-io
+  2.6
+
   
 
   
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index 734ebd8..5d8fdf1 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -36,6 +36,9 @@ import java.util.jar.Manifest;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import org.apache.commons.io.input.CloseShieldInputStream;
+import org.apache.commons.io.output.CloseShieldOutputStream;
+
 public class Migration {
 
 private static final Logger logger = 
Logger.getLogger(Migration.class.getCanonicalName());
@@ -131,8 +134,8 @@ public class Migration {
 
 private boolean migrateArchive(InputStream src, OutputStream dest) throws 
IOException {
 boolean result = true;
-try (JarInputStream jarIs = new JarInputStream(new 
NonClosingInputStream(src));
-JarOutputStream jarOs = new JarOutputStream(new 
NonClosingOutputStream(dest))) {
+try (JarInputStream jarIs = new JarInputStream(new 
CloseShieldInputStream(src));
+JarOutputStream jarOs = new JarOutputStream(new 
CloseShieldOutputStream(dest))) {
 Manifest manifest = jarIs.getManifest();
 if (manifest != null) {
 // Make a safe copy to leave original manifest untouched.
diff --git 
a/src/main/java/org/apache/tomcat/jakartaee/NonClosingInputStream.java 
b/src/main/java/org/apache/tomcat/jakartaee/NonClosingInputStream.java
deleted file mode 100644
index 53f883c..000
--- a/src/main/java/org/apache/tomcat/jakartaee/NonClosingInputStream.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tomcat.jakartaee;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-public class NonClosingInputStream extends InputStream {
-
-private InputStream wrapped;
-
-
-public NonClosingInputStream(InputStream wrapped) {
-this.wrapped = wrapped;
-}
-
-
-@Override
-public int read() throws IOException {
-return wrapped.read();
-}
-
-
-@Override
-public int read(byte[] b) throws IOException {
-return wrapped.read(b);
-}
-
-
-@Override
-public int read(byte[] b, int off, int len) throws IOException {
-return wrapped.read(b, off, len);
-}
-
-
-@Override
-public long skip(long n) throws IOException {
-return wrapped.skip(n);
-}
-
-
-@Override
-public int available() throws IOException {
-return wrapped.available();
-}
-
-
-@Override
-public void close() throws IOException {
-// NO-OP
-}
-
-
-@Override
-public synchronized void mark(int readlimit) {
-wrapped.mark(readlimit);
-}
-
-
-@Override
-public synchronized void reset() throws IOException {
-wrapped.reset();
-}
-
-
-@Override
-public boolean markSupported() {
-return wrapped.markSupported();
-}
-}
diff --git 
a/src/main/java/org/apache/tomcat/jakartaee/NonClosingOutputStream.java 
b/src/main/java/org/apache/tomcat/jakartaee/NonClosingOutputStream.java
deleted file mode 100644
index b4ee198..000
--- 

[Bug 64314] Tomcat 9.0.31 Manager Server Status Errors. javax.management.AttributeNotFoundException: Cannot find attribute [maxThreads] on resource [org.apache.tomcat.util.net.SocketProperties@7d396ec

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64314

Remy Maucherat  changed:

   What|Removed |Added

 OS||All
 Resolution|--- |INVALID
 Status|NEW |RESOLVED

--- Comment #1 from Remy Maucherat  ---
This is a framework issue, the mbean has a subType so it is not a ThreadPool.

I think using a subType is not the best idea however, even visualvm doesn't
handle it and it shows only the ThreadPool beans.
Introduced here:
https://github.com/apache/tomcat/commit/ebc6025d150bdf4786da52767632115e1a3149a1
To be more robust, this should change to its own SocketProperties type.

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



[Bug 63671] libtcnative does not compile with OpenSSL < 1.1.0 and APR w/o threading support

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63671

Michael Osipov  changed:

   What|Removed |Added

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

--- Comment #1 from Michael Osipov  ---
Fix in 1.2.24 and 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



[Bug 64312] Many memberDisappeared messages are logged on all nodes of the cluster with JDK versions 12 or above, even when system is idle

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64312

Remy Maucherat  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #2 from Remy Maucherat  ---
Ok, so basically it still works 100% fine, but with an extra step + noise ? Can
you confirm the exact same setup works without that problem on Java 11 and has
the issue on Java 14 ?
[reminder: Java 11 is the supported release, and Java 14 will be the next
supported release]

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



[Bug 63701] SSL initialize hangs with OpenSSL 1.1.1

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63701

Michael Osipov  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #3 from Michael Osipov  ---
The previous change was not intended.

Can we marked this fixed for 1.2.23? Since this is in master now?!

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



[Bug 64315] New: configure output for OpenSSL wrong/incomplete sometimes

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64315

Bug ID: 64315
   Summary: configure output for OpenSSL wrong/incomplete
sometimes
   Product: Tomcat Native
   Version: 1.2.23
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Library
  Assignee: dev@tomcat.apache.org
  Reporter: micha...@apache.org
  Target Milestone: ---

When OpenSSL lives in /usr then configure output will be:
> checking for OpenSSL library... using openssl from /usr/ and /usr/include

'/usr/' is obviously wrong. The root cause is in build/tcnative.m4. In the case
of '"$use_openssl" = "/usr"' 'test -d $use_openssl/lib64 && ssllibdir=lib64 ||
ssllibdir=lib" is not executed', thus remains unset.

The simplest fix is to move the dir test out of the if clause.

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



[Bug 63701] SSL initialize hangs with OpenSSL 1.1.1

2020-04-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63701

--- Comment #2 from Michael Osipov  ---
Does this still occur with the most recent versions of Tomcat, libtcnative and
libapr?

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



  1   2   >