[tomcat] branch main updated: Add the initial plumbing for the loom module
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 39821e7b3c Add the initial plumbing for the loom module 39821e7b3c is described below commit 39821e7b3c49af50d4ff04f139feea22edc697d2 Author: Mark Thomas AuthorDate: Wed Oct 12 10:14:30 2022 +0100 Add the initial plumbing for the loom module This is just a dummy implementation to check the build system is working --- modules/loom/.gitignore| 1 + modules/loom/pom.xml | 100 + .../coyote/http11/Http11BioLoomProtocol.java | 35 3 files changed, 136 insertions(+) diff --git a/modules/loom/.gitignore b/modules/loom/.gitignore new file mode 100644 index 00..eb5a316cbd --- /dev/null +++ b/modules/loom/.gitignore @@ -0,0 +1 @@ +target diff --git a/modules/loom/pom.xml b/modules/loom/pom.xml new file mode 100644 index 00..b04f69e41b --- /dev/null +++ b/modules/loom/pom.xml @@ -0,0 +1,100 @@ + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> +4.0.0 + + +org.apache +apache +27 + + +org.apache.tomcat +tomcat-coyote-loom +Apache Tomcat support for Project Look +Project Loom support included in Java 19 early preview +0.1-SNAPSHOT + + +11.0.0-M1-SNAPSHOT + + + + scm:git:https://gitbox.apache.org/repos/asf/tomcat.git + scm:git:https://gitbox.apache.org/repos/asf/tomcat.git +https://gitbox.apache.org/repos/asf?p=tomcat.git +HEAD + + + + + Development List + dev-subscr...@tomcat.apache.org + dev-unsubscr...@tomcat.apache.org + dev@tomcat.apache.org + + + Users List + users-subscr...@tomcat.apache.org + users-unsubscr...@tomcat.apache.org + us...@tomcat.apache.org + + + + + +org.apache.tomcat +tomcat-catalina +${tomcat.version} +provided + + +org.apache.tomcat +tomcat-coyote +${tomcat.version} +provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 19 + 19 + + --enable-preview + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + 19 + + --enable-preview + + + + + + + diff --git a/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java b/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java new file mode 100644 index 00..9b6efddac6 --- /dev/null +++ b/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java @@ -0,0 +1,35 @@ +/* + * 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.coyote.http11; + +/** + * Dummy implementation for now that just extends the standard NIO + * implementation. + */ +public class Http11BioLoomProtocol extends Http11NioProtocol { + +// -
Buildbot success in on tomcat-11.0.x
Build status: Build succeeded! Worker used: bb2_worker2_ubuntu URL: https://ci2.apache.org/#builders/112/builds/1 Blamelist: Carsten Klein , Christopher Schultz , David Blevins , Dmitri Blinov , Emmanuel Bourg , Filip Hanik , Gareth Evans , Igal Sapir , Knut Sander , Konstantin Kolinko , Malay Shah , Mark Thomas , Michael Osipov , Michael Seele , Piotr P. Karwasz , Piotr P. Karwasz , Poison , Rainer Jung , Romain Manni-Bucau , Youyu Song , Zishuo Ding , dn121049 , dsoumis , dummy, jiangtao , lakeoffaith , lihan , lihan , remm , sim-lus <67785631+sim-...@users.noreply.github.com>, thomasma , zhenguoli Build Text: build successful Status Detected: passing build Build Source Stamp: [branch main] 39821e7b3c49af50d4ff04f139feea22edc697d2 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 1 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated (39821e7b3c -> 2763077bba)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git from 39821e7b3c Add the initial plumbing for the loom module new 1c21f344be Refactor in preparation for adding initial Loom endpoint new ebbe5f1d16 Add initial Loom implementation new 2763077bba Sync local snapshot version with nexus snapshot version 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: .../apache/tomcat/util/net/AbstractEndpoint.java | 17 +- .../util/net/AbstractNetworkChannelEndpoint.java | 39 +- java/org/apache/tomcat/util/net/Nio2Endpoint.java | 2 +- java/org/apache/tomcat/util/net/NioEndpoint.java | 2 +- .../coyote/http11/Http11BioLoomProtocol.java | 33 +- .../apache/coyote/http11/Http11LoomProcessor.java | 13 +- .../apache/tomcat/util/net/BioLoomEndpoint.java| 455 + res/maven/mvn-pub.xml | 2 +- 8 files changed, 509 insertions(+), 54 deletions(-) copy test/org/apache/catalina/loader/EchoTag.java => java/org/apache/tomcat/util/net/AbstractNetworkChannelEndpoint.java (54%) copy java/org/apache/catalina/users/SparseUserDatabase.java => modules/loom/src/main/java/org/apache/coyote/http11/Http11LoomProcessor.java (76%) create mode 100644 modules/loom/src/main/java/org/apache/tomcat/util/net/BioLoomEndpoint.java - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 03/03: Sync local snapshot version with nexus snapshot version
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 2763077bbaf018cf76a3247c8ea08c486b505ea7 Author: Mark Thomas AuthorDate: Wed Oct 12 11:12:40 2022 +0100 Sync local snapshot version with nexus snapshot version --- res/maven/mvn-pub.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/maven/mvn-pub.xml b/res/maven/mvn-pub.xml index e24188a968..f7c6a9e190 100644 --- a/res/maven/mvn-pub.xml +++ b/res/maven/mvn-pub.xml @@ -79,7 +79,7 @@ - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/03: Refactor in preparation for adding initial Loom endpoint
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 1c21f344bed88f9846bd8c172e4181325b8a64ea Author: Mark Thomas AuthorDate: Wed Oct 12 10:48:19 2022 +0100 Refactor in preparation for adding initial Loom endpoint --- .../apache/tomcat/util/net/AbstractEndpoint.java | 17 + .../util/net/AbstractNetworkChannelEndpoint.java | 43 ++ java/org/apache/tomcat/util/net/Nio2Endpoint.java | 2 +- java/org/apache/tomcat/util/net/NioEndpoint.java | 2 +- 4 files changed, 46 insertions(+), 18 deletions(-) diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java b/java/org/apache/tomcat/util/net/AbstractEndpoint.java index 1e473fe9a1..4e3b692ad1 100644 --- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java +++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java @@ -21,9 +21,7 @@ import java.io.OutputStreamWriter; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.NetworkInterface; -import java.net.SocketAddress; import java.net.SocketException; -import java.nio.channels.NetworkChannel; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; @@ -739,9 +737,6 @@ public abstract class AbstractEndpoint { public void setAddress(InetAddress address) { this.address = address; } -protected abstract NetworkChannel getServerSocket(); - - /** * Obtain the network address the server socket is bound to. This primarily * exists to enable the correct address to be used when unlocking the server @@ -754,17 +749,7 @@ public abstract class AbstractEndpoint { * @throws IOException If there is a problem determining the currently bound * socket */ -protected final InetSocketAddress getLocalAddress() throws IOException { -NetworkChannel serverSock = getServerSocket(); -if (serverSock == null) { -return null; -} -SocketAddress sa = serverSock.getLocalAddress(); -if (sa instanceof InetSocketAddress) { -return (InetSocketAddress) sa; -} -return null; -} +protected abstract InetSocketAddress getLocalAddress() throws IOException; /** diff --git a/java/org/apache/tomcat/util/net/AbstractNetworkChannelEndpoint.java b/java/org/apache/tomcat/util/net/AbstractNetworkChannelEndpoint.java new file mode 100644 index 00..b52291e778 --- /dev/null +++ b/java/org/apache/tomcat/util/net/AbstractNetworkChannelEndpoint.java @@ -0,0 +1,43 @@ +/* + * 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.util.net; + +import java.io.IOException; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.nio.channels.Channel; +import java.nio.channels.NetworkChannel; + +public abstract class AbstractNetworkChannelEndpoint +extends AbstractEndpoint { + +protected abstract NetworkChannel getServerSocket(); + + +@Override +protected final InetSocketAddress getLocalAddress() throws IOException { +NetworkChannel serverSock = getServerSocket(); +if (serverSock == null) { +return null; +} +SocketAddress sa = serverSock.getLocalAddress(); +if (sa instanceof InetSocketAddress) { +return (InetSocketAddress) sa; +} +return null; +} +} \ No newline at end of file diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java b/java/org/apache/tomcat/util/net/Nio2Endpoint.java index 75444cfbc2..9ad21cfbde 100644 --- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java +++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java @@ -52,7 +52,7 @@ import org.apache.tomcat.util.net.jsse.JSSESupport; /** * NIO2 endpoint. */ -public class Nio2Endpoint extends AbstractEndpoint { +public class Nio2Endpoint extends AbstractNetworkChannelEndpoint { // -- Constants diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index d15aef31
[tomcat] 02/03: Add initial Loom implementation
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit ebbe5f1d16c8ee345b3334abc3cd2c20d61171f4 Author: Mark Thomas AuthorDate: Wed Oct 12 10:49:31 2022 +0100 Add initial Loom implementation Supports basic HTTP requests. No TLS, no async. --- .../coyote/http11/Http11BioLoomProtocol.java | 33 +- ...oLoomProtocol.java => Http11LoomProcessor.java} | 17 +- .../apache/tomcat/util/net/BioLoomEndpoint.java| 455 + 3 files changed, 486 insertions(+), 19 deletions(-) diff --git a/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java b/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java index 9b6efddac6..e3c8acf1e1 100644 --- a/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java +++ b/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java @@ -16,13 +16,27 @@ */ package org.apache.coyote.http11; -/** - * Dummy implementation for now that just extends the standard NIO - * implementation. - */ -public class Http11BioLoomProtocol extends Http11NioProtocol { +import java.net.Socket; + +import org.apache.coyote.Processor; +import org.apache.juli.logging.Log; +import org.apache.juli.logging.LogFactory; +import org.apache.tomcat.util.net.BioLoomEndpoint; + +public class Http11BioLoomProtocol extends AbstractHttp11Protocol { + +private static final Log log = LogFactory.getLog(Http11BioLoomProtocol.class); + +public Http11BioLoomProtocol() { +super(new BioLoomEndpoint()); +} + + +@Override +protected Log getLog() { +return log; +} -// - JMX related methods @Override protected String getNamePrefix() { @@ -32,4 +46,11 @@ public class Http11BioLoomProtocol extends Http11NioProtocol { return "http-bio-loom"; } } + + +@Override +protected Processor createProcessor() { +Http11Processor processor = new Http11LoomProcessor(this, adapter); +return processor; +} } diff --git a/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java b/modules/loom/src/main/java/org/apache/coyote/http11/Http11LoomProcessor.java similarity index 65% copy from modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java copy to modules/loom/src/main/java/org/apache/coyote/http11/Http11LoomProcessor.java index 9b6efddac6..cc1e5de4d0 100644 --- a/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java +++ b/modules/loom/src/main/java/org/apache/coyote/http11/Http11LoomProcessor.java @@ -16,20 +16,11 @@ */ package org.apache.coyote.http11; -/** - * Dummy implementation for now that just extends the standard NIO - * implementation. - */ -public class Http11BioLoomProtocol extends Http11NioProtocol { +import org.apache.coyote.Adapter; -// - JMX related methods +public class Http11LoomProcessor extends Http11Processor { -@Override -protected String getNamePrefix() { -if (isSSLEnabled()) { -return "https-" + getSslImplementationShortName()+ "-bio-loom"; -} else { -return "http-bio-loom"; -} +public Http11LoomProcessor(AbstractHttp11Protocol protocol, Adapter adapter) { +super(protocol, adapter); } } diff --git a/modules/loom/src/main/java/org/apache/tomcat/util/net/BioLoomEndpoint.java b/modules/loom/src/main/java/org/apache/tomcat/util/net/BioLoomEndpoint.java new file mode 100644 index 00..3047253a4c --- /dev/null +++ b/modules/loom/src/main/java/org/apache/tomcat/util/net/BioLoomEndpoint.java @@ -0,0 +1,455 @@ +/* + * 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.util.net; + +import java.io.IOException; +import java.net.BindException; +import java.net.InetSocketAddress; +import java.net.ServerSocket; +import java.net.Socket; +import java.net.SocketAddress; +import java.net.SocketException; +import java.nio.ByteBuffer; +imp
Buildbot success in on tomcat-11.0.x
Build status: Build succeeded! Worker used: bb2_worker2_ubuntu URL: https://ci2.apache.org/#builders/112/builds/2 Blamelist: Mark Thomas Build Text: build successful Status Detected: passing build Build Source Stamp: [branch main] 2763077bbaf018cf76a3247c8ea08c486b505ea7 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 1 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] DigitalFatCat opened a new pull request, #555: Update OpenSSLEngine.java changed 'toArray(new String[0])' to 'toArray(new String[size])'
DigitalFatCat opened a new pull request, #555: URL: https://github.com/apache/tomcat/pull/555 It should use 'toArray(new String[0])' instead of 'toArray(new String[size])' -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] aooohan commented on pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'
aooohan commented on PR #555: URL: https://github.com/apache/tomcat/pull/555#issuecomment-1276008234 It doesn't make sense to do this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] aooohan closed pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'
aooohan closed pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])' URL: https://github.com/apache/tomcat/pull/555 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'
markt-asf commented on PR #555: URL: https://github.com/apache/tomcat/pull/555#issuecomment-1276040032 It usually does make sense. See https://www.baeldung.com/java-collection-toarray-methods I thought we'd been through the code base and fixed all these previously. A quick search indicates that isn't the case - or we missed quite a few. I have patch locally to address all of the remaining toArray() calls that I just need to review before committing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] aooohan commented on pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'
aooohan commented on PR #555: URL: https://github.com/apache/tomcat/pull/555#issuecomment-1276129749 > It usually does make sense. See https://www.baeldung.com/java-collection-toarray-methods Wow, interesting, it turns out that there is a difference in performance between these. I am ashamed of my ignorance. > I have patch locally to address all of the remaining toArray() calls that I just need to review before committing. Ok -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] aooohan commented on pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'
aooohan commented on PR #555: URL: https://github.com/apache/tomcat/pull/555#issuecomment-1276131546 @DigitalFatCat Thanks for the PR. : ) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 66294] Util.getContextClassLoader() can be a hotspot
https://bz.apache.org/bugzilla/show_bug.cgi?id=66294 John Engebretson changed: What|Removed |Added CC||jeng...@amazon.com -- 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 main updated: Use List.toArray(new T[0]) rather than List.toArray(new T[size])
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 563e11057e Use List.toArray(new T[0]) rather than List.toArray(new T[size]) 563e11057e is described below commit 563e11057e87f9482c6fd7a0b671a51f95e3f2b2 Author: Mark Thomas AuthorDate: Wed Oct 12 14:54:44 2022 +0100 Use List.toArray(new T[0]) rather than List.toArray(new T[size]) Minor performance optimisation --- .../catalina/core/ApplicationHttpRequest.java | 3 +-- java/org/apache/catalina/core/ContainerBase.java | 7 ++ java/org/apache/catalina/core/StandardContext.java | 13 --- java/org/apache/catalina/core/StandardService.java | 4 +--- java/org/apache/catalina/core/StandardWrapper.java | 9 +++- .../catalina/deploy/NamingResourcesImpl.java | 26 +++--- .../apache/catalina/ha/tcp/SimpleTcpCluster.java | 9 +--- java/org/apache/catalina/realm/JNDIRealm.java | 5 ++--- java/org/apache/catalina/realm/RealmBase.java | 4 +--- .../org/apache/catalina/startup/ContextConfig.java | 3 +-- .../catalina/tribes/membership/Membership.java | 3 +-- .../tribes/tipis/AbstractReplicatedMap.java| 4 +--- .../catalina/tribes/transport/PooledSender.java| 3 +-- java/org/apache/catalina/tribes/util/Arrays.java | 3 +-- java/org/apache/jasper/JspC.java | 3 +-- .../apache/jasper/compiler/ErrorDispatcher.java| 3 +-- .../apache/tomcat/util/modeler/ManagedBean.java| 8 ++- .../tomcat/util/net/openssl/OpenSSLEngine.java | 7 +- test/org/apache/catalina/session/TesterStore.java | 2 +- .../tomcat/websocket/TestWsSubprotocols.java | 2 +- .../compressionFilters/CompressionFilter.java | 3 +-- 21 files changed, 36 insertions(+), 88 deletions(-) diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java b/java/org/apache/catalina/core/ApplicationHttpRequest.java index 6d6dd6fe38..36a0401d44 100644 --- a/java/org/apache/catalina/core/ApplicationHttpRequest.java +++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java @@ -865,8 +865,7 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper { results.addAll(Arrays.asList(values2)); } -String values[] = new String[results.size()]; -return results.toArray(values); +return results.toArray(new String[0]); } diff --git a/java/org/apache/catalina/core/ContainerBase.java b/java/org/apache/catalina/core/ContainerBase.java index 2e3752f27c..f09038f5a3 100644 --- a/java/org/apache/catalina/core/ContainerBase.java +++ b/java/org/apache/catalina/core/ContainerBase.java @@ -777,8 +777,7 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai @Override public Container[] findChildren() { synchronized (children) { -Container results[] = new Container[children.size()]; -return children.values().toArray(results); +return children.values().toArray(new Container[0]); } } @@ -790,9 +789,7 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai */ @Override public ContainerListener[] findContainerListeners() { -ContainerListener[] results = -new ContainerListener[0]; -return listeners.toArray(results); +return listeners.toArray(new ContainerListener[0]); } diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index 5044ed462a..888973b0f9 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -3497,8 +3497,7 @@ public class StandardContext extends ContainerBase @Override public FilterDef[] findFilterDefs() { synchronized (filterDefs) { -FilterDef results[] = new FilterDef[filterDefs.size()]; -return filterDefs.values().toArray(results); +return filterDefs.values().toArray(new FilterDef[0]); } } @@ -3532,9 +3531,7 @@ public class StandardContext extends ContainerBase */ public MessageDestination[] findMessageDestinations() { synchronized (messageDestinations) { -MessageDestination results[] = -new MessageDestination[messageDestinations.size()]; -return messageDestinations.values().toArray(results); +return messageDestinations.values().toArray(new MessageDestination[0]); } } @@ -3558,8 +3555,7 @@ public class StandardContext extends ContainerBase @Override public String[] findMimeMappings() { synchronized (mimeMappings) { -String results[] = new String[mimeMappings.size()]; -return mimeMappings
[tomcat] branch 10.1.x updated: Use List.toArray(new T[0]) rather than List.toArray(new T[size])
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 152dc92d7f Use List.toArray(new T[0]) rather than List.toArray(new T[size]) 152dc92d7f is described below commit 152dc92d7f31120870b60f3d94f7b08e679a8a1e Author: Mark Thomas AuthorDate: Wed Oct 12 14:54:44 2022 +0100 Use List.toArray(new T[0]) rather than List.toArray(new T[size]) Minor performance optimisation --- .../catalina/core/ApplicationHttpRequest.java | 3 +-- java/org/apache/catalina/core/ContainerBase.java | 7 ++ java/org/apache/catalina/core/StandardContext.java | 13 --- java/org/apache/catalina/core/StandardService.java | 4 +--- java/org/apache/catalina/core/StandardWrapper.java | 9 +++- .../catalina/deploy/NamingResourcesImpl.java | 26 +++--- .../apache/catalina/ha/tcp/SimpleTcpCluster.java | 9 +--- java/org/apache/catalina/realm/JNDIRealm.java | 5 ++--- java/org/apache/catalina/realm/RealmBase.java | 4 +--- .../org/apache/catalina/startup/ContextConfig.java | 3 +-- .../catalina/tribes/membership/Membership.java | 3 +-- .../tribes/tipis/AbstractReplicatedMap.java| 4 +--- .../catalina/tribes/transport/PooledSender.java| 3 +-- java/org/apache/catalina/tribes/util/Arrays.java | 3 +-- java/org/apache/jasper/JspC.java | 3 +-- .../apache/jasper/compiler/ErrorDispatcher.java| 3 +-- .../apache/tomcat/util/modeler/ManagedBean.java| 8 ++- .../tomcat/util/net/openssl/OpenSSLEngine.java | 7 +- test/org/apache/catalina/session/TesterStore.java | 2 +- .../tomcat/websocket/TestWsSubprotocols.java | 2 +- .../compressionFilters/CompressionFilter.java | 3 +-- 21 files changed, 36 insertions(+), 88 deletions(-) diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java b/java/org/apache/catalina/core/ApplicationHttpRequest.java index 6d6dd6fe38..36a0401d44 100644 --- a/java/org/apache/catalina/core/ApplicationHttpRequest.java +++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java @@ -865,8 +865,7 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper { results.addAll(Arrays.asList(values2)); } -String values[] = new String[results.size()]; -return results.toArray(values); +return results.toArray(new String[0]); } diff --git a/java/org/apache/catalina/core/ContainerBase.java b/java/org/apache/catalina/core/ContainerBase.java index 2e3752f27c..f09038f5a3 100644 --- a/java/org/apache/catalina/core/ContainerBase.java +++ b/java/org/apache/catalina/core/ContainerBase.java @@ -777,8 +777,7 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai @Override public Container[] findChildren() { synchronized (children) { -Container results[] = new Container[children.size()]; -return children.values().toArray(results); +return children.values().toArray(new Container[0]); } } @@ -790,9 +789,7 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai */ @Override public ContainerListener[] findContainerListeners() { -ContainerListener[] results = -new ContainerListener[0]; -return listeners.toArray(results); +return listeners.toArray(new ContainerListener[0]); } diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index 5044ed462a..888973b0f9 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -3497,8 +3497,7 @@ public class StandardContext extends ContainerBase @Override public FilterDef[] findFilterDefs() { synchronized (filterDefs) { -FilterDef results[] = new FilterDef[filterDefs.size()]; -return filterDefs.values().toArray(results); +return filterDefs.values().toArray(new FilterDef[0]); } } @@ -3532,9 +3531,7 @@ public class StandardContext extends ContainerBase */ public MessageDestination[] findMessageDestinations() { synchronized (messageDestinations) { -MessageDestination results[] = -new MessageDestination[messageDestinations.size()]; -return messageDestinations.values().toArray(results); +return messageDestinations.values().toArray(new MessageDestination[0]); } } @@ -3558,8 +3555,7 @@ public class StandardContext extends ContainerBase @Override public String[] findMimeMappings() { synchronized (mimeMappings) { -String results[] = new String[mimeMappings.size()]; -return mimeMapp
[tomcat] branch 9.0.x updated: Use List.toArray(new T[0]) rather than List.toArray(new T[size])
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 c17bfe7d8f Use List.toArray(new T[0]) rather than List.toArray(new T[size]) c17bfe7d8f is described below commit c17bfe7d8ff3b7fe489ae0e9782139f2d3264002 Author: Mark Thomas AuthorDate: Wed Oct 12 14:54:44 2022 +0100 Use List.toArray(new T[0]) rather than List.toArray(new T[size]) Minor performance optimisation --- .../catalina/core/ApplicationHttpRequest.java | 3 +-- java/org/apache/catalina/core/ContainerBase.java | 7 ++ java/org/apache/catalina/core/StandardContext.java | 13 --- java/org/apache/catalina/core/StandardService.java | 4 +--- java/org/apache/catalina/core/StandardWrapper.java | 9 +++- .../catalina/deploy/NamingResourcesImpl.java | 26 +++--- .../apache/catalina/ha/tcp/SimpleTcpCluster.java | 9 +--- java/org/apache/catalina/realm/JNDIRealm.java | 5 ++--- java/org/apache/catalina/realm/RealmBase.java | 4 +--- .../org/apache/catalina/startup/ContextConfig.java | 3 +-- .../catalina/tribes/membership/Membership.java | 3 +-- .../tribes/tipis/AbstractReplicatedMap.java| 4 +--- .../catalina/tribes/transport/PooledSender.java| 3 +-- java/org/apache/catalina/tribes/util/Arrays.java | 3 +-- java/org/apache/jasper/JspC.java | 3 +-- .../apache/jasper/compiler/ErrorDispatcher.java| 3 +-- .../apache/tomcat/util/modeler/ManagedBean.java| 8 ++- .../tomcat/util/net/openssl/OpenSSLEngine.java | 7 +- test/org/apache/catalina/session/TesterStore.java | 2 +- .../tomcat/websocket/TestWsSubprotocols.java | 2 +- .../compressionFilters/CompressionFilter.java | 3 +-- 21 files changed, 36 insertions(+), 88 deletions(-) diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java b/java/org/apache/catalina/core/ApplicationHttpRequest.java index e94bd6693d..f307e3e334 100644 --- a/java/org/apache/catalina/core/ApplicationHttpRequest.java +++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java @@ -865,8 +865,7 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper { results.addAll(Arrays.asList(values2)); } -String values[] = new String[results.size()]; -return results.toArray(values); +return results.toArray(new String[0]); } diff --git a/java/org/apache/catalina/core/ContainerBase.java b/java/org/apache/catalina/core/ContainerBase.java index 2e3752f27c..f09038f5a3 100644 --- a/java/org/apache/catalina/core/ContainerBase.java +++ b/java/org/apache/catalina/core/ContainerBase.java @@ -777,8 +777,7 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai @Override public Container[] findChildren() { synchronized (children) { -Container results[] = new Container[children.size()]; -return children.values().toArray(results); +return children.values().toArray(new Container[0]); } } @@ -790,9 +789,7 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai */ @Override public ContainerListener[] findContainerListeners() { -ContainerListener[] results = -new ContainerListener[0]; -return listeners.toArray(results); +return listeners.toArray(new ContainerListener[0]); } diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index 4d588cc8dd..0515e4e80d 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -3476,8 +3476,7 @@ public class StandardContext extends ContainerBase @Override public FilterDef[] findFilterDefs() { synchronized (filterDefs) { -FilterDef results[] = new FilterDef[filterDefs.size()]; -return filterDefs.values().toArray(results); +return filterDefs.values().toArray(new FilterDef[0]); } } @@ -3511,9 +3510,7 @@ public class StandardContext extends ContainerBase */ public MessageDestination[] findMessageDestinations() { synchronized (messageDestinations) { -MessageDestination results[] = -new MessageDestination[messageDestinations.size()]; -return messageDestinations.values().toArray(results); +return messageDestinations.values().toArray(new MessageDestination[0]); } } @@ -3566,8 +3563,7 @@ public class StandardContext extends ContainerBase @Override public String[] findMimeMappings() { synchronized (mimeMappings) { -String results[] = new String[mimeMappings.size()]; -return mimeMappin
[tomcat] branch 8.5.x updated: Use List.toArray(new T[0]) rather than List.toArray(new T[size])
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 c8a742fb52 Use List.toArray(new T[0]) rather than List.toArray(new T[size]) c8a742fb52 is described below commit c8a742fb52f23b4b92be6b2525ddc12984060603 Author: Mark Thomas AuthorDate: Wed Oct 12 14:54:44 2022 +0100 Use List.toArray(new T[0]) rather than List.toArray(new T[size]) Minor performance optimisation --- .../catalina/core/ApplicationHttpRequest.java | 3 +-- java/org/apache/catalina/core/ContainerBase.java | 7 ++ java/org/apache/catalina/core/StandardContext.java | 13 --- java/org/apache/catalina/core/StandardService.java | 4 +--- java/org/apache/catalina/core/StandardWrapper.java | 9 +++- .../catalina/deploy/NamingResourcesImpl.java | 26 +++--- .../apache/catalina/ha/tcp/SimpleTcpCluster.java | 9 +--- java/org/apache/catalina/realm/JNDIRealm.java | 5 ++--- java/org/apache/catalina/realm/RealmBase.java | 4 +--- .../org/apache/catalina/startup/ContextConfig.java | 3 +-- .../catalina/tribes/membership/Membership.java | 3 +-- .../tribes/tipis/AbstractReplicatedMap.java| 4 +--- .../catalina/tribes/transport/PooledSender.java| 3 +-- java/org/apache/catalina/tribes/util/Arrays.java | 3 +-- java/org/apache/jasper/JspC.java | 3 +-- .../apache/jasper/compiler/ErrorDispatcher.java| 3 +-- .../apache/tomcat/util/modeler/ManagedBean.java| 8 ++- .../tomcat/util/net/openssl/OpenSSLEngine.java | 7 +- test/org/apache/catalina/session/TesterStore.java | 2 +- .../tomcat/websocket/TestWsSubprotocols.java | 2 +- .../compressionFilters/CompressionFilter.java | 3 +-- 21 files changed, 36 insertions(+), 88 deletions(-) diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java b/java/org/apache/catalina/core/ApplicationHttpRequest.java index bd9f694341..0411d8dcbc 100644 --- a/java/org/apache/catalina/core/ApplicationHttpRequest.java +++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java @@ -878,8 +878,7 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper { results.addAll(Arrays.asList(values2)); } -String values[] = new String[results.size()]; -return results.toArray(values); +return results.toArray(new String[0]); } diff --git a/java/org/apache/catalina/core/ContainerBase.java b/java/org/apache/catalina/core/ContainerBase.java index 7912193dc6..e3ecd9aaa7 100644 --- a/java/org/apache/catalina/core/ContainerBase.java +++ b/java/org/apache/catalina/core/ContainerBase.java @@ -807,8 +807,7 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai @Override public Container[] findChildren() { synchronized (children) { -Container results[] = new Container[children.size()]; -return children.values().toArray(results); +return children.values().toArray(new Container[0]); } } @@ -820,9 +819,7 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai */ @Override public ContainerListener[] findContainerListeners() { -ContainerListener[] results = -new ContainerListener[0]; -return listeners.toArray(results); +return listeners.toArray(new ContainerListener[0]); } diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index 1b4175329b..4371732fa5 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -3466,8 +3466,7 @@ public class StandardContext extends ContainerBase @Override public FilterDef[] findFilterDefs() { synchronized (filterDefs) { -FilterDef results[] = new FilterDef[filterDefs.size()]; -return filterDefs.values().toArray(results); +return filterDefs.values().toArray(new FilterDef[0]); } } @@ -3501,9 +3500,7 @@ public class StandardContext extends ContainerBase */ public MessageDestination[] findMessageDestinations() { synchronized (messageDestinations) { -MessageDestination results[] = -new MessageDestination[messageDestinations.size()]; -return messageDestinations.values().toArray(results); +return messageDestinations.values().toArray(new MessageDestination[0]); } } @@ -3548,8 +3545,7 @@ public class StandardContext extends ContainerBase @Override public String[] findMimeMappings() { synchronized (mimeMappings) { -String results[] = new String[mimeMappings.size()]; -return mimeMappin
Buildbot success in on tomcat-11.0.x
Build status: Build succeeded! Worker used: bb2_worker2_ubuntu URL: https://ci2.apache.org/#builders/112/builds/3 Blamelist: Mark Thomas Build Text: build successful Status Detected: passing build Build Source Stamp: [branch main] 563e11057e87f9482c6fd7a0b671a51f95e3f2b2 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 1 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Simplify code
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 8c734f3c55 Simplify code 8c734f3c55 is described below commit 8c734f3c5500e9cb76d6f2e6468d7611d94ac2b6 Author: Mark Thomas AuthorDate: Wed Oct 12 16:15:18 2022 +0100 Simplify code --- java/org/apache/coyote/http11/AbstractHttp11Protocol.java | 3 +-- .../src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java index f9d125630d..e03a256638 100644 --- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java +++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java @@ -720,8 +720,7 @@ public abstract class AbstractHttp11Protocol extends AbstractProtocol { @Override protected Processor createProcessor() { -Http11Processor processor = new Http11Processor(this, adapter); -return processor; +return new Http11Processor(this, adapter); } diff --git a/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java b/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java index e3c8acf1e1..00999c009c 100644 --- a/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java +++ b/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java @@ -50,7 +50,6 @@ public class Http11BioLoomProtocol extends AbstractHttp11Protocol { @Override protected Processor createProcessor() { -Http11Processor processor = new Http11LoomProcessor(this, adapter); -return processor; +return new Http11LoomProcessor(this, adapter); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot success in on tomcat-10.1.x
Build status: Build succeeded! Worker used: bb2_worker2_ubuntu URL: https://ci2.apache.org/#builders/44/builds/547 Blamelist: Carsten Klein , Christopher Schultz , Dachuan J , David Blevins , Dmitri Blinov , Eduardo Leggiero , Emmanuel Bourg , Filip Hanik , Gareth Evans , Hal Deadman , Hui Wang , Igal Sapir , Jean-Frederic Clere , Knut Sander , Konstantin Kolinko , Malay Shah , Mark Thomas , Martin Tzvetanov Grigorov , Michael Osipov , Michael Seele , Piotr P. Karwasz , Piotr P. Karwasz , Poison , Rainer Jung , Robert Rodewald , Romain Manni-B ucau , Shi.Kun <34267068+pachul...@users.noreply.github.com>, Tim Lewis , Youyu Song , Zishuo Ding , crisgeek <88733156+crisg...@users.noreply.github.com>, dastan , dn121049 , dsoumis , jiangtao , lakeoffaith , lihan , lihan , liym@home , remm , sim-lus <67785631+sim-...@users.noreply.github.com>, t-gergely <8715996+t-gerg...@users.noreply.github.com>, thomasma , zhenguoli Build Text: build successful Status Detected: passing build Build Source Stamp: [branch 10.1.x] 152dc92d7f31120870b60f3d94f7b08e679a8a1e Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 1 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Avoid overriding non-abstract methods
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 38577bb412 Avoid overriding non-abstract methods 38577bb412 is described below commit 38577bb41265da04f25013422fc01016f7a5b919 Author: Mark Thomas AuthorDate: Wed Oct 12 16:42:23 2022 +0100 Avoid overriding non-abstract methods Longer term, consider making more methods in AbstractHttp11Protocol final --- java/org/apache/coyote/http11/AbstractHttp11Protocol.java | 4 +--- java/org/apache/coyote/http11/Http11Nio2Protocol.java | 7 ++- java/org/apache/coyote/http11/Http11NioProtocol.java | 7 ++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java index e03a256638..422943ddab 100644 --- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java +++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java @@ -719,9 +719,7 @@ public abstract class AbstractHttp11Protocol extends AbstractProtocol { // - Common code @Override -protected Processor createProcessor() { -return new Http11Processor(this, adapter); -} +protected abstract Processor createProcessor(); @Override diff --git a/java/org/apache/coyote/http11/Http11Nio2Protocol.java b/java/org/apache/coyote/http11/Http11Nio2Protocol.java index c5754b6222..da91eb3581 100644 --- a/java/org/apache/coyote/http11/Http11Nio2Protocol.java +++ b/java/org/apache/coyote/http11/Http11Nio2Protocol.java @@ -16,6 +16,7 @@ */ package org.apache.coyote.http11; +import org.apache.coyote.Processor; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.net.Nio2Channel; @@ -39,7 +40,11 @@ public class Http11Nio2Protocol extends AbstractHttp11Protocol { protected Log getLog() { return log; } -// - JMX related methods +@Override +protected Processor createProcessor() { +return new Http11Processor(this, adapter); +} + @Override protected String getNamePrefix() { diff --git a/java/org/apache/coyote/http11/Http11NioProtocol.java b/java/org/apache/coyote/http11/Http11NioProtocol.java index e9271025ef..9af112ceb5 100644 --- a/java/org/apache/coyote/http11/Http11NioProtocol.java +++ b/java/org/apache/coyote/http11/Http11NioProtocol.java @@ -16,6 +16,7 @@ */ package org.apache.coyote.http11; +import org.apache.coyote.Processor; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.net.NioChannel; @@ -63,7 +64,11 @@ public class Http11NioProtocol extends AbstractHttp11Protocol { } -// - JMX related methods +@Override +protected Processor createProcessor() { +return new Http11Processor(this, adapter); +} + @Override protected String getNamePrefix() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot success in on tomcat-9.0.x
Build status: Build succeeded! Worker used: bb2_worker2_ubuntu URL: https://ci2.apache.org/#builders/37/builds/359 Blamelist: Mark Thomas Build Text: build successful Status Detected: passing build Build Source Stamp: [branch 9.0.x] c17bfe7d8ff3b7fe489ae0e9782139f2d3264002 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 0 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot success in on tomcat-8.5.x
Build status: Build succeeded! Worker used: bb2_worker2_ubuntu URL: https://ci2.apache.org/#builders/36/builds/310 Blamelist: Mark Thomas Build Text: build successful Status Detected: passing build Build Source Stamp: [branch 8.5.x] c8a742fb52f23b4b92be6b2525ddc12984060603 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 1 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot success in on tomcat-11.0.x
Build status: Build succeeded! Worker used: bb2_worker2_ubuntu URL: https://ci2.apache.org/#builders/112/builds/4 Blamelist: Mark Thomas Build Text: build successful Status Detected: passing build Build Source Stamp: [branch main] 38577bb41265da04f25013422fc01016f7a5b919 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 1 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Buildbot success in on tomcat-11.0.x
Hi all, The good news is obviously that buildbot notifications are working again. They should be configured to only report on state changes. i.e. passing -> failing or failing -> passing. I'll take another look at the configuration and see what I got wrong. I am aware that Tomcat Native is not currently setup correctly for buildbot. Fixing that is on my TODO list too. Mark On 12/10/2022 18:27, build...@apache.org wrote: Build status: Build succeeded! Worker used: bb2_worker2_ubuntu URL: https://ci2.apache.org/#builders/112/builds/4 Blamelist: Mark Thomas Build Text: build successful Status Detected: passing build Build Source Stamp: [branch main] 38577bb41265da04f25013422fc01016f7a5b919 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 1 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 66294] Util.getContextClassLoader() can be a hotspot
https://bz.apache.org/bugzilla/show_bug.cgi?id=66294 --- Comment #1 from Mark Thomas --- Given that the SecurityManager is heading towards deprecation, why not just run without a SecurityManager to avoid this hotspot? -- 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 main updated: Use a valid date format for the expires attribute of a cookie
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new ee131cd0d9 Use a valid date format for the expires attribute of a cookie ee131cd0d9 is described below commit ee131cd0d9278c6cdc77191643d9b1ae1d8fac22 Author: Mark Thomas AuthorDate: Wed Oct 12 19:28:03 2022 +0100 Use a valid date format for the expires attribute of a cookie Note: The format used prior to this change is not listed as a valid format in any of the relevant specifications. --- java/org/apache/tomcat/util/http/CookieProcessorBase.java| 2 +- .../apache/tomcat/util/http/TestCookieProcessorGeneration.java | 2 +- webapps/docs/changelog.xml | 9 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/http/CookieProcessorBase.java b/java/org/apache/tomcat/util/http/CookieProcessorBase.java index 47fbe58f69..5c3b08bfd9 100644 --- a/java/org/apache/tomcat/util/http/CookieProcessorBase.java +++ b/java/org/apache/tomcat/util/http/CookieProcessorBase.java @@ -24,7 +24,7 @@ import java.util.TimeZone; public abstract class CookieProcessorBase implements CookieProcessor { -private static final String COOKIE_DATE_PATTERN = "EEE, dd-MMM- HH:mm:ss z"; +private static final String COOKIE_DATE_PATTERN = "EEE, dd MMM HH:mm:ss z"; protected static final ThreadLocal COOKIE_DATE_FORMAT = ThreadLocal.withInitial(() -> { diff --git a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java index 3ec05ae3a2..b74a851a16 100644 --- a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java +++ b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java @@ -102,7 +102,7 @@ public class TestCookieProcessorGeneration { @Test public void testMaxAgeZero() { -doTestMaxAge(0, "foo=bar; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT"); +doTestMaxAge(0, "foo=bar; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:10 GMT"); } @Test diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 3fa3fe7901..1b73b65c60 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -113,6 +113,15 @@ + + + +Correct the date format used with the expires attribute of HTTP cookies. +A single space rather than a single dash should be used to separate the +day, month and year components to be compliant with RFC 6265. (markt) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.1.x updated: Use a valid date format for the expires attribute of a cookie
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 728e2e605a Use a valid date format for the expires attribute of a cookie 728e2e605a is described below commit 728e2e605a01f214c458566d76200b56dcfb7464 Author: Mark Thomas AuthorDate: Wed Oct 12 19:28:03 2022 +0100 Use a valid date format for the expires attribute of a cookie Note: The format used prior to this change is not listed as a valid format in any of the relevant specifications. --- java/org/apache/tomcat/util/http/CookieProcessorBase.java| 2 +- .../apache/tomcat/util/http/TestCookieProcessorGeneration.java | 2 +- webapps/docs/changelog.xml | 9 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/http/CookieProcessorBase.java b/java/org/apache/tomcat/util/http/CookieProcessorBase.java index 47fbe58f69..5c3b08bfd9 100644 --- a/java/org/apache/tomcat/util/http/CookieProcessorBase.java +++ b/java/org/apache/tomcat/util/http/CookieProcessorBase.java @@ -24,7 +24,7 @@ import java.util.TimeZone; public abstract class CookieProcessorBase implements CookieProcessor { -private static final String COOKIE_DATE_PATTERN = "EEE, dd-MMM- HH:mm:ss z"; +private static final String COOKIE_DATE_PATTERN = "EEE, dd MMM HH:mm:ss z"; protected static final ThreadLocal COOKIE_DATE_FORMAT = ThreadLocal.withInitial(() -> { diff --git a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java index 3ec05ae3a2..b74a851a16 100644 --- a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java +++ b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java @@ -102,7 +102,7 @@ public class TestCookieProcessorGeneration { @Test public void testMaxAgeZero() { -doTestMaxAge(0, "foo=bar; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT"); +doTestMaxAge(0, "foo=bar; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:10 GMT"); } @Test diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 7f4dc123d8..c42a13b3f7 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,6 +105,15 @@ issues do not "pop up" wrt. others). --> + + + +Correct the date format used with the expires attribute of HTTP cookies. +A single space rather than a single dash should be used to separate the +day, month and year components to be compliant with RFC 6265. (markt) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Use a valid date format for the expires attribute of a cookie
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 d641a43b8a Use a valid date format for the expires attribute of a cookie d641a43b8a is described below commit d641a43b8a1a0a09862e101c304d2874b0771c6e Author: Mark Thomas AuthorDate: Wed Oct 12 19:28:03 2022 +0100 Use a valid date format for the expires attribute of a cookie Note: The format used prior to this change is not listed as a valid format in any of the relevant specifications. --- java/org/apache/tomcat/util/http/CookieProcessorBase.java| 2 +- .../apache/tomcat/util/http/TestCookieProcessorGeneration.java | 2 +- webapps/docs/changelog.xml | 9 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/http/CookieProcessorBase.java b/java/org/apache/tomcat/util/http/CookieProcessorBase.java index 47fbe58f69..5c3b08bfd9 100644 --- a/java/org/apache/tomcat/util/http/CookieProcessorBase.java +++ b/java/org/apache/tomcat/util/http/CookieProcessorBase.java @@ -24,7 +24,7 @@ import java.util.TimeZone; public abstract class CookieProcessorBase implements CookieProcessor { -private static final String COOKIE_DATE_PATTERN = "EEE, dd-MMM- HH:mm:ss z"; +private static final String COOKIE_DATE_PATTERN = "EEE, dd MMM HH:mm:ss z"; protected static final ThreadLocal COOKIE_DATE_FORMAT = ThreadLocal.withInitial(() -> { diff --git a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java index ef0ffc94ab..a58004c2f3 100644 --- a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java +++ b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java @@ -188,7 +188,7 @@ public class TestCookieProcessorGeneration { @Test public void v1TestMaxAgeZero() { doV1TestMaxAge(0, "foo=bar; Version=1; Max-Age=0", -"foo=bar; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT"); +"foo=bar; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:10 GMT"); } @Test diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 230a790e20..fc319f9831 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,6 +105,15 @@ issues do not "pop up" wrt. others). --> + + + +Correct the date format used with the expires attribute of HTTP cookies. +A single space rather than a single dash should be used to separate the +day, month and year components to be compliant with RFC 6265. (markt) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Use a valid date format for the expires attribute of a cookie
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 9c78c2e66a Use a valid date format for the expires attribute of a cookie 9c78c2e66a is described below commit 9c78c2e66a409653f22398506e03e92c2ee79f29 Author: Mark Thomas AuthorDate: Wed Oct 12 19:28:03 2022 +0100 Use a valid date format for the expires attribute of a cookie Note: The format used prior to this change is not listed as a valid format in any of the relevant specifications. --- java/org/apache/tomcat/util/http/CookieProcessorBase.java| 2 +- .../apache/tomcat/util/http/TestCookieProcessorGeneration.java | 2 +- webapps/docs/changelog.xml | 9 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/http/CookieProcessorBase.java b/java/org/apache/tomcat/util/http/CookieProcessorBase.java index f00fc95046..8c4dc1e449 100644 --- a/java/org/apache/tomcat/util/http/CookieProcessorBase.java +++ b/java/org/apache/tomcat/util/http/CookieProcessorBase.java @@ -27,7 +27,7 @@ import javax.servlet.http.HttpServletRequest; public abstract class CookieProcessorBase implements CookieProcessor { -private static final String COOKIE_DATE_PATTERN = "EEE, dd-MMM- HH:mm:ss z"; +private static final String COOKIE_DATE_PATTERN = "EEE, dd MMM HH:mm:ss z"; protected static final ThreadLocal COOKIE_DATE_FORMAT = new ThreadLocal() { diff --git a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java index ef0ffc94ab..a58004c2f3 100644 --- a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java +++ b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java @@ -188,7 +188,7 @@ public class TestCookieProcessorGeneration { @Test public void v1TestMaxAgeZero() { doV1TestMaxAge(0, "foo=bar; Version=1; Max-Age=0", -"foo=bar; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT"); +"foo=bar; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:10 GMT"); } @Test diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index b80f38b47d..a30788b515 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,6 +105,15 @@ issues do not "pop up" wrt. others). --> + + + +Correct the date format used with the expires attribute of HTTP cookies. +A single space rather than a single dash should be used to separate the +day, month and year components to be compliant with RFC 6265. (markt) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch main updated: Use a valid date format for the expires attribute of a cookie
On 12/10/2022 19:28, ma...@apache.org wrote: This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new ee131cd0d9 Use a valid date format for the expires attribute of a cookie ee131cd0d9 is described below commit ee131cd0d9278c6cdc77191643d9b1ae1d8fac22 Author: Mark Thomas AuthorDate: Wed Oct 12 19:28:03 2022 +0100 Use a valid date format for the expires attribute of a cookie Note: The format used prior to this change is not listed as a valid format in any of the relevant specifications. For the curious we were using a combination of the Netscape V0 cookie spec expires format and the RFC 6265 format. We either needed to remove the comma after the day name to get the V0 format or swap the dashes for spaces to get the RFC 6265 format. Given we are meant to be using RFC 6265 format cookies, I went with the RFC 6265 format. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org