Re: [tomcat] branch 10.1.x updated: Refactor to reduce native calls
Mark, I'm curious:: was thi identified as a hot spot? My initial reactioon was "doesn't the JIT inline this sort of thing"? -chris On 2/24/23 10:20, ma...@apache.org wrote: 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 0064bc6933 Refactor to reduce native calls 0064bc6933 is described below commit 0064bc69334bb40e5fae381b5b1b3506b73bb044 Author: Mark Thomas AuthorDate: Fri Feb 24 14:59:43 2023 + Refactor to reduce native calls Thread.currentThread() is a native call so ensure it is only used once per method, caching the result in a local variable if it is used more than once. Note: some instances of caching aren't strictly necessary but are a side-effect of the refactoring. --- java/org/apache/catalina/ant/ValidatorTask.java| 7 +- .../core/JreMemoryLeakPreventionListener.java | 7 +- java/org/apache/catalina/core/StandardContext.java | 14 ++-- java/org/apache/catalina/core/StandardServer.java | 5 +- .../catalina/ha/context/ReplicatedContext.java | 7 +- .../apache/catalina/ha/session/DeltaManager.java | 7 +- .../apache/catalina/ha/session/DeltaSession.java | 7 +- java/org/apache/catalina/loader/WebappLoader.java | 7 +- java/org/apache/catalina/realm/JAASRealm.java | 10 +-- java/org/apache/catalina/realm/JNDIRealm.java | 80 +- .../apache/catalina/servlets/DefaultServlet.java | 10 +-- .../tribes/membership/McastServiceImpl.java| 37 +- .../membership/StaticMembershipProvider.java | 14 ++-- .../membership/cloud/CloudMembershipProvider.java | 7 +- .../catalina/valves/StuckThreadDetectionValve.java | 5 +- java/org/apache/coyote/AsyncStateMachine.java | 13 ++-- java/org/apache/jasper/JspC.java | 9 +-- .../apache/jasper/compiler/ELFunctionMapper.java | 5 +- .../apache/jasper/compiler/JspDocumentParser.java | 10 +-- .../apache/jasper/compiler/TagPluginManager.java | 13 ++-- java/org/apache/naming/ContextBindings.java| 10 +-- .../tomcat/util/descriptor/tld/TldParser.java | 11 +-- .../tomcat/util/security/PrivilegedGetTccl.java| 15 +++- .../tomcat/util/security/PrivilegedSetTccl.java| 1 + .../tomcat/util/threads/ThreadPoolExecutor.java| 6 +- .../tomcat/websocket/AsyncChannelGroupUtil.java| 8 +-- .../tomcat/websocket/server/WsFrameServer.java | 14 ++-- .../TestWebappClassLoaderExecutorMemoryLeak.java | 11 ++- .../catalina/startup/TestTomcatClassLoader.java| 7 +- .../org/apache/juli/TestClassLoaderLogManager.java | 7 +- 30 files changed, 207 insertions(+), 157 deletions(-) diff --git a/java/org/apache/catalina/ant/ValidatorTask.java b/java/org/apache/catalina/ant/ValidatorTask.java index fbe360dd0a..81d3997bc4 100644 --- a/java/org/apache/catalina/ant/ValidatorTask.java +++ b/java/org/apache/catalina/ant/ValidatorTask.java @@ -81,8 +81,9 @@ public class ValidatorTask extends BaseRedirectorHelperTask { } // Commons-logging likes having the context classloader set -ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader(ValidatorTask.class.getClassLoader()); +Thread currentThread = Thread.currentThread(); +ClassLoader oldCL = currentThread.getContextClassLoader(); + currentThread.setContextClassLoader(ValidatorTask.class.getClassLoader()); // Called through trusted manager interface. If running under a // SecurityManager assume that untrusted applications may be deployed. @@ -100,7 +101,7 @@ public class ValidatorTask extends BaseRedirectorHelperTask { handleErrorOutput("Validation failure: " + e); } } finally { -Thread.currentThread().setContextClassLoader(oldCL); +currentThread.setContextClassLoader(oldCL); closeRedirector(); } diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index 5d87a8f5d4..df675f6b11 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -127,12 +127,13 @@ public class JreMemoryLeakPreventionListener implements LifecycleListener { DriverManager.getDrivers(); } -ClassLoader loader = Thread.currentThread().getContextClassLoader(); +Thread currentThread = Thread.currentThread(); +ClassLoader loader = currentThread.getContextClassLoader(); try { // Use the system classloader as the victim for al
Re: [tomcat] branch 10.1.x updated: Refactor to reduce native calls
On 25/02/2023 12:37, Christopher Schultz wrote: Mark, I'm curious:: was thi identified as a hot spot? My initial reactioon was "doesn't the JIT inline this sort of thing"? My understanding from the pages I stumbled across (while looking into ThreadLocal and Loom) was that native calls like this were not inlined. Mark -chris On 2/24/23 10:20, ma...@apache.org wrote: 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 0064bc6933 Refactor to reduce native calls 0064bc6933 is described below commit 0064bc69334bb40e5fae381b5b1b3506b73bb044 Author: Mark Thomas AuthorDate: Fri Feb 24 14:59:43 2023 + Refactor to reduce native calls Thread.currentThread() is a native call so ensure it is only used once per method, caching the result in a local variable if it is used more than once. Note: some instances of caching aren't strictly necessary but are a side-effect of the refactoring. --- java/org/apache/catalina/ant/ValidatorTask.java | 7 +- .../core/JreMemoryLeakPreventionListener.java | 7 +- java/org/apache/catalina/core/StandardContext.java | 14 ++-- java/org/apache/catalina/core/StandardServer.java | 5 +- .../catalina/ha/context/ReplicatedContext.java | 7 +- .../apache/catalina/ha/session/DeltaManager.java | 7 +- .../apache/catalina/ha/session/DeltaSession.java | 7 +- java/org/apache/catalina/loader/WebappLoader.java | 7 +- java/org/apache/catalina/realm/JAASRealm.java | 10 +-- java/org/apache/catalina/realm/JNDIRealm.java | 80 +- .../apache/catalina/servlets/DefaultServlet.java | 10 +-- .../tribes/membership/McastServiceImpl.java | 37 +- .../membership/StaticMembershipProvider.java | 14 ++-- .../membership/cloud/CloudMembershipProvider.java | 7 +- .../catalina/valves/StuckThreadDetectionValve.java | 5 +- java/org/apache/coyote/AsyncStateMachine.java | 13 ++-- java/org/apache/jasper/JspC.java | 9 +-- .../apache/jasper/compiler/ELFunctionMapper.java | 5 +- .../apache/jasper/compiler/JspDocumentParser.java | 10 +-- .../apache/jasper/compiler/TagPluginManager.java | 13 ++-- java/org/apache/naming/ContextBindings.java | 10 +-- .../tomcat/util/descriptor/tld/TldParser.java | 11 +-- .../tomcat/util/security/PrivilegedGetTccl.java | 15 +++- .../tomcat/util/security/PrivilegedSetTccl.java | 1 + .../tomcat/util/threads/ThreadPoolExecutor.java | 6 +- .../tomcat/websocket/AsyncChannelGroupUtil.java | 8 +-- .../tomcat/websocket/server/WsFrameServer.java | 14 ++-- .../TestWebappClassLoaderExecutorMemoryLeak.java | 11 ++- .../catalina/startup/TestTomcatClassLoader.java | 7 +- .../org/apache/juli/TestClassLoaderLogManager.java | 7 +- 30 files changed, 207 insertions(+), 157 deletions(-) diff --git a/java/org/apache/catalina/ant/ValidatorTask.java b/java/org/apache/catalina/ant/ValidatorTask.java index fbe360dd0a..81d3997bc4 100644 --- a/java/org/apache/catalina/ant/ValidatorTask.java +++ b/java/org/apache/catalina/ant/ValidatorTask.java @@ -81,8 +81,9 @@ public class ValidatorTask extends BaseRedirectorHelperTask { } // Commons-logging likes having the context classloader set - ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader(ValidatorTask.class.getClassLoader()); + Thread currentThread = Thread.currentThread(); + ClassLoader oldCL = currentThread.getContextClassLoader(); + currentThread.setContextClassLoader(ValidatorTask.class.getClassLoader()); // Called through trusted manager interface. If running under a // SecurityManager assume that untrusted applications may be deployed. @@ -100,7 +101,7 @@ public class ValidatorTask extends BaseRedirectorHelperTask { handleErrorOutput("Validation failure: " + e); } } finally { - Thread.currentThread().setContextClassLoader(oldCL); + currentThread.setContextClassLoader(oldCL); closeRedirector(); } diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index 5d87a8f5d4..df675f6b11 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -127,12 +127,13 @@ public class JreMemoryLeakPreventionListener implements LifecycleListener { DriverManager.getDrivers(); } - ClassLoader loader = Thread.currentThread().getContextClassLoader(); + Thread current
[Bug 66491] New: NullPointerException when resolving webapp JARs as resources
https://bz.apache.org/bugzilla/show_bug.cgi?id=66491 Bug ID: 66491 Summary: NullPointerException when resolving webapp JARs as resources Product: Tomcat 10 Version: 10.1.6 Hardware: PC OS: Mac OS X 10.1 Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: mmoay...@apache.org Target Milestone: -- I am running a Spring Boot 3.0.3 web application with an embedded Apache Tomcat 10.1.6 container on JDK 17. Spring Boot 3.0.3 officially supports Tomcat 10.1.5 and I decided to upgrade to experiment. My application ultimately produces a WAR file and can be run as an executable WAR file using the likes of "java -jar...". When the app runs, the following exception shows up: Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory$LoaderHidingResourceRoot@17b37e9a] at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:878) ... 37 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory$LoaderHidingResourceRoot@17b37e9a] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4566) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4699) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:871) ... 37 more Caused by: java.lang.NullPointerException: Cannot invoke "java.net.URL.getProtocol()" because "url" is null at org.apache.catalina.webresources.StandardRoot$BaseLocation.(StandardRoot.java:815) at org.apache.catalina.webresources.StandardRoot.createWebResourceSet(StandardRoot.java:357) at org.apache.catalina.webresources.StandardRoot.processWebInfLib(StandardRoot.java:588) at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:721) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ... 46 more If it helps, you can also see this failure in action here: https://github.com/mmoayyed/cas/actions/runs/4269310213/jobs/7432837455 This is not the case with Apache Tomcat 10.1.5 (which is what Spring Boot 3.0.3 officially supports as of this writing) I was not able to exactly pinpoint what might have changed, but debugging through the code and following stack-trace I am able to track it down to this block: protected void processWebInfLib() throws LifecycleException { WebResource[] possibleJars = listResources("/WEB-INF/lib", false); for (WebResource possibleJar : possibleJars) { if (possibleJar.isFile() && possibleJar.getName().endsWith(".jar")) { createWebResourceSet(ResourceSetType.CLASSES_JAR, "/WEB-INF/classes", possibleJar.getURL(), "/"); } } } The issue stems from the fact that "possibleJar.getURL()" returns null. The getURL() method does the following: @Override public URL getURL() { String url = baseUrl + URLEncoder.DEFAULT.encode(resource.getName(), StandardCharsets.UTF_8); try { return new URI(url).toURL(); } catch (MalformedURLException | URISyntaxException e) { if (getLog().isDebugEnabled()) { getLog().debug(sm.getString("fileResource.getUrlFail", url), e); } return null; } } The "url" that is processed above has the prefix "war:", which I think is causing this failure. Please note that deploy the web application into an standalone external tomcat distribution works OK. This appears to mainly be an issue with the embedded tomcat and WARs. -- You are receiving this mail because: You are the assignee for the bug. ---
[Bug 66488] MessageBytes#toBytesSimple overwrites request byte buffer
https://bz.apache.org/bugzilla/show_bug.cgi?id=66488 --- Comment #2 from Mark Thomas --- Note the breakpoint / debug reproduction is likely because the debugger is calling toString() on the MessageBytes instance oin order to display it. -- 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 66491] NullPointerException when resolving webapp JARs as resources
https://bz.apache.org/bugzilla/show_bug.cgi?id=66491 --- Comment #1 from Mark Thomas --- Likely related to this change since the WAR protocol isn't being picked up: Switch to using the ServiceLoader mechanism to load the custom URL protocol handlers that Tomcat uses. (markt) I thought the embedded JAR had the necessary META-INF/services entry. Let me check that. -- 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 66491] NullPointerException when resolving webapp JARs as resources
https://bz.apache.org/bugzilla/show_bug.cgi?id=66491 --- Comment #2 from Mark Thomas --- It looks to be missing in my local build. Need to figure out why as the necessary plumbing appears to be in place in the build script. -- 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 66488] MessageBytes#toBytesSimple overwrites request byte buffer
https://bz.apache.org/bugzilla/show_bug.cgi?id=66488 --- Comment #3 from Konstantin Kolinko --- (In reply to Fabian Günter from comment #0) > In 9.0.71 the code for MessageBytes#toBytes was changed to call the newly > introduced MessageBytes#toSimpleBytes method which incorrectly assumes that > byteC.getBuffer's retured array is a copy of the original request string Honestly, I do not follow your explanation. A byteC.getBuffer() call returns ByteChunk.buff. That is a byte[] array that is owned by that ByteChunk. The buff field in ByteChunk is initialized as null (by ByteChunk() constructor) or as a "new byte[initial]" (by other constructor calling allocate(..)). The only way that it may be changed to an externally created array is via a ByteChunk.setBytes(...) call. What call to ByteChunk.setBytes(...) passes such a shared array? > Every instance of MessageByte created early in the request processing > gets passed a reference to the same byte array > (which is documented in java.nio.ByteBuffer#array) I do not see such documentation. The javadoc of that method says "Returns the byte array that backs this buffer". Do we have several ByteBuffer instances that are backed by the same array? Do we have the same ByteBuffer instance reused somewhere? To be safe, I reviewed documentation for java.nio.charset.Charset.encode(...) method that is called by MessageBytes.toBytes(). It falls through to java.nio.charset.CharsetEncoder.encode(CharBuffer) which is documented as "Returns: A newly-allocated byte buffer". I know that CharsetEncoder class is not thread-safe, but no ByteBuffer sharing occurs here. -- 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 66488] MessageBytes#toBytesSimple overwrites request byte buffer
https://bz.apache.org/bugzilla/show_bug.cgi?id=66488 --- Comment #4 from Konstantin Kolinko --- In case of odd "data mixup" errors between requests (such as one observed here), it is recommended to set discardFacades="true" on a . https://tomcat.apache.org/tomcat-9.0-doc/config/http.html In Tomcat 9.0.72 the discardFacades attribute defaults to "false". In Tomcat 10.1.x and later it defaults to "true". -- 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 66488] MessageBytes#toBytesSimple overwrites request byte buffer
https://bz.apache.org/bugzilla/show_bug.cgi?id=66488 --- Comment #5 from Fabian Günter --- (In reply to Konstantin Kolinko from comment #3) > (In reply to Fabian Günter from comment #0) > > In 9.0.71 the code for MessageBytes#toBytes was changed to call the newly > > introduced MessageBytes#toSimpleBytes method which incorrectly assumes that > > byteC.getBuffer's retured array is a copy of the original request string > > Honestly, I do not follow your explanation. > > > A byteC.getBuffer() call returns ByteChunk.buff. That is a byte[] array that > is owned by that ByteChunk. The buff field in ByteChunk is initialized as > null (by ByteChunk() constructor) or as a "new byte[initial]" (by other > constructor calling allocate(..)). > > The only way that it may be changed to an externally created array is via a > ByteChunk.setBytes(...) call. What call to ByteChunk.setBytes(...) passes > such a shared array? Well there are several places in Tomcat's code calling exactly what you said here, ByteChunk.setBytes, especially in Http11InputBuffer which is the class I'm referring to. The class has one single byteBuffer that gets shared to request, method, authentication, etc. via the .array method, as Mark confirmed. > > > Every instance of MessageByte created early in the request processing > > gets passed a reference to the same byte array > > (which is documented in java.nio.ByteBuffer#array) > > I do not see such documentation. The javadoc of that method says "Returns > the byte array that backs this buffer". > > Do we have several ByteBuffer instances that are backed by the same array? > Do we have the same ByteBuffer instance reused somewhere? > You should read more than the first line of the JavaDoc: ... Modifications to this buffer's content will cause the returned array's content to be modified, and vice versa. ... (see https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html#array() ). The byte buffer of the request is shared by all ByteChunks which is quite obvious by debugging the code. > > To be safe, I reviewed documentation for > java.nio.charset.Charset.encode(...) method that is called by > MessageBytes.toBytes(). It falls through to > java.nio.charset.CharsetEncoder.encode(CharBuffer) which is documented as > "Returns: A newly-allocated byte buffer". I know that CharsetEncoder class > is not thread-safe, but no ByteBuffer sharing occurs here. > In case of odd "data mixup" errors between requests (such as one observed > > here), > it is recommended to set discardFacades="true" on a . > https://tomcat.apache.org/tomcat-9.0-doc/config/http.html > In Tomcat 9.0.72 the discardFacades attribute defaults to "false". > In Tomcat 10.1.x and later it defaults to "true". As stated in my bug report, I'm reproducing this locally with a single request. No 'data mixup' here. -- 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 66488] MessageBytes#toBytesSimple overwrites request byte buffer
https://bz.apache.org/bugzilla/show_bug.cgi?id=66488 --- Comment #6 from Fabian Günter --- I forgot to mention again, the problem is toBytesSimple, not toBytes. -- 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 report for Tomcat Connectors [2023/02/26]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |46767|New|Enh|2009-02-25|mod_jk to send DECLINED in case no fail-over tomca| |47327|New|Enh|2009-06-07|Return tomcat authenticated user back to mod_jk (A| |47750|New|Maj|2009-08-27|ISAPI: Loss of worker settings when changing via j| |48830|New|Nor|2010-03-01|IIS shutdown blocked in endpoint service when serv| |49822|New|Enh|2010-08-25|Add hash lb worker method | |49903|New|Enh|2010-09-09|Make workers file reloadable | |52483|New|Enh|2012-01-18|Print JkOptions's options in log file and jkstatus| |54621|New|Enh|2013-02-28|[PATCH] custom mod_jk availability checks | |56489|New|Enh|2014-05-05|Include a directory for configuration files | |56576|New|Enh|2014-05-29|Websocket support | |57402|New|Enh|2014-12-30|Provide correlation ID between mod_jk log and acce| |57403|New|Enh|2014-12-30|Persist configuration changes made via status work| |57407|New|Enh|2014-12-31|Make session_cookie, session_path and session_cook| |57790|New|Enh|2015-04-03|Check worker names for typos | |61476|New|Enh|2017-09-01|Allow reset of an individual worker stat value| |61621|New|Enh|2017-10-15|Content-Type is forced to lowercase when it goes t| |62093|New|Enh|2018-02-09|Allow use_server_errors to apply to specific statu| |63808|Inf|Enh|2019-10-05|the fact that JkMount makes other directives ineff| |64775|Inf|Nor|2020-09-28|mod_jk is sending both Content-Length and Transfer| |65488|Inf|Nor|2021-08-08|Destroy method is not being called during Failover| |65901|New|Nor|2022-02-20|HTTP 401 response for a HEAD request violates HTTP| |66005|New|Nor|2022-04-11|Apache crashes, if there is a tomcat server, which| +-+---+---+--+--+ | Total 22 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Bug report for Tomcat 10 [2023/02/26]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |64353|New|Enh|2020-04-15|Add support for accessing server certificate from | |64549|New|Enh|2020-06-23|create a project module to launch Tomcat in OSGi | |64550|New|Enh|2020-06-23|create a project module to launch Tomcat in JPMS | |65124|New|Enh|2021-02-03|Inefficient generated JSP code| |65267|New|Enh|2021-04-27|Implement mod_headers like filter | |65391|New|Enh|2021-06-19|Additional user attributes queried by (some) realm| |65635|New|Enh|2021-10-15|Methods to return auth errors | |65770|New|Enh|2021-12-28|Make keys reload automatically| |66125|New|Enh|2022-06-16|JMProxy - enhance security restrictions | |66191|New|Enh|2022-08-01|compile taglibs that are not (yet) included in jsp| |66406|New|Enh|2023-01-02|JULI ClassLoaderLogManager creates multiple logger| |66491|New|Nor|2023-02-25|NullPointerException when resolving webapp JARs as| +-+---+---+--+--+ | Total 12 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Bug report for Tomcat Native [2023/02/26]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |62911|New|Enh|2018-11-15|Add support for proxying ocsp requests via ProxyH| |64826|New|Maj|2020-10-19|libtcnative prompts for private key password in so| |64862|New|Enh|2020-10-30|Improve LibreSSL support | |65344|New|Enh|2021-05-31|OpenSSL configuration | +-+---+---+--+--+ | Total4 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Bug report for Tomcat 8 [2023/02/26]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |55243|New|Enh|2013-07-11|Add special search string for nested roles| |55470|New|Enh|2013-08-23|Help users for ClassNotFoundExceptions during star| |55477|New|Enh|2013-08-23|Add a solution to map a realm name to a security r| |55675|New|Enh|2013-10-18|Checking and handling invalid configuration option| |55788|New|Enh|2013-11-16|TagPlugins should key on tag QName rather than imp| |56148|New|Enh|2014-02-17|support (multiple) ocsp stapling | |56166|New|Enh|2014-02-20|Suggestions for exception handling (avoid potentia| |56300|New|Enh|2014-03-22|[Tribes] No useful examples, lack of documentation| |56398|New|Enh|2014-04-11|Support Arquillian-based unit testing | |56402|New|Enh|2014-04-11|Add support for HTTP Upgrade to AJP components| |56438|New|Enh|2014-04-21|If jar scan does not find context config or TLD co| |56546|New|Enh|2014-05-19|Improve thread trace logging in WebappClassLoader.| |56614|New|Enh|2014-06-12|Add a switch to ignore annotations detection on ta| |56713|New|Enh|2014-07-12|Limit time that incoming request waits while webap| |56787|New|Enh|2014-07-29|Simplified jndi name parsing | |57129|Opn|Enh|2014-10-22|Regression. Load WEB-INF/lib jarfiles in alphabeti| |57130|New|Enh|2014-10-22|Allow digest.sh to accept password from a file or | |57367|New|Enh|2014-12-18|If JAR scan experiences a stack overflow, give the| |57421|New|Enh|2015-01-07|Farming default directories | |57486|New|Enh|2015-01-23|Improve reuse of ProtectedFunctionMapper instances| |57701|New|Enh|2015-03-13|Implement "[Redeploy]" button for a web applicatio| |57827|New|Enh|2015-04-17|Enable adding/removing of members via jmx in a sta| |57830|New|Enh|2015-04-18|Add support for ProxyProtocol | |57872|New|Enh|2015-04-29|Do not auto-switch session cookie to version=1 due| |58052|Opn|Enh|2015-06-19|RewriteValve: Implement additional RewriteRule dir| |58072|New|Enh|2015-06-23|ECDH curve selection | |58935|Opn|Enh|2016-01-29|Re-deploy from war without deleting context | |59232|New|Enh|2016-03-24|Make the context name of an app available via JNDI| |60849|New|Enh|2017-03-13|Tomcat NIO Connector not able to handle SSL renego| |61877|New|Enh|2017-12-08|use web.xml from CATALINA_HOME by default | |62214|New|Enh|2018-03-22|The "userSubtree=true" and "roleSubtree=true" in J| |63080|New|Enh|2019-01-16|Support rfc7239 Forwarded header | |63167|New|Enh|2019-02-12|Network Requirements To Resolve No Members Active | |63195|Inf|Enh|2019-02-21|Add easy way to test RemoteIpValve works properly | |65809|New|Enh|2022-01-19|Reduce memory footprint for long-lasting WebSocket| |65995|Inf|Nor|2022-04-06|Change JavaScript MIME type from application/javas| |66482|New|Maj|2023-02-20|Nio2 websocket timeout cause the response is no lo| +-+---+---+--+--+ | Total 37 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Bug report for Taglibs [2023/02/26]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |38193|Ass|Enh|2006-01-09|[RDC] BuiltIn Grammar support for Field | |38600|Ass|Enh|2006-02-10|[RDC] Enable RDCs to be used in X+V markup (X+RDC)| |42413|New|Enh|2007-05-14|[PATCH] Log Taglib enhancements | |46052|New|Nor|2008-10-21|SetLocaleSupport is slow to initialize when many l| |48333|New|Enh|2009-12-02|TLD generator | |57548|New|Min|2015-02-08|Auto-generate the value for org.apache.taglibs.sta| |57684|New|Min|2015-03-10|Version info should be taken from project version | |59359|New|Enh|2016-04-20|(Task) Extend validity period for signing KEY - be| |59668|New|Nor|2016-06-06|x:forEach retains the incorrect scope when used in| |61875|New|Nor|2017-12-08|Investigate whether Xalan can be removed | |64649|New|Nor|2020-08-06|XSLT transformation - document('') doesn't return | |65491|New|Nor|2021-08-09|Behavior differences with c:import when flushing o| +-+---+---+--+--+ | Total 12 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Bug report for Tomcat Modules [2023/02/26]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |50571|Inf|Nor|2011-01-11|Tomcat 7 JDBC connection pool exception enhancemen| |51595|Inf|Nor|2011-08-01|org.apache.tomcat.jdbc.pool.jmx.ConnectionPool sho| |51879|Inf|Enh|2011-09-22|Improve access to Native Connection Methods | |52024|Inf|Enh|2011-10-13|Custom interceptor to support automatic failover o| |53199|Inf|Enh|2012-05-07|Refactor ConnectionPool to use ScheduledExecutorSe| |54437|New|Enh|2013-01-16|Update PoolProperties javadoc for ConnectState int| |54929|Inf|Nor|2013-05-05|jdbc-pool cannot be used with Java 1.5, "java.lang| |55078|New|Nor|2013-06-07|Configuring a DataSource Resource with dataSourceJ| |55662|New|Enh|2013-10-17|Add a way to set an instance of java.sql.Driver di| |56046|New|Enh|2014-01-21|org.apache.tomcat.jdbc.pool.XADataSource InitSQL p| |56088|New|Maj|2014-01-29|AbstractQueryReport$StatementProxy throws exceptio| |56310|Inf|Maj|2014-03-25|PooledConnection and XAConnection not handled corr| |56586|New|Nor|2014-06-02|initSQL should be committed if defaultAutoCommit =| |56775|New|Nor|2014-07-28|PoolCleanerTime schedule issue| |56779|New|Nor|2014-07-28|Allow multiple connection initialization statement| |56790|New|Nor|2014-07-29|Resizing pool.maxActive to a higher value at runti| |56798|New|Nor|2014-07-31|Idle eviction strategy could perform better (and i| |56804|New|Nor|2014-08-02|Use a default validationQueryTimeout other than "f| |56805|New|Nor|2014-08-02|datasource.getConnection() may be unnecessarily bl| |56837|New|Nor|2014-08-11|if validationQuery have error with timeBetweenEvic| |56970|New|Nor|2014-09-11|MaxActive vs. MaxTotal for commons-dbcp and tomcat| |57460|New|Nor|2015-01-19|[DB2]Connection broken after few hours but not rem| |57729|New|Enh|2015-03-20|Add QueryExecutionReportInterceptor to log query e| |58489|Opn|Maj|2015-10-08|QueryStatsComparator throws IllegalArgumentExcepti| |59077|New|Nor|2016-02-26|DataSourceFactory creates a neutered data source | |59569|New|Nor|2016-05-18|isWrapperFor/unwrap implementations incorrect | |59879|New|Nor|2016-07-18|StatementCache interceptor returns ResultSet objec| |60195|New|Nor|2016-10-02|No javadoc in Maven Central | |60522|New|Nor|2016-12-27|An option for setting if the transaction should be| |60524|Inf|Nor|2016-12-28|NPE in SlowQueryReport in tomcat-jdbc-7.0.68 | |60645|New|Nor|2017-01-25|StatementFinalizer is not thread-safe | |61032|New|Nor|2017-04-24|min pool size is not being respected | |61103|New|Nor|2017-05-18|StatementCache potentially caching non-functional | |61302|New|Enh|2017-07-15|Refactoring of DataSourceProxy| |61303|New|Enh|2017-07-15|Refactoring of ConnectionPool | |62432|New|Nor|2018-06-06|Memory Leak in Statement Finalizer? | |62598|New|Enh|2018-08-04|support pool with multiple JDBC data sources | |62910|Inf|Nor|2018-11-15|tomcat-jdbc global pool transaction problem | |63612|Inf|Cri|2019-07-26|PooledConnection#connectUsingDriver, Thread.curren| |63705|New|Nor|2019-08-29|The tomcat pool doesn't register all connection th| |64083|New|Nor|2020-01-17|JDBC pool keeps closed connection as available| |64107|New|Maj|2020-01-30|PreparedStatements correctly closed are not return| |64231|New|Nor|2020-03-16|Tomcat jdbc pool behaviour| |64570|New|Nor|2020-07-01|Transaction not rollbacked if autocommit is false | |64809|New|Nor|2020-10-13|Connection properties not reset to defaults when C| |65347|New|Nor|2021-06-02|The equals method from statements generated by the| |65929|New|Nor|2022-03-03|Connection is not released on Connection.abort() c| +-+---+---+--+--+ | Total 47 bugs | +---+ - To unsubscribe
Bug report for Tomcat 9 [2023/02/26]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |53602|Ver|Enh|2012-07-25|Support for HTTP status code 451 | |57505|New|Enh|2015-01-27|Add integration tests for JspC| |58530|New|Enh|2015-10-23|Proposal for new Manager HTML GUI | |58548|Inf|Enh|2015-10-26|support certifcate transparency | |58859|New|Enh|2016-01-14|Allow to limit charsets / encodings supported by T| |59750|New|Enh|2016-06-24|Amend "authenticate" method with context by means | |60997|New|Enh|2017-04-17|Enhance SemaphoreValve to support denied status an| |61971|New|Enh|2018-01-06|documentation for using tomcat with systemd | |62048|New|Enh|2018-01-25|Missing logout function in Manager and Host-Manage| |62072|New|Enh|2018-02-01|Add support for request compression | |62405|New|Enh|2018-05-23|Add Rereadable Request Filter | |62488|New|Enh|2018-06-25|Obtain dependencies from Maven Central where possi| |62611|Inf|Enh|2018-08-09|Compress log files after rotation | |62773|New|Enh|2018-09-28|Change DeltaManager to handle session deserializat| |62814|New|Enh|2018-10-10|Use readable names for cluster channel/map options| |62843|New|Enh|2018-10-22|Tomcat Russian localization | |62964|Inf|Enh|2018-11-29|Add RFC7807 conformant Problem Details for HTTP st| |63023|New|Enh|2018-12-20|Provide a way to load SecurityProviders into the s| |63049|New|Enh|2018-12-31|Add support in system properties override from com| |63237|New|Enh|2019-03-06|Consider processing mbeans-descriptors.xml at comp| |63389|New|Enh|2019-04-27|Enable Servlet Warmup for Containerization| |63493|New|Enh|2019-06-10|enhancement - add JMX counters to monitor authenti| |63505|New|Enh|2019-06-14|enhancement - support of stored procedures for Dat| |63545|New|Enh|2019-07-06|enhancement - add a new pattern attribute for logg| |63943|Opn|Enh|2019-11-20|Add possibility to overwrite remote port with info| |63983|Ver|Cri|2019-12-03|Jasper builds-up open files until garbage collecti| |64230|New|Enh|2020-03-15|Allow to configure session manager to skip expirin| |64395|New|Enh|2020-04-30|Windows Installer should offer an option to select| |65208|New|Enh|2021-03-29|Multi-threaded loading of servlets| |65302|New|Enh|2021-05-12|Add support for setting com.sun.jndi.ldap.tls.cbty| |65778|Opn|Enh|2022-01-01|Don't create URL from string | |65779|Inf|Enh|2022-01-01|Introduce CATALINA_BASE_DATA | |66488|New|Nor|2023-02-24|MessageBytes#toBytesSimple overwrites request byte| +-+---+---+--+--+ | Total 33 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Replace with JDK 1.8 Integer::compareUnsigned(int, int).
This is an automated email from the ASF dual-hosted git repository. lihan 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 f459e9686e Replace with JDK 1.8 Integer::compareUnsigned(int, int). f459e9686e is described below commit f459e9686ebe2703379cdf4f182010f94f312b62 Author: lihan AuthorDate: Sun Feb 26 15:11:17 2023 +0800 Replace with JDK 1.8 Integer::compareUnsigned(int, int). --- .../apache/tomcat/util/codec/binary/BaseNCodec.java | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java index 0bfcf7312a..3575c992a8 100644 --- a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java +++ b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java @@ -148,23 +148,6 @@ public abstract class BaseNCodec { */ static final byte[] CHUNK_SEPARATOR = {'\r', '\n'}; -/** - * Compares two {@code int} values numerically treating the values - * as unsigned. Taken from JDK 1.8. - * - * TODO: Replace with JDK 1.8 Integer::compareUnsigned(int, int). - * - * @param x the first {@code int} to compare - * @param y the second {@code int} to compare - * @return the value {@code 0} if {@code x == y}; a value less - * than {@code 0} if {@code x < y} as unsigned values; and - * a value greater than {@code 0} if {@code x > y} as - * unsigned values - */ -private static int compareUnsigned(final int x, final int y) { -return Integer.compare(x + Integer.MIN_VALUE, y + Integer.MIN_VALUE); -} - /** * Create a positive capacity at least as large the minimum required capacity. * If the minimum capacity is negative then this throws an OutOfMemoryError as no array @@ -201,10 +184,10 @@ public abstract class BaseNCodec { // Overflow-conscious code treats the min and new capacity as unsigned. final int oldCapacity = context.buffer.length; int newCapacity = oldCapacity * DEFAULT_BUFFER_RESIZE_FACTOR; -if (compareUnsigned(newCapacity, minCapacity) < 0) { +if (Integer.compareUnsigned(newCapacity, minCapacity) < 0) { newCapacity = minCapacity; } -if (compareUnsigned(newCapacity, MAX_BUFFER_SIZE) > 0) { +if (Integer.compareUnsigned(newCapacity, MAX_BUFFER_SIZE) > 0) { newCapacity = createPositiveCapacity(minCapacity); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Update 'ide-intellij' target to overwrite old config.
This is an automated email from the ASF dual-hosted git repository. lihan 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 ac55dde877 Update 'ide-intellij' target to overwrite old config. ac55dde877 is described below commit ac55dde877a20dd4abbd4de8fddea0303baa9091 Author: lihan AuthorDate: Sun Feb 26 15:53:22 2023 +0800 Update 'ide-intellij' target to overwrite old config. --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 862a62e730..00983bd2ca 100644 --- a/build.xml +++ b/build.xml @@ -3798,7 +3798,7 @@ Read the Building page on the Apache Tomcat documentation site for details on ho depends="download-compile, download-test-compile" description="Creates project directory .idea for IntelliJ IDEA"> - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/02: Replace with JDK 1.8 Integer::compareUnsigned(int, int).
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 008abc31d4e68ef5b0f9bacd9b65b92d8f2a77d0 Author: lihan AuthorDate: Sun Feb 26 15:11:17 2023 +0800 Replace with JDK 1.8 Integer::compareUnsigned(int, int). --- .../apache/tomcat/util/codec/binary/BaseNCodec.java | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java index 0bfcf7312a..3575c992a8 100644 --- a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java +++ b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java @@ -148,23 +148,6 @@ public abstract class BaseNCodec { */ static final byte[] CHUNK_SEPARATOR = {'\r', '\n'}; -/** - * Compares two {@code int} values numerically treating the values - * as unsigned. Taken from JDK 1.8. - * - * TODO: Replace with JDK 1.8 Integer::compareUnsigned(int, int). - * - * @param x the first {@code int} to compare - * @param y the second {@code int} to compare - * @return the value {@code 0} if {@code x == y}; a value less - * than {@code 0} if {@code x < y} as unsigned values; and - * a value greater than {@code 0} if {@code x > y} as - * unsigned values - */ -private static int compareUnsigned(final int x, final int y) { -return Integer.compare(x + Integer.MIN_VALUE, y + Integer.MIN_VALUE); -} - /** * Create a positive capacity at least as large the minimum required capacity. * If the minimum capacity is negative then this throws an OutOfMemoryError as no array @@ -201,10 +184,10 @@ public abstract class BaseNCodec { // Overflow-conscious code treats the min and new capacity as unsigned. final int oldCapacity = context.buffer.length; int newCapacity = oldCapacity * DEFAULT_BUFFER_RESIZE_FACTOR; -if (compareUnsigned(newCapacity, minCapacity) < 0) { +if (Integer.compareUnsigned(newCapacity, minCapacity) < 0) { newCapacity = minCapacity; } -if (compareUnsigned(newCapacity, MAX_BUFFER_SIZE) > 0) { +if (Integer.compareUnsigned(newCapacity, MAX_BUFFER_SIZE) > 0) { newCapacity = createPositiveCapacity(minCapacity); } - 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 (c2f36c205f -> f8f5554b7a)
This is an automated email from the ASF dual-hosted git repository. lihan pushed a change to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from c2f36c205f Fix previous merge. Missed a few changes. new 008abc31d4 Replace with JDK 1.8 Integer::compareUnsigned(int, int). new f8f5554b7a Update 'ide-intellij' target to overwrite old config. 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: build.xml | 2 +- .../apache/tomcat/util/codec/binary/BaseNCodec.java | 21 ++--- 2 files changed, 3 insertions(+), 20 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: Update 'ide-intellij' target to overwrite old config.
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit f8f5554b7abc9ba61234525c7251a4110826fee7 Author: lihan AuthorDate: Sun Feb 26 15:53:22 2023 +0800 Update 'ide-intellij' target to overwrite old config. --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index bea41a87e3..ccc18a4229 100644 --- a/build.xml +++ b/build.xml @@ -3834,7 +3834,7 @@ Read the Building page on the Apache Tomcat documentation site for details on ho depends="download-compile, download-test-compile" description="Creates project directory .idea for IntelliJ IDEA"> - + - 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 (90a3050e93 -> 84bf5da3a6)
This is an automated email from the ASF dual-hosted git repository. lihan pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from 90a3050e93 Refactor to reduce native calls new 75d1d8736d Replace with JDK 1.8 Integer::compareUnsigned(int, int). new 84bf5da3a6 Update 'ide-intellij' target to overwrite old config. 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: build.xml | 2 +- .../apache/tomcat/util/codec/binary/BaseNCodec.java | 21 ++--- 2 files changed, 3 insertions(+), 20 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: Update 'ide-intellij' target to overwrite old config.
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 84bf5da3a6c8aac36b88b1e512e72df1278160d7 Author: lihan AuthorDate: Sun Feb 26 15:53:22 2023 +0800 Update 'ide-intellij' target to overwrite old config. --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index b420c2a59d..e07317e76d 100644 --- a/build.xml +++ b/build.xml @@ -3758,7 +3758,7 @@ Read the Building page on the Apache Tomcat documentation site for details on ho depends="download-compile, download-test-compile" description="Creates project directory .idea for IntelliJ IDEA"> - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/02: Replace with JDK 1.8 Integer::compareUnsigned(int, int).
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 75d1d8736d1bb8d1b43eeb228b1df3ca352ede57 Author: lihan AuthorDate: Sun Feb 26 15:11:17 2023 +0800 Replace with JDK 1.8 Integer::compareUnsigned(int, int). --- .../apache/tomcat/util/codec/binary/BaseNCodec.java | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java index a234da2f0c..32eaa33e5b 100644 --- a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java +++ b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java @@ -160,23 +160,6 @@ public abstract class BaseNCodec { */ static final byte[] CHUNK_SEPARATOR = {'\r', '\n'}; -/** - * Compares two {@code int} values numerically treating the values - * as unsigned. Taken from JDK 1.8. - * - * TODO: Replace with JDK 1.8 Integer::compareUnsigned(int, int). - * - * @param x the first {@code int} to compare - * @param y the second {@code int} to compare - * @return the value {@code 0} if {@code x == y}; a value less - * than {@code 0} if {@code x < y} as unsigned values; and - * a value greater than {@code 0} if {@code x > y} as - * unsigned values - */ -private static int compareUnsigned(final int x, final int y) { -return Integer.compare(x + Integer.MIN_VALUE, y + Integer.MIN_VALUE); -} - /** * Create a positive capacity at least as large the minimum required capacity. * If the minimum capacity is negative then this throws an OutOfMemoryError as no array @@ -243,10 +226,10 @@ public abstract class BaseNCodec { // Overflow-conscious code treats the min and new capacity as unsigned. final int oldCapacity = context.buffer.length; int newCapacity = oldCapacity * DEFAULT_BUFFER_RESIZE_FACTOR; -if (compareUnsigned(newCapacity, minCapacity) < 0) { +if (Integer.compareUnsigned(newCapacity, minCapacity) < 0) { newCapacity = minCapacity; } -if (compareUnsigned(newCapacity, MAX_BUFFER_SIZE) > 0) { +if (Integer.compareUnsigned(newCapacity, MAX_BUFFER_SIZE) > 0) { newCapacity = createPositiveCapacity(minCapacity); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org