(tomcat) branch main updated: Code clean-up - formatting. No functional change.
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 62c255be69 Code clean-up - formatting. No functional change. 62c255be69 is described below commit 62c255be69c9104661f5a8a2d5127164c79f2ff0 Author: Mark Thomas AuthorDate: Thu May 22 14:05:47 2025 +0100 Code clean-up - formatting. No functional change. --- .../util/collections/CaseInsensitiveKeyMap.java| 27 --- .../tomcat/util/collections/ConcurrentCache.java | 2 +- .../util/collections/ConcurrentLruCache.java | 4 +-- .../collections/ManagedConcurrentWeakHashMap.java | 30 +- .../tomcat/util/collections/SynchronizedQueue.java | 8 +++--- .../tomcat/util/collections/SynchronizedStack.java | 8 +++--- 6 files changed, 32 insertions(+), 47 deletions(-) diff --git a/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java b/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java index 2ee7cfbc38..d2566a5c43 100644 --- a/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java +++ b/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java @@ -27,11 +27,9 @@ import java.util.Set; import org.apache.tomcat.util.res.StringManager; /** - * A Map implementation that uses case-insensitive (using {@link - * Locale#ENGLISH}) strings as keys. + * A Map implementation that uses case-insensitive (using {@link Locale#ENGLISH}) strings as keys. * - * Keys must be instances of {@link String}. Note that this means that - * null keys are not permitted. + * Keys must be instances of {@link String}. Note that this means that null keys are not permitted. * * This implementation is not thread-safe. * @@ -39,8 +37,7 @@ import org.apache.tomcat.util.res.StringManager; */ public class CaseInsensitiveKeyMap extends AbstractMap { -private static final StringManager sm = -StringManager.getManager(CaseInsensitiveKeyMap.class); +private static final StringManager sm = StringManager.getManager(CaseInsensitiveKeyMap.class); private final Map map = new HashMap<>(); @@ -64,12 +61,11 @@ public class CaseInsensitiveKeyMap extends AbstractMap { /** * {@inheritDoc} * - * Use this method with caution. If the input Map contains duplicate - * keys when the keys are compared in a case-insensitive manner then some - * values will be lost when inserting via this method. + * Use this method with caution. If the input Map contains duplicate keys when the keys are compared in a + * case-insensitive manner then some values will be lost when inserting via this method. */ @Override -public void putAll(Map m) { +public void putAll(Map m) { super.putAll(m); } @@ -87,7 +83,7 @@ public class CaseInsensitiveKeyMap extends AbstractMap { @Override -public Set> entrySet() { +public Set> entrySet() { return new EntrySet<>(map.entrySet()); } @@ -112,8 +108,7 @@ public class CaseInsensitiveKeyMap extends AbstractMap { } -private record EntryIterator( -Iterator> iterator) implements Iterator> { +private record EntryIterator(Iterator> iterator) implements Iterator> { @Override public boolean hasNext() { @@ -121,8 +116,8 @@ public class CaseInsensitiveKeyMap extends AbstractMap { } @Override -public Entry next() { -Entry entry = iterator.next(); +public Entry next() { +Entry entry = iterator.next(); return new EntryImpl<>(entry.getKey().getKey(), entry.getValue()); } @@ -133,7 +128,7 @@ public class CaseInsensitiveKeyMap extends AbstractMap { } -private record EntryImpl(String key, V value) implements Entry { +private record EntryImpl(String key, V value) implements Entry { @Override public String getKey() { diff --git a/java/org/apache/tomcat/util/collections/ConcurrentCache.java b/java/org/apache/tomcat/util/collections/ConcurrentCache.java index 7eff23e567..6355d7d830 100644 --- a/java/org/apache/tomcat/util/collections/ConcurrentCache.java +++ b/java/org/apache/tomcat/util/collections/ConcurrentCache.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.WeakHashMap; import java.util.concurrent.ConcurrentHashMap; -public final class ConcurrentCache { +public final class ConcurrentCache { private final int size; diff --git a/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java b/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java index 031ec8c094..7e5102b1c7 100644 --- a/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java +++ b/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java @@ -77,7 +77,7 @@ public class ConcurrentLruCach
(tomcat) branch main updated: Code clean-up - formatting. No functional change.
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 bc2bc1c202 Code clean-up - formatting. No functional change. bc2bc1c202 is described below commit bc2bc1c20275b696d125b7a97cd98ae8e03e95fc Author: Mark Thomas AuthorDate: Thu May 22 14:34:29 2025 +0100 Code clean-up - formatting. No functional change. --- .../tomcat/util/descriptor/DigesterFactory.java| 35 -- .../tomcat/util/descriptor/LocalResolver.java | 43 -- .../tomcat/util/descriptor/XmlErrorHandler.java| 9 ++--- .../tomcat/util/descriptor/XmlIdentifiers.java | 33 ++--- 4 files changed, 44 insertions(+), 76 deletions(-) diff --git a/java/org/apache/tomcat/util/descriptor/DigesterFactory.java b/java/org/apache/tomcat/util/descriptor/DigesterFactory.java index d282b0efa4..62a7eee6f7 100644 --- a/java/org/apache/tomcat/util/descriptor/DigesterFactory.java +++ b/java/org/apache/tomcat/util/descriptor/DigesterFactory.java @@ -31,13 +31,11 @@ import org.apache.tomcat.util.res.StringManager; import org.xml.sax.ext.EntityResolver2; /** - * Wrapper class around the Digester that hide Digester's initialization - * details. + * Wrapper class around the Digester that hide Digester's initialization details. */ public class DigesterFactory { -private static final StringManager sm = -StringManager.getManager(Constants.PACKAGE_NAME); +private static final StringManager sm = StringManager.getManager(Constants.PACKAGE_NAME); private static final Class CLASS_SERVLET_CONTEXT; private static final Class CLASS_JSP_CONTEXT; @@ -55,20 +53,18 @@ public class DigesterFactory { /** - * Mapping of well-known public IDs used by the Servlet API to the matching - * local resource. + * Mapping of well-known public IDs used by the Servlet API to the matching local resource. */ public static final Map SERVLET_API_PUBLIC_IDS; /** - * Mapping of well-known system IDs used by the Servlet API to the matching - * local resource. + * Mapping of well-known system IDs used by the Servlet API to the matching local resource. */ public static final Map SERVLET_API_SYSTEM_IDS; static { -Map publicIds = new HashMap<>(); -Map systemIds = new HashMap<>(); +Map publicIds = new HashMap<>(); +Map systemIds = new HashMap<>(); // W3C add(publicIds, XmlIdentifiers.XSD_10_PUBLIC, locationFor("XMLSchema.dtd")); @@ -165,7 +161,7 @@ public class DigesterFactory { SERVLET_API_SYSTEM_IDS = Collections.unmodifiableMap(systemIds); } -private static void addSelf(Map ids, String id) { +private static void addSelf(Map ids, String id) { String location = locationFor(id); if (location != null) { ids.put(id, location); @@ -202,22 +198,21 @@ public class DigesterFactory { /** * Create a Digester parser. - * @param xmlValidation turn on/off xml validation + * + * @param xmlValidation turn on/off xml validation * @param xmlNamespaceAware turn on/off namespace validation - * @param rule an instance of RuleSet used for parsing the xml. - * @param blockExternal turn on/off the blocking of external resources + * @param rule an instance of RuleSet used for parsing the xml. + * @param blockExternal turn on/off the blocking of external resources + * * @return a new digester */ -public static Digester newDigester(boolean xmlValidation, - boolean xmlNamespaceAware, - RuleSet rule, - boolean blockExternal) { +public static Digester newDigester(boolean xmlValidation, boolean xmlNamespaceAware, RuleSet rule, +boolean blockExternal) { Digester digester = new Digester(); digester.setNamespaceAware(xmlNamespaceAware); digester.setValidating(xmlValidation); digester.setUseContextClassLoader(true); -EntityResolver2 resolver = new LocalResolver(SERVLET_API_PUBLIC_IDS, -SERVLET_API_SYSTEM_IDS, blockExternal); +EntityResolver2 resolver = new LocalResolver(SERVLET_API_PUBLIC_IDS, SERVLET_API_SYSTEM_IDS, blockExternal); digester.setEntityResolver(resolver); if (rule != null) { digester.addRuleSet(rule); diff --git a/java/org/apache/tomcat/util/descriptor/LocalResolver.java b/java/org/apache/tomcat/util/descriptor/LocalResolver.java index dbfd593a8b..6f2d616ea6 100644 --- a/java/org/apache/tomcat/util/descriptor/LocalResolver.java +++ b/java/org/apache/tomcat/util/descriptor/LocalResolver.java @@ -34,14 +34,10 @@ import org.xml.sax.ext.Entit
(tomcat) branch 9.0.x updated: Code clean-up - formatting. No functional change.
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 11254eef6a Code clean-up - formatting. No functional change. 11254eef6a is described below commit 11254eef6a1a22b9d85e0e3d88042f2f667a8492 Author: Mark Thomas AuthorDate: Thu May 22 14:36:17 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/descriptor/Constants.java | 3 +- .../tomcat/util/descriptor/DigesterFactory.java| 35 -- .../tomcat/util/descriptor/LocalResolver.java | 42 -- .../tomcat/util/descriptor/XmlErrorHandler.java| 9 ++--- .../tomcat/util/descriptor/XmlIdentifiers.java | 33 ++--- 5 files changed, 45 insertions(+), 77 deletions(-) diff --git a/java/org/apache/tomcat/util/descriptor/Constants.java b/java/org/apache/tomcat/util/descriptor/Constants.java index 2ad599666a..5ed81c6c1b 100644 --- a/java/org/apache/tomcat/util/descriptor/Constants.java +++ b/java/org/apache/tomcat/util/descriptor/Constants.java @@ -18,8 +18,7 @@ package org.apache.tomcat.util.descriptor; public class Constants { -public static final String PACKAGE_NAME = -Constants.class.getPackage().getName(); +public static final String PACKAGE_NAME = Constants.class.getPackage().getName(); public static final boolean IS_SECURITY_ENABLED = (System.getSecurityManager() != null); } diff --git a/java/org/apache/tomcat/util/descriptor/DigesterFactory.java b/java/org/apache/tomcat/util/descriptor/DigesterFactory.java index 29470332bd..637f985a71 100644 --- a/java/org/apache/tomcat/util/descriptor/DigesterFactory.java +++ b/java/org/apache/tomcat/util/descriptor/DigesterFactory.java @@ -31,13 +31,11 @@ import org.apache.tomcat.util.res.StringManager; import org.xml.sax.ext.EntityResolver2; /** - * Wrapper class around the Digester that hide Digester's initialization - * details. + * Wrapper class around the Digester that hide Digester's initialization details. */ public class DigesterFactory { -private static final StringManager sm = -StringManager.getManager(Constants.PACKAGE_NAME); +private static final StringManager sm = StringManager.getManager(Constants.PACKAGE_NAME); private static final Class CLASS_SERVLET_CONTEXT; private static final Class CLASS_JSP_CONTEXT; @@ -55,20 +53,18 @@ public class DigesterFactory { /** - * Mapping of well-known public IDs used by the Servlet API to the matching - * local resource. + * Mapping of well-known public IDs used by the Servlet API to the matching local resource. */ public static final Map SERVLET_API_PUBLIC_IDS; /** - * Mapping of well-known system IDs used by the Servlet API to the matching - * local resource. + * Mapping of well-known system IDs used by the Servlet API to the matching local resource. */ public static final Map SERVLET_API_SYSTEM_IDS; static { -Map publicIds = new HashMap<>(); -Map systemIds = new HashMap<>(); +Map publicIds = new HashMap<>(); +Map systemIds = new HashMap<>(); // W3C add(publicIds, XmlIdentifiers.XSD_10_PUBLIC, locationFor("XMLSchema.dtd")); @@ -129,7 +125,7 @@ public class DigesterFactory { SERVLET_API_SYSTEM_IDS = Collections.unmodifiableMap(systemIds); } -private static void addSelf(Map ids, String id) { +private static void addSelf(Map ids, String id) { String location = locationFor(id); if (location != null) { ids.put(id, location); @@ -166,22 +162,21 @@ public class DigesterFactory { /** * Create a Digester parser. - * @param xmlValidation turn on/off xml validation + * + * @param xmlValidation turn on/off xml validation * @param xmlNamespaceAware turn on/off namespace validation - * @param rule an instance of RuleSet used for parsing the xml. - * @param blockExternal turn on/off the blocking of external resources + * @param rule an instance of RuleSet used for parsing the xml. + * @param blockExternal turn on/off the blocking of external resources + * * @return a new digester */ -public static Digester newDigester(boolean xmlValidation, - boolean xmlNamespaceAware, - RuleSet rule, - boolean blockExternal) { +public static Digester newDigester(boolean xmlValidation, boolean xmlNamespaceAware, RuleSet rule, +boolean blockExternal) { Digester digester = new Digester(); digester.setNamespaceAware(xmlNamespaceAware); digester.setValidating(xmlValidation); digester.setUseContextClassLoader(
(tomcat) branch 11.0.x updated: Code clean-up - formatting. No functional change.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new ef1b7452a8 Code clean-up - formatting. No functional change. ef1b7452a8 is described below commit ef1b7452a88abd807ca6eb92265e881583dcfb51 Author: Mark Thomas AuthorDate: Thu May 22 14:35:42 2025 +0100 Code clean-up - formatting. No functional change. --- .../tomcat/util/descriptor/DigesterFactory.java| 35 -- .../tomcat/util/descriptor/LocalResolver.java | 43 -- .../tomcat/util/descriptor/XmlErrorHandler.java| 9 ++--- .../tomcat/util/descriptor/XmlIdentifiers.java | 33 ++--- 4 files changed, 44 insertions(+), 76 deletions(-) diff --git a/java/org/apache/tomcat/util/descriptor/DigesterFactory.java b/java/org/apache/tomcat/util/descriptor/DigesterFactory.java index 4d67ec2ac9..ad9a772bff 100644 --- a/java/org/apache/tomcat/util/descriptor/DigesterFactory.java +++ b/java/org/apache/tomcat/util/descriptor/DigesterFactory.java @@ -31,13 +31,11 @@ import org.apache.tomcat.util.res.StringManager; import org.xml.sax.ext.EntityResolver2; /** - * Wrapper class around the Digester that hide Digester's initialization - * details. + * Wrapper class around the Digester that hide Digester's initialization details. */ public class DigesterFactory { -private static final StringManager sm = -StringManager.getManager(Constants.PACKAGE_NAME); +private static final StringManager sm = StringManager.getManager(Constants.PACKAGE_NAME); private static final Class CLASS_SERVLET_CONTEXT; private static final Class CLASS_JSP_CONTEXT; @@ -55,20 +53,18 @@ public class DigesterFactory { /** - * Mapping of well-known public IDs used by the Servlet API to the matching - * local resource. + * Mapping of well-known public IDs used by the Servlet API to the matching local resource. */ public static final Map SERVLET_API_PUBLIC_IDS; /** - * Mapping of well-known system IDs used by the Servlet API to the matching - * local resource. + * Mapping of well-known system IDs used by the Servlet API to the matching local resource. */ public static final Map SERVLET_API_SYSTEM_IDS; static { -Map publicIds = new HashMap<>(); -Map systemIds = new HashMap<>(); +Map publicIds = new HashMap<>(); +Map systemIds = new HashMap<>(); // W3C add(publicIds, XmlIdentifiers.XSD_10_PUBLIC, locationFor("XMLSchema.dtd")); @@ -157,7 +153,7 @@ public class DigesterFactory { SERVLET_API_SYSTEM_IDS = Collections.unmodifiableMap(systemIds); } -private static void addSelf(Map ids, String id) { +private static void addSelf(Map ids, String id) { String location = locationFor(id); if (location != null) { ids.put(id, location); @@ -194,22 +190,21 @@ public class DigesterFactory { /** * Create a Digester parser. - * @param xmlValidation turn on/off xml validation + * + * @param xmlValidation turn on/off xml validation * @param xmlNamespaceAware turn on/off namespace validation - * @param rule an instance of RuleSet used for parsing the xml. - * @param blockExternal turn on/off the blocking of external resources + * @param rule an instance of RuleSet used for parsing the xml. + * @param blockExternal turn on/off the blocking of external resources + * * @return a new digester */ -public static Digester newDigester(boolean xmlValidation, - boolean xmlNamespaceAware, - RuleSet rule, - boolean blockExternal) { +public static Digester newDigester(boolean xmlValidation, boolean xmlNamespaceAware, RuleSet rule, +boolean blockExternal) { Digester digester = new Digester(); digester.setNamespaceAware(xmlNamespaceAware); digester.setValidating(xmlValidation); digester.setUseContextClassLoader(true); -EntityResolver2 resolver = new LocalResolver(SERVLET_API_PUBLIC_IDS, -SERVLET_API_SYSTEM_IDS, blockExternal); +EntityResolver2 resolver = new LocalResolver(SERVLET_API_PUBLIC_IDS, SERVLET_API_SYSTEM_IDS, blockExternal); digester.setEntityResolver(resolver); if (rule != null) { digester.addRuleSet(rule); diff --git a/java/org/apache/tomcat/util/descriptor/LocalResolver.java b/java/org/apache/tomcat/util/descriptor/LocalResolver.java index dbfd593a8b..6f2d616ea6 100644 --- a/java/org/apache/tomcat/util/descriptor/LocalResolver.java +++ b/java/org/apache/tomcat/util/descriptor/LocalResolver.java @@ -34,14 +34,10 @@ import org.xml.sax.ext.E
(tomcat) branch 10.1.x updated: Code clean-up - formatting. No functional change.
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 eb1dee49a4 Code clean-up - formatting. No functional change. eb1dee49a4 is described below commit eb1dee49a4667053014384aeffc483a07e26dc04 Author: Mark Thomas AuthorDate: Thu May 22 14:35:59 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/descriptor/Constants.java | 3 +- .../tomcat/util/descriptor/DigesterFactory.java| 35 -- .../tomcat/util/descriptor/LocalResolver.java | 43 -- .../tomcat/util/descriptor/XmlErrorHandler.java| 9 ++--- .../tomcat/util/descriptor/XmlIdentifiers.java | 33 ++--- 5 files changed, 45 insertions(+), 78 deletions(-) diff --git a/java/org/apache/tomcat/util/descriptor/Constants.java b/java/org/apache/tomcat/util/descriptor/Constants.java index 2ad599666a..5ed81c6c1b 100644 --- a/java/org/apache/tomcat/util/descriptor/Constants.java +++ b/java/org/apache/tomcat/util/descriptor/Constants.java @@ -18,8 +18,7 @@ package org.apache.tomcat.util.descriptor; public class Constants { -public static final String PACKAGE_NAME = -Constants.class.getPackage().getName(); +public static final String PACKAGE_NAME = Constants.class.getPackage().getName(); public static final boolean IS_SECURITY_ENABLED = (System.getSecurityManager() != null); } diff --git a/java/org/apache/tomcat/util/descriptor/DigesterFactory.java b/java/org/apache/tomcat/util/descriptor/DigesterFactory.java index 823b4fee9f..7cd322071d 100644 --- a/java/org/apache/tomcat/util/descriptor/DigesterFactory.java +++ b/java/org/apache/tomcat/util/descriptor/DigesterFactory.java @@ -31,13 +31,11 @@ import org.apache.tomcat.util.res.StringManager; import org.xml.sax.ext.EntityResolver2; /** - * Wrapper class around the Digester that hide Digester's initialization - * details. + * Wrapper class around the Digester that hide Digester's initialization details. */ public class DigesterFactory { -private static final StringManager sm = -StringManager.getManager(Constants.PACKAGE_NAME); +private static final StringManager sm = StringManager.getManager(Constants.PACKAGE_NAME); private static final Class CLASS_SERVLET_CONTEXT; private static final Class CLASS_JSP_CONTEXT; @@ -55,20 +53,18 @@ public class DigesterFactory { /** - * Mapping of well-known public IDs used by the Servlet API to the matching - * local resource. + * Mapping of well-known public IDs used by the Servlet API to the matching local resource. */ public static final Map SERVLET_API_PUBLIC_IDS; /** - * Mapping of well-known system IDs used by the Servlet API to the matching - * local resource. + * Mapping of well-known system IDs used by the Servlet API to the matching local resource. */ public static final Map SERVLET_API_SYSTEM_IDS; static { -Map publicIds = new HashMap<>(); -Map systemIds = new HashMap<>(); +Map publicIds = new HashMap<>(); +Map systemIds = new HashMap<>(); // W3C add(publicIds, XmlIdentifiers.XSD_10_PUBLIC, locationFor("XMLSchema.dtd")); @@ -149,7 +145,7 @@ public class DigesterFactory { SERVLET_API_SYSTEM_IDS = Collections.unmodifiableMap(systemIds); } -private static void addSelf(Map ids, String id) { +private static void addSelf(Map ids, String id) { String location = locationFor(id); if (location != null) { ids.put(id, location); @@ -186,22 +182,21 @@ public class DigesterFactory { /** * Create a Digester parser. - * @param xmlValidation turn on/off xml validation + * + * @param xmlValidation turn on/off xml validation * @param xmlNamespaceAware turn on/off namespace validation - * @param rule an instance of RuleSet used for parsing the xml. - * @param blockExternal turn on/off the blocking of external resources + * @param rule an instance of RuleSet used for parsing the xml. + * @param blockExternal turn on/off the blocking of external resources + * * @return a new digester */ -public static Digester newDigester(boolean xmlValidation, - boolean xmlNamespaceAware, - RuleSet rule, - boolean blockExternal) { +public static Digester newDigester(boolean xmlValidation, boolean xmlNamespaceAware, RuleSet rule, +boolean blockExternal) { Digester digester = new Digester(); digester.setNamespaceAware(xmlNamespaceAware); digester.setValidating(xmlValidation); digester.setUseContextClassLoade
Re: Tomcat Native and OpenSSL 3.5.x
Mark, On 5/22/25 5:30 AM, Mark Thomas wrote: All, This isn't going to work for 3.5.x. We need to use a newer compiler than the one packaged with Mladen's custom Microsoft compiler bundle. I have been meaning to look at updating the Tomcat Native builds so we can use a standard Visual Studio installation. I guess it is time to spend some time looking at that. IIRC, the biggest issue with building our native components for Windows was getting the most basic version of the MSVCRT as the dependency so we didn't have to distribute a copy of the actual version used during the build. Since we build a static DLL (which I know is a contradiction in terms), does it matter which version of MSVCRT we actually use for the build? Or Am I wrong about the whole reason we have a custom build environment in the first place? -chris On 22/05/2025 08:13, Mark Thomas wrote: All, The last Tomcat Native releases were in July 2024. The Windows binaries were built with 3.0.14. There are some low severity CVEs in 3.0.14 that we don't believe apply to Tomcat's usage of OpenSSL but that may trigger a security scanner. There is a new OpenSSL LTS branch, 3.5.x, that includes support for Post Quantum Cryptography. I'd like to get a new round of Tomcat Native releases made where the Windows binaries are built with 3.5.x. My question is does this need a version bump? I'm thinking not as I'm not planning on changing the minimum OpenSSL version and these are convenience binaries. Any objections? Mark - 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 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat Native and OpenSSL 3.5.x
On Thu, May 22, 2025 at 4:09 PM Christopher Schultz wrote: > > Mark, > > On 5/22/25 3:13 AM, Mark Thomas wrote: > > All, > > > > The last Tomcat Native releases were in July 2024. The Windows binaries > > were built with 3.0.14. > > > > There are some low severity CVEs in 3.0.14 that we don't believe apply > > to Tomcat's usage of OpenSSL but that may trigger a security scanner. > > > > There is a new OpenSSL LTS branch, 3.5.x, that includes support for Post > > Quantum Cryptography. > > > > I'd like to get a new round of Tomcat Native releases made where the > > Windows binaries are built with 3.5.x. > > > > My question is does this need a version bump? I'm thinking not as I'm > > not planning on changing the minimum OpenSSL version and these are > > convenience binaries. > > > > Any objections? > > No objections as long as earlier versions are still supported. OpenSSL > has been getting better about being less incompatible with itself. :) Seems ok indeed. I read an article the other day about how RusTLS is faster and super scalable compared to OpenSSL (the article noted some progress though and that 3.5 is faster and more scalable than 3.0), but of course the C bindings are "?" and there's no compatibility with OpenSSL at all. > As I already mentioned yesterday (subject: "OpenSSL 3.5"), I just built > libtcnative and ran the whole suite of unit tests against Tomcat 11 > using OpenSSL 3.5 and things went just fine. That was on a *NIX system > which of course has a separate build process, but I just wanted to > reiterate that Tomcat and tcnative both seem perfectly happy with > OpenSSL 3.5 under the covers. Rémy > -chris > > > - > 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
Re: Tomcat Native and OpenSSL 3.5.x
On 22/05/2025 15:15, Christopher Schultz wrote: Mark, On 5/22/25 5:30 AM, Mark Thomas wrote: All, This isn't going to work for 3.5.x. We need to use a newer compiler than the one packaged with Mladen's custom Microsoft compiler bundle. I have been meaning to look at updating the Tomcat Native builds so we can use a standard Visual Studio installation. I guess it is time to spend some time looking at that. IIRC, the biggest issue with building our native components for Windows was getting the most basic version of the MSVCRT as the dependency so we didn't have to distribute a copy of the actual version used during the build. Correct. The requirement was small DLL with no dependencies that weren't already on a completely clean Windows install. Since we build a static DLL (which I know is a contradiction in terms), does it matter which version of MSVCRT we actually use for the build? Or Am I wrong about the whole reason we have a custom build environment in the first place? If that is possible, I suspect it would fail the small test. I'm making progress. I've built Tomcat Native 2.0.x with OpenSSL 3.5.0 but it looks like I've picked up too many dependencies. I'm looking at how to fix that now. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot success in on tomcat-12.0.x
Build status: Build succeeded! Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/120/builds/562 Blamelist: Mark Thomas Build Text: build successful Status Detected: restored build Build Source Stamp: [branch main] bc2bc1c20275b696d125b7a97cd98ae8e03e95fc Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 shell_7: 0 compile: 1 shell_8: 0 shell_9: 0 shell_10: 0 shell_11: 0 Rsync docs to nightlies.apache.org: 0 shell_12: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_13: 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: Minor improvement when replacing the configuration
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 39b7576c20 Minor improvement when replacing the configuration 39b7576c20 is described below commit 39b7576c206b97080a8a9e4f896b9f2abff425e9 Author: remm AuthorDate: Thu May 22 16:34:50 2025 +0200 Minor improvement when replacing the configuration --- java/org/apache/catalina/valves/rewrite/RewriteValve.java | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java b/java/org/apache/catalina/valves/rewrite/RewriteValve.java index 43ae26ea68..347e2d04f9 100644 --- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java +++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java @@ -202,6 +202,11 @@ public class RewriteValve extends ValveBase { if (containerLog == null) { containerLog = LogFactory.getLog(getContainer().getLogName() + ".rewrite"); } +for (RewriteMap map : maps.values()) { +if (map instanceof Lifecycle) { +((Lifecycle) map).stop(); +} +} maps.clear(); parse(new BufferedReader(new StringReader(configuration))); } @@ -226,6 +231,7 @@ public class RewriteValve extends ValveBase { protected void parse(BufferedReader reader) throws LifecycleException { List rules = new ArrayList<>(); List conditions = new ArrayList<>(); +ArrayList mapsConfiguration = new ArrayList<>(); while (true) { try { String line = reader.readLine(); @@ -271,12 +277,14 @@ public class RewriteValve extends ValveBase { containerLog.error(sm.getString("rewriteValve.readError"), e); } } -this.rules = rules.toArray(new RewriteRule[0]); +this.mapsConfiguration = mapsConfiguration; // Finish parsing the rules -for (RewriteRule rule : this.rules) { +for (RewriteRule rule : rules) { rule.parse(maps); } + +this.rules = rules.toArray(new RewriteRule[0]); } @Override - 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: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/44/builds/1758 Blamelist: Mark Thomas , remm Build Text: build successful Status Detected: restored build Build Source Stamp: [branch 10.1.x] eb1dee49a4667053014384aeffc483a07e26dc04 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 compile: 1 shell_7: 0 shell_8: 0 shell_9: 0 shell_10: 0 Rsync docs to nightlies.apache.org: 0 shell_11: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_12: 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 10.1.x updated (85d8656a14 -> 720219b087)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from 85d8656a14 Code clean-up - formatting. No functional change. new 51f3d845bb Protect decode table formatting new 720219b087 Code clean-up - formatting. No functional change. 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: .../apache/tomcat/util/codec/binary/Base64.java| 265 ++--- .../tomcat/util/codec/binary/BaseNCodec.java | 169 +++-- .../tomcat/util/codec/binary/StringUtils.java | 70 +++--- .../tomcat/util/codec/binary/package-info.java | 4 +- 4 files changed, 242 insertions(+), 266 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 02/02: Code clean-up - formatting. No functional change.
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 commit 720219b0877259352712d22c5a20dd9b8d471dbb Author: Mark Thomas AuthorDate: Thu May 22 14:18:35 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/codec/binary/Base64.java| 261 ++--- .../tomcat/util/codec/binary/BaseNCodec.java | 169 +++-- .../tomcat/util/codec/binary/StringUtils.java | 70 +++--- .../tomcat/util/codec/binary/package-info.java | 4 +- 4 files changed, 239 insertions(+), 265 deletions(-) diff --git a/java/org/apache/tomcat/util/codec/binary/Base64.java b/java/org/apache/tomcat/util/codec/binary/Base64.java index f992d67e3d..2ffa36564e 100644 --- a/java/org/apache/tomcat/util/codec/binary/Base64.java +++ b/java/org/apache/tomcat/util/codec/binary/Base64.java @@ -18,7 +18,6 @@ package org.apache.tomcat.util.codec.binary; /** * Provides Base64 encoding and decoding as defined by http://www.ietf.org/rfc/rfc2045.txt";>RFC 2045. - * * * This class implements section 6.8. Base64 Content-Transfer-Encoding from RFC 2045 Multipurpose * Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies by Freed and Borenstein. @@ -36,15 +35,15 @@ package org.apache.tomcat.util.codec.binary; * The URL-safe parameter is only applied to encode operations. Decoding seamlessly handles both modes. * * - * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only - * encode/decode character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, - * UTF-8, etc). + * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode + * character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc). * * * This class is thread-safe. * * * @see http://www.ietf.org/rfc/rfc2045.txt";>RFC 2045 + * * @since 1.0 * * @deprecated Unused. This class will be removed in Tomcat 11 onwards. @@ -53,8 +52,7 @@ package org.apache.tomcat.util.codec.binary; public class Base64 extends BaseNCodec { /** - * BASE64 characters are 6 bits in length. - * They are formed by taking a block of 3 octets to form a 24-bit string, + * BASE64 characters are 6 bits in length. They are formed by taking a block of 3 octets to form a 24-bit string, * which is converted into 4 BASE64 characters. */ private static final int BITS_PER_ENCODED_BYTE = 6; @@ -69,30 +67,23 @@ public class Base64 extends BaseNCodec { * https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/ * */ -private static final byte[] STANDARD_ENCODE_TABLE = { -'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', -'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', -'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', -'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', -'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' -}; +private static final byte[] STANDARD_ENCODE_TABLE = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', +'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', +'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', +'2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; /** - * This is a copy of the STANDARD_ENCODE_TABLE above, but with + and / - * changed to - and _ to make the encoded Base64 results more URL-SAFE. - * This table is only used when the Base64's mode is set to URL-SAFE. + * This is a copy of the STANDARD_ENCODE_TABLE above, but with + and / changed to - and _ to make the encoded Base64 + * results more URL-SAFE. This table is only used when the Base64's mode is set to URL-SAFE. */ -private static final byte[] URL_SAFE_ENCODE_TABLE = { -'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', -'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', -'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', -'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', -'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_' -}; +private static final byte[] URL_SAFE_ENCODE_TABLE = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', +'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', +'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1'
(tomcat) 01/02: Protect decode table formatting
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 commit 51f3d845bb965f7d8080e4069ed768934e04544c Author: Mark Thomas AuthorDate: Thu May 22 14:15:19 2025 +0100 Protect decode table formatting --- java/org/apache/tomcat/util/codec/binary/Base64.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/codec/binary/Base64.java b/java/org/apache/tomcat/util/codec/binary/Base64.java index 5f6fdbd7a5..f992d67e3d 100644 --- a/java/org/apache/tomcat/util/codec/binary/Base64.java +++ b/java/org/apache/tomcat/util/codec/binary/Base64.java @@ -103,6 +103,7 @@ public class Base64 extends BaseNCodec { * https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/ * */ +// @formatter:off private static final byte[] STANDARD_DECODE_TABLE = { // 0 1 2 3 4 5 6 7 8 9 A B C D E F -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00-0f @@ -125,7 +126,8 @@ public class Base64 extends BaseNCodec { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63, // 50-5f P-Z _ -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, // 60-6f a-o 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 // 70-7a p-z -}; +}; +// @formatter:on /* * Base64 uses 6-bit fields. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 02/02: Code clean-up - formatting. No functional change.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 9616c234e7f4dd3daad0800863291c636ba2ee49 Author: Mark Thomas AuthorDate: Thu May 22 14:20:07 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/codec/binary/Base64.java| 261 ++--- .../tomcat/util/codec/binary/BaseNCodec.java | 169 +++-- .../tomcat/util/codec/binary/StringUtils.java | 74 +++--- .../tomcat/util/codec/binary/package-info.java | 4 +- 4 files changed, 241 insertions(+), 267 deletions(-) diff --git a/java/org/apache/tomcat/util/codec/binary/Base64.java b/java/org/apache/tomcat/util/codec/binary/Base64.java index f992d67e3d..2ffa36564e 100644 --- a/java/org/apache/tomcat/util/codec/binary/Base64.java +++ b/java/org/apache/tomcat/util/codec/binary/Base64.java @@ -18,7 +18,6 @@ package org.apache.tomcat.util.codec.binary; /** * Provides Base64 encoding and decoding as defined by http://www.ietf.org/rfc/rfc2045.txt";>RFC 2045. - * * * This class implements section 6.8. Base64 Content-Transfer-Encoding from RFC 2045 Multipurpose * Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies by Freed and Borenstein. @@ -36,15 +35,15 @@ package org.apache.tomcat.util.codec.binary; * The URL-safe parameter is only applied to encode operations. Decoding seamlessly handles both modes. * * - * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only - * encode/decode character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, - * UTF-8, etc). + * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode + * character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc). * * * This class is thread-safe. * * * @see http://www.ietf.org/rfc/rfc2045.txt";>RFC 2045 + * * @since 1.0 * * @deprecated Unused. This class will be removed in Tomcat 11 onwards. @@ -53,8 +52,7 @@ package org.apache.tomcat.util.codec.binary; public class Base64 extends BaseNCodec { /** - * BASE64 characters are 6 bits in length. - * They are formed by taking a block of 3 octets to form a 24-bit string, + * BASE64 characters are 6 bits in length. They are formed by taking a block of 3 octets to form a 24-bit string, * which is converted into 4 BASE64 characters. */ private static final int BITS_PER_ENCODED_BYTE = 6; @@ -69,30 +67,23 @@ public class Base64 extends BaseNCodec { * https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/ * */ -private static final byte[] STANDARD_ENCODE_TABLE = { -'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', -'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', -'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', -'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', -'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' -}; +private static final byte[] STANDARD_ENCODE_TABLE = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', +'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', +'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', +'2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; /** - * This is a copy of the STANDARD_ENCODE_TABLE above, but with + and / - * changed to - and _ to make the encoded Base64 results more URL-SAFE. - * This table is only used when the Base64's mode is set to URL-SAFE. + * This is a copy of the STANDARD_ENCODE_TABLE above, but with + and / changed to - and _ to make the encoded Base64 + * results more URL-SAFE. This table is only used when the Base64's mode is set to URL-SAFE. */ -private static final byte[] URL_SAFE_ENCODE_TABLE = { -'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', -'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', -'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', -'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', -'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_' -}; +private static final byte[] URL_SAFE_ENCODE_TABLE = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', +'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', +'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1',
(tomcat) branch 9.0.x updated (df5b0497f1 -> 9616c234e7)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from df5b0497f1 Code clean-up - formatting. No functional change. new 3668595ef6 Protect decode table formatting new 9616c234e7 Code clean-up - formatting. No functional change. 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: .../apache/tomcat/util/codec/binary/Base64.java| 265 ++--- .../tomcat/util/codec/binary/BaseNCodec.java | 169 +++-- .../tomcat/util/codec/binary/StringUtils.java | 74 +++--- .../tomcat/util/codec/binary/package-info.java | 4 +- 4 files changed, 244 insertions(+), 268 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 01/02: Protect decode table formatting
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 3668595ef60728f04f6ad0d73ac1c835f2e21ed7 Author: Mark Thomas AuthorDate: Thu May 22 14:15:19 2025 +0100 Protect decode table formatting --- java/org/apache/tomcat/util/codec/binary/Base64.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/codec/binary/Base64.java b/java/org/apache/tomcat/util/codec/binary/Base64.java index 5f6fdbd7a5..f992d67e3d 100644 --- a/java/org/apache/tomcat/util/codec/binary/Base64.java +++ b/java/org/apache/tomcat/util/codec/binary/Base64.java @@ -103,6 +103,7 @@ public class Base64 extends BaseNCodec { * https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/ * */ +// @formatter:off private static final byte[] STANDARD_DECODE_TABLE = { // 0 1 2 3 4 5 6 7 8 9 A B C D E F -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00-0f @@ -125,7 +126,8 @@ public class Base64 extends BaseNCodec { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63, // 50-5f P-Z _ -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, // 60-6f a-o 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 // 70-7a p-z -}; +}; +// @formatter:on /* * Base64 uses 6-bit fields. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Minor improvement when replacing the configuration
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 18414bd1fd Minor improvement when replacing the configuration 18414bd1fd is described below commit 18414bd1fdc7f38206441c2af4fe4f03c125fe46 Author: remm AuthorDate: Thu May 22 16:34:50 2025 +0200 Minor improvement when replacing the configuration --- java/org/apache/catalina/valves/rewrite/RewriteValve.java | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java b/java/org/apache/catalina/valves/rewrite/RewriteValve.java index 43ae26ea68..347e2d04f9 100644 --- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java +++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java @@ -202,6 +202,11 @@ public class RewriteValve extends ValveBase { if (containerLog == null) { containerLog = LogFactory.getLog(getContainer().getLogName() + ".rewrite"); } +for (RewriteMap map : maps.values()) { +if (map instanceof Lifecycle) { +((Lifecycle) map).stop(); +} +} maps.clear(); parse(new BufferedReader(new StringReader(configuration))); } @@ -226,6 +231,7 @@ public class RewriteValve extends ValveBase { protected void parse(BufferedReader reader) throws LifecycleException { List rules = new ArrayList<>(); List conditions = new ArrayList<>(); +ArrayList mapsConfiguration = new ArrayList<>(); while (true) { try { String line = reader.readLine(); @@ -271,12 +277,14 @@ public class RewriteValve extends ValveBase { containerLog.error(sm.getString("rewriteValve.readError"), e); } } -this.rules = rules.toArray(new RewriteRule[0]); +this.mapsConfiguration = mapsConfiguration; // Finish parsing the rules -for (RewriteRule rule : this.rules) { +for (RewriteRule rule : rules) { rule.parse(maps); } + +this.rules = rules.toArray(new RewriteRule[0]); } @Override - 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: Minor improvement when replacing the configuration
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 05ebfd265c Minor improvement when replacing the configuration 05ebfd265c is described below commit 05ebfd265cbe3fa79cd5a4366e0b6962116d7781 Author: remm AuthorDate: Thu May 22 16:34:50 2025 +0200 Minor improvement when replacing the configuration --- java/org/apache/catalina/valves/rewrite/RewriteValve.java | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java b/java/org/apache/catalina/valves/rewrite/RewriteValve.java index c5b13f2158..660c9c8fa9 100644 --- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java +++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java @@ -202,6 +202,11 @@ public class RewriteValve extends ValveBase { if (containerLog == null) { containerLog = LogFactory.getLog(getContainer().getLogName() + ".rewrite"); } +for (RewriteMap map : maps.values()) { +if (map instanceof Lifecycle) { +((Lifecycle) map).stop(); +} +} maps.clear(); parse(new BufferedReader(new StringReader(configuration))); } @@ -226,6 +231,7 @@ public class RewriteValve extends ValveBase { protected void parse(BufferedReader reader) throws LifecycleException { List rules = new ArrayList<>(); List conditions = new ArrayList<>(); +ArrayList mapsConfiguration = new ArrayList<>(); while (true) { try { String line = reader.readLine(); @@ -272,12 +278,14 @@ public class RewriteValve extends ValveBase { containerLog.error(sm.getString("rewriteValve.readError"), e); } } -this.rules = rules.toArray(new RewriteRule[0]); +this.mapsConfiguration = mapsConfiguration; // Finish parsing the rules -for (RewriteRule rule : this.rules) { +for (RewriteRule rule : rules) { rule.parse(maps); } + +this.rules = rules.toArray(new RewriteRule[0]); } @Override - 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: Minor improvement when replacing the configuration
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new ec9e75ac14 Minor improvement when replacing the configuration ec9e75ac14 is described below commit ec9e75ac1453cbe60bbccc73f99a157fbe72ff3b Author: remm AuthorDate: Thu May 22 16:34:50 2025 +0200 Minor improvement when replacing the configuration --- java/org/apache/catalina/valves/rewrite/RewriteValve.java | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java b/java/org/apache/catalina/valves/rewrite/RewriteValve.java index 4198023b32..8c4375c18c 100644 --- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java +++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java @@ -202,6 +202,11 @@ public class RewriteValve extends ValveBase { if (containerLog == null) { containerLog = LogFactory.getLog(getContainer().getLogName() + ".rewrite"); } +for (RewriteMap map : maps.values()) { +if (map instanceof Lifecycle) { +((Lifecycle) map).stop(); +} +} maps.clear(); parse(new BufferedReader(new StringReader(configuration))); } @@ -226,6 +231,7 @@ public class RewriteValve extends ValveBase { protected void parse(BufferedReader reader) throws LifecycleException { List rules = new ArrayList<>(); List conditions = new ArrayList<>(); +ArrayList mapsConfiguration = new ArrayList<>(); while (true) { try { String line = reader.readLine(); @@ -272,12 +278,14 @@ public class RewriteValve extends ValveBase { containerLog.error(sm.getString("rewriteValve.readError"), e); } } -this.rules = rules.toArray(new RewriteRule[0]); +this.mapsConfiguration = mapsConfiguration; // Finish parsing the rules -for (RewriteRule rule : this.rules) { +for (RewriteRule rule : rules) { rule.parse(maps); } + +this.rules = rules.toArray(new RewriteRule[0]); } @Override - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot failure in on tomcat-11.0.x
Build status: BUILD FAILED: failed Snapshot deployed to ASF Maven snapshot repository (failure) Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/112/builds/1678 Blamelist: Mark Thomas Build Text: failed Snapshot deployed to ASF Maven snapshot repository (failure) Status Detected: new failure Build Source Stamp: [branch 11.0.x] ef1b7452a88abd807ca6eb92265e881583dcfb51 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 shell_7: 0 compile: 1 shell_8: 0 shell_9: 0 shell_10: 2 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot failure in on tomcat-12.0.x
Build status: BUILD FAILED: failed Snapshot deployed to ASF Maven snapshot repository (failure) Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/120/builds/563 Blamelist: remm Build Text: failed Snapshot deployed to ASF Maven snapshot repository (failure) Status Detected: new failure Build Source Stamp: [branch main] 39b7576c206b97080a8a9e4f896b9f2abff425e9 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 shell_7: 0 compile: 1 shell_8: 0 shell_9: 0 shell_10: 2 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 02/02: Code clean-up - formatting. No functional change.
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 commit 7e53f86d9f518359d5b46bb79bd807f08d3baa60 Author: Mark Thomas AuthorDate: Thu May 22 17:11:39 2025 +0100 Code clean-up - formatting. No functional change. --- .../digester/AbstractObjectCreationFactory.java| 24 +- .../apache/tomcat/util/digester/ArrayStack.java| 70 +-- .../tomcat/util/digester/CallMethodRule.java | 198 .../apache/tomcat/util/digester/CallParamRule.java | 66 +-- java/org/apache/tomcat/util/digester/Digester.java | 541 ++--- .../tomcat/util/digester/DocumentProperties.java | 6 +- .../util/digester/EnvironmentPropertySource.java | 19 +- .../tomcat/util/digester/FactoryCreateRule.java| 50 +- .../tomcat/util/digester/ObjectCreateRule.java | 39 +- .../util/digester/ObjectCreationFactory.java | 25 +- java/org/apache/tomcat/util/digester/Rule.java | 64 ++- java/org/apache/tomcat/util/digester/RuleSet.java | 31 +- java/org/apache/tomcat/util/digester/Rules.java| 36 +- .../org/apache/tomcat/util/digester/RulesBase.java | 80 ++- .../digester/ServiceBindingPropertySource.java | 37 +- .../apache/tomcat/util/digester/SetNextRule.java | 88 ++-- .../tomcat/util/digester/SetPropertiesRule.java| 25 +- .../tomcat/util/digester/SystemPropertySource.java | 5 +- 18 files changed, 652 insertions(+), 752 deletions(-) diff --git a/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java b/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java index 01faa5347c..4c647fa766 100644 --- a/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java +++ b/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java @@ -21,19 +21,18 @@ import org.xml.sax.Attributes; /** - * Abstract base class for ObjectCreationFactory - * implementations. + * + * Abstract base class for ObjectCreationFactory implementations. + * */ -public abstract class AbstractObjectCreationFactory -implements ObjectCreationFactory { +public abstract class AbstractObjectCreationFactory implements ObjectCreationFactory { // - Instance Variables /** - * The associated Digester instance that was set up by - * {@link FactoryCreateRule} upon initialization. + * The associated Digester instance that was set up by {@link FactoryCreateRule} upon initialization. */ private Digester digester = null; @@ -42,8 +41,8 @@ public abstract class AbstractObjectCreationFactory /** - * Factory method called by {@link FactoryCreateRule} to supply an - * object based on the element's attributes. + * + * Factory method called by {@link FactoryCreateRule} to supply an object based on the element's attributes. * * @param attributes the element's attributes * @@ -54,8 +53,8 @@ public abstract class AbstractObjectCreationFactory /** - * Returns the {@link Digester} that was set by the - * {@link FactoryCreateRule} upon initialization. + * + * Returns the {@link Digester} that was set by the {@link FactoryCreateRule} upon initialization. */ @Override public Digester getDigester() { @@ -64,8 +63,9 @@ public abstract class AbstractObjectCreationFactory /** - * Set the {@link Digester} to allow the implementation to do logging, - * classloading based on the digester's classloader, etc. + * + * Set the {@link Digester} to allow the implementation to do logging, classloading based on the digester's + * classloader, etc. * * @param digester parent Digester object */ diff --git a/java/org/apache/tomcat/util/digester/ArrayStack.java b/java/org/apache/tomcat/util/digester/ArrayStack.java index d3801f389f..009757a8c6 100644 --- a/java/org/apache/tomcat/util/digester/ArrayStack.java +++ b/java/org/apache/tomcat/util/digester/ArrayStack.java @@ -20,27 +20,28 @@ import java.util.ArrayList; import java.util.EmptyStackException; /** - * Imported copy of the ArrayStack class from - * Commons Collections, which was the only direct dependency from Digester. - * - * WARNING - This class is public solely to allow it to be - * used from subpackages of org.apache.commons.digester. - * It should not be considered part of the public API of Commons Digester. - * If you want to use such a class yourself, you should use the one from - * Commons Collections directly. - * - * An implementation of the {@link java.util.Stack} API that is based on an - * ArrayList instead of a Vector, so it is not - * synchronized to protect against multi-threaded access. The implementation - * is therefore operates faster in environments where you do not need to - * worry about multiple thread contention. - * - * Unlike Stack, A
(tomcat) branch 10.1.x updated (ec9e75ac14 -> 7e53f86d9f)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from ec9e75ac14 Minor improvement when replacing the configuration new c9a68ce8b9 Code clean-up - formatting. No functional change. new 7e53f86d9f Code clean-up - formatting. No functional change. 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: .../util/descriptor/tagplugin/TagPluginParser.java | 7 +- .../util/descriptor/tld/ImplicitTldRuleSet.java| 3 +- .../tomcat/util/descriptor/tld/TagFileXml.java | 5 +- .../apache/tomcat/util/descriptor/tld/TagXml.java | 6 +- .../tomcat/util/descriptor/tld/TaglibXml.java | 8 +- .../tomcat/util/descriptor/tld/TldParser.java | 9 +- .../util/descriptor/tld/TldResourcePath.java | 30 +- .../tomcat/util/descriptor/tld/TldRuleSet.java | 45 +- .../tomcat/util/descriptor/tld/ValidatorXml.java | 4 +- .../util/descriptor/web/ApplicationParameter.java | 11 +- .../tomcat/util/descriptor/web/Constants.java | 3 +- .../tomcat/util/descriptor/web/ContextEjb.java | 6 +- .../util/descriptor/web/ContextEnvironment.java| 8 +- .../tomcat/util/descriptor/web/ContextHandler.java | 20 +- .../util/descriptor/web/ContextLocalEjb.java | 6 +- .../util/descriptor/web/ContextResource.java | 26 +- .../util/descriptor/web/ContextResourceEnvRef.java | 8 +- .../util/descriptor/web/ContextResourceLink.java | 8 +- .../tomcat/util/descriptor/web/ContextService.java | 56 +- .../util/descriptor/web/ContextTransaction.java| 12 +- .../tomcat/util/descriptor/web/ErrorPage.java | 9 +- .../tomcat/util/descriptor/web/FilterDef.java | 25 +- .../tomcat/util/descriptor/web/FilterMap.java | 23 +- .../descriptor/web/FragmentJarScannerCallback.java | 11 +- .../tomcat/util/descriptor/web/Injectable.java | 2 + .../descriptor/web/JspConfigDescriptorImpl.java| 2 +- .../util/descriptor/web/JspPropertyGroup.java | 81 +- .../web/JspPropertyGroupDescriptorImpl.java| 10 +- .../tomcat/util/descriptor/web/LoginConfig.java| 40 +- .../util/descriptor/web/MessageDestination.java| 17 +- .../util/descriptor/web/MessageDestinationRef.java | 8 +- .../tomcat/util/descriptor/web/MultipartDef.java | 14 +- .../util/descriptor/web/NamingResources.java | 9 +- .../tomcat/util/descriptor/web/ResourceBase.java | 9 +- .../util/descriptor/web/SecurityCollection.java| 60 +- .../util/descriptor/web/SecurityConstraint.java| 183 ++-- .../util/descriptor/web/SecurityRoleRef.java | 8 +- .../tomcat/util/descriptor/web/ServletDef.java | 29 +- .../tomcat/util/descriptor/web/SessionConfig.java | 22 +- .../util/descriptor/web/TaglibDescriptorImpl.java | 3 +- .../tomcat/util/descriptor/web/WebRuleSet.java | 956 .../apache/tomcat/util/descriptor/web/WebXml.java | 958 ++--- .../tomcat/util/descriptor/web/WebXmlParser.java | 46 +- .../util/descriptor/web/XmlEncodingBase.java | 10 +- .../digester/AbstractObjectCreationFactory.java| 24 +- .../apache/tomcat/util/digester/ArrayStack.java| 70 +- .../tomcat/util/digester/CallMethodRule.java | 198 ++--- .../apache/tomcat/util/digester/CallParamRule.java | 66 +- java/org/apache/tomcat/util/digester/Digester.java | 541 ++-- .../tomcat/util/digester/DocumentProperties.java | 6 +- .../util/digester/EnvironmentPropertySource.java | 19 +- .../tomcat/util/digester/FactoryCreateRule.java| 50 +- .../tomcat/util/digester/ObjectCreateRule.java | 39 +- .../util/digester/ObjectCreationFactory.java | 25 +- java/org/apache/tomcat/util/digester/Rule.java | 64 +- java/org/apache/tomcat/util/digester/RuleSet.java | 31 +- java/org/apache/tomcat/util/digester/Rules.java| 36 +- .../org/apache/tomcat/util/digester/RulesBase.java | 80 +- .../digester/ServiceBindingPropertySource.java | 37 +- .../apache/tomcat/util/digester/SetNextRule.java | 88 +- .../tomcat/util/digester/SetPropertiesRule.java| 25 +- .../tomcat/util/digester/SystemPropertySource.java | 5 +- 62 files changed, 1887 insertions(+), 2333 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Code clean-up - formatting. No functional change.
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 4473967f06 Code clean-up - formatting. No functional change. 4473967f06 is described below commit 4473967f060474f5ce4c48ddda776553a5b16a0b Author: Mark Thomas AuthorDate: Thu May 22 17:32:37 2025 +0100 Code clean-up - formatting. No functional change. --- .../tomcat/util/net/jsse/JSSEImplementation.java | 2 +- .../tomcat/util/net/jsse/JSSEKeyManager.java | 32 +++- .../tomcat/util/net/jsse/JSSESSLContext.java | 3 +- .../apache/tomcat/util/net/jsse/JSSESupport.java | 43 ++ java/org/apache/tomcat/util/net/jsse/JSSEUtil.java | 9 ++--- java/org/apache/tomcat/util/net/jsse/PEMFile.java | 10 ++--- 6 files changed, 43 insertions(+), 56 deletions(-) diff --git a/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java b/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java index 9ea9ce43d3..cc6ccfe332 100644 --- a/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java +++ b/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java @@ -43,7 +43,7 @@ public class JSSEImplementation extends SSLImplementation { } @Override -public SSLSupport getSSLSupport(SSLSession session, Map> additionalAttributes) { +public SSLSupport getSSLSupport(SSLSession session, Map> additionalAttributes) { return new JSSESupport(session, additionalAttributes); } diff --git a/java/org/apache/tomcat/util/net/jsse/JSSEKeyManager.java b/java/org/apache/tomcat/util/net/jsse/JSSEKeyManager.java index 5f63ba254e..04060565c8 100644 --- a/java/org/apache/tomcat/util/net/jsse/JSSEKeyManager.java +++ b/java/org/apache/tomcat/util/net/jsse/JSSEKeyManager.java @@ -26,9 +26,8 @@ import javax.net.ssl.X509ExtendedKeyManager; import javax.net.ssl.X509KeyManager; /** - * X509KeyManager which allows selection of a specific key pair and certificate - * chain (identified by their keystore alias name) to be used by the server to - * authenticate itself to SSL clients. + * X509KeyManager which allows selection of a specific key pair and certificate chain (identified by their keystore + * alias name) to be used by the server to authenticate itself to SSL clients. * * @author Jan Luehe */ @@ -41,9 +40,8 @@ public final class JSSEKeyManager extends X509ExtendedKeyManager { /** * Constructor. * - * @param mgr The X509KeyManager used as a delegate - * @param serverKeyAlias The alias name of the server's key pair and - * supporting certificate chain + * @param mgrThe X509KeyManager used as a delegate + * @param serverKeyAlias The alias name of the server's key pair and supporting certificate chain */ public JSSEKeyManager(X509KeyManager mgr, String serverKeyAlias) { super(); @@ -53,9 +51,8 @@ public final class JSSEKeyManager extends X509ExtendedKeyManager { /** - * Returns the server key alias that was provided in the constructor or the - * result from {@link X509KeyManager#chooseServerAlias(String, Principal[], - * Socket)} for the delegate if no alias is specified. + * Returns the server key alias that was provided in the constructor or the result from + * {@link X509KeyManager#chooseServerAlias(String, Principal[], Socket)} for the delegate if no alias is specified. */ @Override public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) { @@ -68,14 +65,13 @@ public final class JSSEKeyManager extends X509ExtendedKeyManager { /** - * Returns the server key alias that was provided in the constructor or the - * result from {@link X509ExtendedKeyManager#chooseEngineServerAlias(String, - * Principal[], SSLEngine)} for the delegate if no alias is specified. + * Returns the server key alias that was provided in the constructor or the result from + * {@link X509ExtendedKeyManager#chooseEngineServerAlias(String, Principal[], SSLEngine)} for the delegate if no + * alias is specified. */ @Override -public String chooseEngineServerAlias(String keyType, Principal[] issuers, -SSLEngine engine) { -if (serverKeyAlias!=null) { +public String chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine engine) { +if (serverKeyAlias != null) { return serverKeyAlias; } @@ -84,8 +80,7 @@ public final class JSSEKeyManager extends X509ExtendedKeyManager { @Override -public String chooseClientAlias(String[] keyType, Principal[] issuers, -Socket socket) { +public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket) { return delegate.chooseClientAlias(keyType, issuers,
(tomcat) 01/04: Keep cipher layout
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 7a504b46cee5c6d6e328dbfc6f806576fb8365f5 Author: Mark Thomas AuthorDate: Thu May 22 17:34:46 2025 +0100 Keep cipher layout --- java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java b/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java index 706c47bf65..7b5b983d7c 100644 --- a/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java +++ b/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java @@ -44,6 +44,7 @@ import java.util.Set; */ public enum Cipher { +// @formatter:off /* Cipher 0 * TLS_NULL_WITH_NULL_NULL * Must never be negotiated. Used internally to represent the initial @@ -4988,7 +4989,7 @@ public enum Cipher { 256, 256 },*/ - +// @formatter:on private final int id; private final String openSSLAlias; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 03/04: Code clean-up - formatting. No functional change.
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 b6db952a85710a459b5edf0f3369efb54d74aa12 Author: Mark Thomas AuthorDate: Thu May 22 17:44:07 2025 +0100 Code clean-up - formatting. No functional change. --- .../util/net/openssl/panama/OpenSSLContext.java| 305 +++-- .../util/net/openssl/panama/OpenSSLEngine.java | 268 +- .../net/openssl/panama/OpenSSLImplementation.java | 2 +- .../util/net/openssl/panama/OpenSSLLibrary.java| 81 +++--- .../net/openssl/panama/OpenSSLSessionContext.java | 18 +- .../net/openssl/panama/OpenSSLSessionStats.java| 30 +- .../util/net/openssl/panama/OpenSSLUtil.java | 4 +- .../net/openssl/panama/OpenSSLX509Certificate.java | 14 +- 8 files changed, 357 insertions(+), 365 deletions(-) diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java index 6624b296e5..01e319a5c6 100644 --- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java +++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java @@ -81,31 +81,29 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { private static final String defaultProtocol = "TLS"; -private static final int SSL_AIDX_RSA = 0; -private static final int SSL_AIDX_DSA = 1; -private static final int SSL_AIDX_ECC = 3; -private static final int SSL_AIDX_MAX = 4; +private static final int SSL_AIDX_RSA = 0; +private static final int SSL_AIDX_DSA = 1; +private static final int SSL_AIDX_ECC = 3; +private static final int SSL_AIDX_MAX = 4; -public static final int SSL_PROTOCOL_NONE = 0; +public static final int SSL_PROTOCOL_NONE = 0; public static final int SSL_PROTOCOL_SSLV2 = 1; -public static final int SSL_PROTOCOL_SSLV3 = (1<<1); -public static final int SSL_PROTOCOL_TLSV1 = (1<<2); -public static final int SSL_PROTOCOL_TLSV1_1 = (1<<3); -public static final int SSL_PROTOCOL_TLSV1_2 = (1<<4); -public static final int SSL_PROTOCOL_TLSV1_3 = (1<<5); -public static final int SSL_PROTOCOL_ALL = (SSL_PROTOCOL_TLSV1 | SSL_PROTOCOL_TLSV1_1 | SSL_PROTOCOL_TLSV1_2 | -SSL_PROTOCOL_TLSV1_3); +public static final int SSL_PROTOCOL_SSLV3 = (1 << 1); +public static final int SSL_PROTOCOL_TLSV1 = (1 << 2); +public static final int SSL_PROTOCOL_TLSV1_1 = (1 << 3); +public static final int SSL_PROTOCOL_TLSV1_2 = (1 << 4); +public static final int SSL_PROTOCOL_TLSV1_3 = (1 << 5); +public static final int SSL_PROTOCOL_ALL = +(SSL_PROTOCOL_TLSV1 | SSL_PROTOCOL_TLSV1_1 | SSL_PROTOCOL_TLSV1_2 | SSL_PROTOCOL_TLSV1_3); static final int OPTIONAL_NO_CA = 3; private static final String BEGIN_KEY = "-BEGIN PRIVATE KEY-\n"; private static final Object END_KEY = "\n-END PRIVATE KEY-"; -private static final byte[] HTTP_11_PROTOCOL = -new byte[] { 'h', 't', 't', 'p', '/', '1', '.', '1' }; +private static final byte[] HTTP_11_PROTOCOL = new byte[] { 'h', 't', 't', 'p', '/', '1', '.', '1' }; -private static final byte[] DEFAULT_SESSION_ID_CONTEXT = -new byte[] { 'd', 'e', 'f', 'a', 'u', 'l', 't' }; +private static final byte[] DEFAULT_SESSION_ID_CONTEXT = new byte[] { 'd', 'e', 'f', 'a', 'u', 'l', 't' }; static final CertificateFactory X509_CERT_FACTORY; static { @@ -149,8 +147,7 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { return ciphers.toArray(new String[0]); } -public OpenSSLContext(SSLHostConfigCertificate certificate, List negotiableProtocols) -throws SSLException { +public OpenSSLContext(SSLHostConfigCertificate certificate, List negotiableProtocols) throws SSLException { // Check that OpenSSL was initialized if (!OpenSSLStatus.isInitialized()) { @@ -181,10 +178,8 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { if (MemorySegment.NULL.equals(confCtx)) { throw new SSLException(sm.getString("openssl.errMakeConf", OpenSSLLibrary.getLastError())); } -SSL_CONF_CTX_set_flags(confCtx, SSL_CONF_FLAG_FILE() | -SSL_CONF_FLAG_SERVER() | -SSL_CONF_FLAG_CERTIFICATE() | -SSL_CONF_FLAG_SHOW_ERRORS()); +SSL_CONF_CTX_set_flags(confCtx, SSL_CONF_FLAG_FILE() | SSL_CONF_FLAG_SERVER() | +SSL_CONF_FLAG_CERTIFICATE() | SSL_CONF_FLAG_SHOW_ERRORS()); } else { log.error(sm.getString("opensslconf.unsupported")); } @@ -267,8 +262,7 @
(tomcat) 04/04: Code clean-up - formatting. No functional change.
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 0f72e51cadadd0c1f150e57870e2b890f248 Author: Mark Thomas AuthorDate: Thu May 22 17:45:12 2025 +0100 Code clean-up - formatting. No functional change. --- .../tomcat/util/net/openssl/OpenSSLContext.java| 91 -- .../tomcat/util/net/openssl/OpenSSLEngine.java | 188 ++--- .../util/net/openssl/OpenSSLImplementation.java| 2 +- .../util/net/openssl/OpenSSLSessionContext.java| 14 +- .../util/net/openssl/OpenSSLSessionStats.java | 24 ++- .../tomcat/util/net/openssl/OpenSSLStatus.java | 6 +- .../tomcat/util/net/openssl/OpenSSLUtil.java | 4 +- .../util/net/openssl/OpenSSLX509Certificate.java | 14 +- 8 files changed, 156 insertions(+), 187 deletions(-) diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java index 978d41bad7..2e4bb9a085 100644 --- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java +++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java @@ -91,8 +91,7 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { private final OpenSSLState state; private final Cleanable cleanable; -public OpenSSLContext(SSLHostConfigCertificate certificate, List negotiableProtocols) -throws SSLException { +public OpenSSLContext(SSLHostConfigCertificate certificate, List negotiableProtocols) throws SSLException { this.sslHostConfig = certificate.getSSLHostConfig(); this.certificate = certificate; long aprPool = Pool.create(0); @@ -107,11 +106,8 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { if (log.isTraceEnabled()) { log.trace(sm.getString("openssl.makeConf")); } -cctx = SSLConf.make(aprPool, -SSL.SSL_CONF_FLAG_FILE | -SSL.SSL_CONF_FLAG_SERVER | -SSL.SSL_CONF_FLAG_CERTIFICATE | -SSL.SSL_CONF_FLAG_SHOW_ERRORS); +cctx = SSLConf.make(aprPool, SSL.SSL_CONF_FLAG_FILE | SSL.SSL_CONF_FLAG_SERVER | +SSL.SSL_CONF_FLAG_CERTIFICATE | SSL.SSL_CONF_FLAG_SHOW_ERRORS); } catch (Exception e) { throw new SSLException(sm.getString("openssl.errMakeConf"), e); } @@ -157,20 +153,17 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { this.negotiableProtocols = negotiableProtocols; success = true; -} catch(Exception e) { +} catch (Exception e) { throw new SSLException(sm.getString("openssl.errorSSLCtxInit"), e); } finally { state = new OpenSSLState(aprPool, cctx, ctx); /* - * When an SSLHostConfig is replaced at runtime, it is not possible to - * call destroy() on the associated OpenSSLContext since it is likely - * that there will be in-progress connections using the OpenSSLContext. - * A reference chain has been deliberately established (see - * OpenSSLSessionContext) to ensure that the OpenSSLContext remains - * ineligible for GC while those connections are alive. Once those - * connections complete, the OpenSSLContext will become eligible for GC - * and this method will ensure that the associated native resources are - * cleaned up. + * When an SSLHostConfig is replaced at runtime, it is not possible to call destroy() on the associated + * OpenSSLContext since it is likely that there will be in-progress connections using the OpenSSLContext. A + * reference chain has been deliberately established (see OpenSSLSessionContext) to ensure that the + * OpenSSLContext remains ineligible for GC while those connections are alive. Once those connections + * complete, the OpenSSLContext will become eligible for GC and this method will ensure that the associated + * native resources are cleaned up. */ cleanable = cleaner.register(this, state); @@ -222,12 +215,10 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { return false; } if (rc <= 0) { -log.error(sm.getString("opensslconf.failedCommand", name, value, -Integer.toString(rc))); +log.error(sm.getString("opensslconf.failedCommand", name, value, Integer.toString(rc))); result = false; } el
(tomcat) branch 11.0.x updated: Keep cipher layout
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new a095235b6f Keep cipher layout a095235b6f is described below commit a095235b6fc433f1158f56c062b97d6c6eb85ccf Author: Mark Thomas AuthorDate: Thu May 22 17:34:46 2025 +0100 Keep cipher layout --- java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java b/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java index 706c47bf65..7b5b983d7c 100644 --- a/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java +++ b/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java @@ -44,6 +44,7 @@ import java.util.Set; */ public enum Cipher { +// @formatter:off /* Cipher 0 * TLS_NULL_WITH_NULL_NULL * Must never be negotiated. Used internally to represent the initial @@ -4988,7 +4989,7 @@ public enum Cipher { 256, 256 },*/ - +// @formatter:on private final int id; private final String openSSLAlias; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 02/04: Code clean-up formatting. No funcional change.
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 f10f184b880a6dcc054dce570ee0503a34c2f338 Author: Mark Thomas AuthorDate: Thu May 22 17:41:57 2025 +0100 Code clean-up formatting. No funcional change. --- .../util/net/openssl/ciphers/Authentication.java | 22 +-- .../tomcat/util/net/openssl/ciphers/Cipher.java| 34 ++-- .../util/net/openssl/ciphers/KeyExchange.java | 20 +-- .../ciphers/OpenSSLCipherConfigurationParser.java | 195 - .../tomcat/util/net/openssl/ciphers/Protocol.java | 5 +- 5 files changed, 148 insertions(+), 128 deletions(-) diff --git a/java/org/apache/tomcat/util/net/openssl/ciphers/Authentication.java b/java/org/apache/tomcat/util/net/openssl/ciphers/Authentication.java index a4652484b5..ec192db6fb 100644 --- a/java/org/apache/tomcat/util/net/openssl/ciphers/Authentication.java +++ b/java/org/apache/tomcat/util/net/openssl/ciphers/Authentication.java @@ -17,17 +17,17 @@ package org.apache.tomcat.util.net.openssl.ciphers; public enum Authentication { -RSA/* RSA auth */, -DSS/* DSS auth */, -aNULL /* no auth (i.e. use ADH or AECDH) */, -DH /* Fixed DH auth (kDHd or kDHr) */, -ECDH /* Fixed ECDH auth (kECDHe or kECDHr) */, -KRB5 /* KRB5 auth */, -ECDSA /* ECDSA auth*/, -PSK/* PSK auth */, +RSA /* RSA auth */, +DSS /* DSS auth */, +aNULL /* no auth (i.e. use ADH or AECDH) */, +DH /* Fixed DH auth (kDHd or kDHr) */, +ECDH /* Fixed ECDH auth (kECDHe or kECDHr) */, +KRB5 /* KRB5 auth */, +ECDSA /* ECDSA auth */, +PSK /* PSK auth */, GOST94 /* GOST R 34.10-94 signature auth */, GOST01 /* GOST R 34.10-2001 */, -FZA/* Fortezza */, -SRP/* Secure Remote Password */, -ANY/* TLS 1.3 */ +FZA /* Fortezza */, +SRP /* Secure Remote Password */, +ANY /* TLS 1.3 */ } diff --git a/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java b/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java index 7b5b983d7c..f2e253bdb2 100644 --- a/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java +++ b/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java @@ -27,20 +27,19 @@ import java.util.Set; /** * All the standard cipher suites for SSL/TSL. * - * @see https://github.com/openssl/openssl/blob/master/ssl/s3_lib.c"; - * >OpenSSL cipher definitions - * @see http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4"; - * >The cipher suite registry - * @see https://www.thesprawl.org/research/tls-and-ssl-cipher-suites/"; - * >Another list of cipher suites with some non-standard IDs - * @see http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites"; - * >Oracle standard names for cipher suites - * @see https://www.openssl.org/docs/apps/ciphers.html"; - * >Mapping of OpenSSL cipher suites names to registry names - * @see https://github.com/ssllabs/sslhaf/blob/0.1.x/suites.csv"; - * >SSL Labs tool - list of ciphers - * @see http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/e30cd0d37abf/src/java.base/share/classes/sun/security/ssl/CipherSuite.java"; - * >OpenJDK source code + * @see https://github.com/openssl/openssl/blob/master/ssl/s3_lib.c"; >OpenSSL cipher definitions + * @see http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4"; >The cipher suite + * registry + * @see https://www.thesprawl.org/research/tls-and-ssl-cipher-suites/"; >Another list of cipher suites with some + * non-standard IDs + * @see http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites"; >Oracle + * standard names for cipher suites + * @see https://www.openssl.org/docs/apps/ciphers.html"; >Mapping of OpenSSL cipher suites names to registry + * names + * @see https://github.com/ssllabs/sslhaf/blob/0.1.x/suites.csv"; >SSL Labs tool - list of ciphers + * @see http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/e30cd0d37abf/src/java.base/share/classes/sun/security/ssl/CipherSuite.java"; + * >OpenJDK source code */ public enum Cipher { @@ -5012,10 +5011,9 @@ public enum Cipher { */ private final int alg_bits; -Cipher(int id, String openSSLAlias, KeyExchange kx, Authentication au, Encryption enc, -MessageDigest mac, Protocol protocol, boolean export, EncryptionLevel level, -boolean fipsCompatible, int strength_bits, int alg_bits, String[] jsseAltNames, -String[] openSSlAltNames) { +Cipher(int id, String openSSLAlias, KeyExchange kx, Authentication au, Encryption enc, MessageDigest mac, +Protocol protocol, boolean export, EncryptionLevel level, boolean fipsCompatible, int strength_bits, +int alg_bits, String[] jsseAltNames, Strin
(tomcat) branch main updated (4473967f06 -> 0f72e51cad)
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 4473967f06 Code clean-up - formatting. No functional change. new 7a504b46ce Keep cipher layout new f10f184b88 Code clean-up formatting. No funcional change. new b6db952a85 Code clean-up - formatting. No functional change. new 0f72e51cad Code clean-up - formatting. No functional change. The 4 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: .../tomcat/util/net/openssl/OpenSSLContext.java| 91 +++--- .../tomcat/util/net/openssl/OpenSSLEngine.java | 188 ++--- .../util/net/openssl/OpenSSLImplementation.java| 2 +- .../util/net/openssl/OpenSSLSessionContext.java| 14 +- .../util/net/openssl/OpenSSLSessionStats.java | 24 +- .../tomcat/util/net/openssl/OpenSSLStatus.java | 6 +- .../tomcat/util/net/openssl/OpenSSLUtil.java | 4 +- .../util/net/openssl/OpenSSLX509Certificate.java | 14 +- .../util/net/openssl/ciphers/Authentication.java | 22 +- .../tomcat/util/net/openssl/ciphers/Cipher.java| 37 ++- .../util/net/openssl/ciphers/KeyExchange.java | 20 +- .../ciphers/OpenSSLCipherConfigurationParser.java | 195 +++-- .../tomcat/util/net/openssl/ciphers/Protocol.java | 5 +- .../util/net/openssl/panama/OpenSSLContext.java| 305 +++-- .../util/net/openssl/panama/OpenSSLEngine.java | 268 +- .../net/openssl/panama/OpenSSLImplementation.java | 2 +- .../util/net/openssl/panama/OpenSSLLibrary.java| 81 +++--- .../net/openssl/panama/OpenSSLSessionContext.java | 18 +- .../net/openssl/panama/OpenSSLSessionStats.java| 30 +- .../util/net/openssl/panama/OpenSSLUtil.java | 4 +- .../net/openssl/panama/OpenSSLX509Certificate.java | 14 +- 21 files changed, 663 insertions(+), 681 deletions(-) - 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: Keep cipher layout
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 71ff5474e7 Keep cipher layout 71ff5474e7 is described below commit 71ff5474e7264b0e87335ab1492f47aa00bebc60 Author: Mark Thomas AuthorDate: Thu May 22 17:34:46 2025 +0100 Keep cipher layout --- java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java b/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java index 706c47bf65..7b5b983d7c 100644 --- a/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java +++ b/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java @@ -44,6 +44,7 @@ import java.util.Set; */ public enum Cipher { +// @formatter:off /* Cipher 0 * TLS_NULL_WITH_NULL_NULL * Must never be negotiated. Used internally to represent the initial @@ -4988,7 +4989,7 @@ public enum Cipher { 256, 256 },*/ - +// @formatter:on private final int id; private final String openSSLAlias; - 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: Keep cipher layout
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 992bee3f60 Keep cipher layout 992bee3f60 is described below commit 992bee3f60d813e6e5171f0141c057d0aca869af Author: Mark Thomas AuthorDate: Thu May 22 17:34:46 2025 +0100 Keep cipher layout --- java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java b/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java index 706c47bf65..7b5b983d7c 100644 --- a/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java +++ b/java/org/apache/tomcat/util/net/openssl/ciphers/Cipher.java @@ -44,6 +44,7 @@ import java.util.Set; */ public enum Cipher { +// @formatter:off /* Cipher 0 * TLS_NULL_WITH_NULL_NULL * Must never be negotiated. Used internally to represent the initial @@ -4988,7 +4989,7 @@ public enum Cipher { 256, 256 },*/ - +// @formatter:on private final int id; private final String openSSLAlias; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 01/02: Improve formatting
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 5a5afb6e9626392d5b86ad81f329e5f50076bc44 Author: Mark Thomas AuthorDate: Thu May 22 18:00:08 2025 +0100 Improve formatting --- .../apache/tomcat/util/net/SocketProperties.java | 42 -- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index 92bbc2d8bc..9fdd494700 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -42,9 +42,10 @@ public class SocketProperties { /** * Enable/disable socket processor cache, this bounded cache stores - * SocketProcessor objects to reduce GC - * Default is 0 - * -1 is unlimited + * SocketProcessor objects to reduce GC. + * + * Default is 0 + * -1 is unlimited * 0 is disabled */ protected int processorCache = 0; @@ -52,22 +53,23 @@ public class SocketProperties { /** * Enable/disable poller event cache, this bounded cache stores * PollerEvent objects to reduce GC for the poller - * Default is 0 - * -1 is unlimited - * 0 is disabled + * + * Default is 0 + * -1 is unlimited + * 0 is disabled * >0 the max number of objects to keep in cache. */ protected int eventCache = 0; /** - * Enable/disable direct buffers for the network buffers - * Default value is disabled + * Enable/disable direct buffers for the network buffers. + * Default value is disabled. */ protected boolean directBuffer = false; /** - * Enable/disable direct buffers for the network buffers for SSL - * Default value is disabled + * Enable/disable direct buffers for the network buffers for SSL. + * Default value is disabled. */ protected boolean directSslBuffer = false; @@ -85,28 +87,32 @@ public class SocketProperties { /** * The application read buffer size in bytes. - * Default value is 8192 + * Default value is 8192. */ protected int appReadBufSize = 8192; /** - * The application write buffer size in bytes - * Default value is 8192 + * The application write buffer size in bytes. + * Default value is 8192. */ protected int appWriteBufSize = 8192; /** * NioChannel pool size for the endpoint, - * this value is how many channels - * -1 means unlimited cached, 0 means no cache, - * -2 means bufferPoolSize will be used + * this value is how many channels. + * + * 0 means no cache + * -1 means unlimited cached + * -2 means bufferPoolSize will be used * Default value is -2 */ protected int bufferPool = -2; /** - * Buffer pool size in bytes to be cached - * -1 means unlimited, 0 means no cache + * Buffer pool size in bytes to be cached. + * + * -1 means unlimited + * 0 means no cache * Default value is based on the max memory reported by the JVM, * if less than 1GB, then 0, else the value divided by 32. This value * will then be used to compute bufferPool if its value is -2 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Improve formatting
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 38318c1012 Improve formatting 38318c1012 is described below commit 38318c10128887e685a0d07bdc31d9ce27cefd14 Author: Mark Thomas AuthorDate: Thu May 22 18:00:08 2025 +0100 Improve formatting --- .../apache/tomcat/util/net/SocketProperties.java | 42 -- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index 159b46789d..16ee6121af 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -42,9 +42,10 @@ public class SocketProperties { /** * Enable/disable socket processor cache, this bounded cache stores - * SocketProcessor objects to reduce GC - * Default is 0 - * -1 is unlimited + * SocketProcessor objects to reduce GC. + * + * Default is 0 + * -1 is unlimited * 0 is disabled */ protected int processorCache = 0; @@ -52,22 +53,23 @@ public class SocketProperties { /** * Enable/disable poller event cache, this bounded cache stores * PollerEvent objects to reduce GC for the poller - * Default is 0 - * -1 is unlimited - * 0 is disabled + * + * Default is 0 + * -1 is unlimited + * 0 is disabled * >0 the max number of objects to keep in cache. */ protected int eventCache = 0; /** - * Enable/disable direct buffers for the network buffers - * Default value is disabled + * Enable/disable direct buffers for the network buffers. + * Default value is disabled. */ protected boolean directBuffer = false; /** - * Enable/disable direct buffers for the network buffers for SSL - * Default value is disabled + * Enable/disable direct buffers for the network buffers for SSL. + * Default value is disabled. */ protected boolean directSslBuffer = false; @@ -85,28 +87,32 @@ public class SocketProperties { /** * The application read buffer size in bytes. - * Default value is 8192 + * Default value is 8192. */ protected int appReadBufSize = 8192; /** - * The application write buffer size in bytes - * Default value is 8192 + * The application write buffer size in bytes. + * Default value is 8192. */ protected int appWriteBufSize = 8192; /** * NioChannel pool size for the endpoint, - * this value is how many channels - * -1 means unlimited cached, 0 means no cache, - * -2 means bufferPoolSize will be used + * this value is how many channels. + * + * 0 means no cache + * -1 means unlimited cached + * -2 means bufferPoolSize will be used * Default value is -2 */ protected int bufferPool = -2; /** - * Buffer pool size in bytes to be cached - * -1 means unlimited, 0 means no cache + * Buffer pool size in bytes to be cached. + * + * -1 means unlimited + * 0 means no cache * Default value is based on the max memory reported by the JVM, * if less than 1GB, then 0, else the value divided by 32. This value * will then be used to compute bufferPool if its value is -2 - 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: Improve formatting
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 ff4c74f2ae Improve formatting ff4c74f2ae is described below commit ff4c74f2ae6fcf309e0d35aadbf34634032225ec Author: Mark Thomas AuthorDate: Thu May 22 18:00:08 2025 +0100 Improve formatting --- .../apache/tomcat/util/net/SocketProperties.java | 42 -- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index 0144ca846e..352750ec36 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -42,9 +42,10 @@ public class SocketProperties { /** * Enable/disable socket processor cache, this bounded cache stores - * SocketProcessor objects to reduce GC - * Default is 0 - * -1 is unlimited + * SocketProcessor objects to reduce GC. + * + * Default is 0 + * -1 is unlimited * 0 is disabled */ protected int processorCache = 0; @@ -52,22 +53,23 @@ public class SocketProperties { /** * Enable/disable poller event cache, this bounded cache stores * PollerEvent objects to reduce GC for the poller - * Default is 0 - * -1 is unlimited - * 0 is disabled + * + * Default is 0 + * -1 is unlimited + * 0 is disabled * >0 the max number of objects to keep in cache. */ protected int eventCache = 0; /** - * Enable/disable direct buffers for the network buffers - * Default value is disabled + * Enable/disable direct buffers for the network buffers. + * Default value is disabled. */ protected boolean directBuffer = false; /** - * Enable/disable direct buffers for the network buffers for SSL - * Default value is disabled + * Enable/disable direct buffers for the network buffers for SSL. + * Default value is disabled. */ protected boolean directSslBuffer = false; @@ -85,28 +87,32 @@ public class SocketProperties { /** * The application read buffer size in bytes. - * Default value is 8192 + * Default value is 8192. */ protected int appReadBufSize = 8192; /** - * The application write buffer size in bytes - * Default value is 8192 + * The application write buffer size in bytes. + * Default value is 8192. */ protected int appWriteBufSize = 8192; /** * NioChannel pool size for the endpoint, - * this value is how many channels - * -1 means unlimited cached, 0 means no cache, - * -2 means bufferPoolSize will be used + * this value is how many channels. + * + * 0 means no cache + * -1 means unlimited cached + * -2 means bufferPoolSize will be used * Default value is -2 */ protected int bufferPool = -2; /** - * Buffer pool size in bytes to be cached - * -1 means unlimited, 0 means no cache + * Buffer pool size in bytes to be cached. + * + * -1 means unlimited + * 0 means no cache * Default value is based on the max memory reported by the JVM, * if less than 1GB, then 0, else the value divided by 32. This value * will then be used to compute bufferPool if its value is -2 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated (0f72e51cad -> 9432ba7054)
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 0f72e51cad Code clean-up - formatting. No functional change. new 5a5afb6e96 Improve formatting new 9432ba7054 Code clean-up - formatting. No functional change. 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: .../apache/tomcat/util/net/AbstractEndpoint.java | 540 +--- .../util/net/AbstractNetworkChannelEndpoint.java | 3 +- java/org/apache/tomcat/util/net/Acceptor.java | 28 +- .../tomcat/util/net/ApplicationBufferHandler.java | 7 +- java/org/apache/tomcat/util/net/Constants.java | 21 +- java/org/apache/tomcat/util/net/DispatchType.java | 5 +- java/org/apache/tomcat/util/net/IPv6Utils.java | 65 +- java/org/apache/tomcat/util/net/NioChannel.java| 57 +- java/org/apache/tomcat/util/net/NioEndpoint.java | 326 +- java/org/apache/tomcat/util/net/SSLContext.java| 8 +- java/org/apache/tomcat/util/net/SSLHostConfig.java | 73 +-- .../tomcat/util/net/SSLHostConfigCertificate.java | 37 +- .../apache/tomcat/util/net/SSLImplementation.java | 26 +- .../apache/tomcat/util/net/SSLSessionManager.java | 3 +- java/org/apache/tomcat/util/net/SSLSupport.java| 82 +-- java/org/apache/tomcat/util/net/SSLUtil.java | 39 +- java/org/apache/tomcat/util/net/SSLUtilBase.java | 126 ++-- .../apache/tomcat/util/net/SecureNioChannel.java | 302 - .../apache/tomcat/util/net/SendfileDataBase.java | 20 +- .../tomcat/util/net/SendfileKeepAliveState.java| 12 +- java/org/apache/tomcat/util/net/SendfileState.java | 6 +- .../tomcat/util/net/ServletConnectionImpl.java | 4 +- .../tomcat/util/net/SocketBufferHandler.java | 14 +- java/org/apache/tomcat/util/net/SocketEvent.java | 24 +- .../apache/tomcat/util/net/SocketProperties.java | 125 ++-- .../apache/tomcat/util/net/SocketWrapperBase.java | 688 + .../tomcat/util/net/TLSClientHelloExtractor.java | 56 +- java/org/apache/tomcat/util/net/WriteBuffer.java | 22 +- 28 files changed, 1340 insertions(+), 1379 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Improve formatting
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 15ad6b2870 Improve formatting 15ad6b2870 is described below commit 15ad6b28705f762c95c7edeb9e8ba7248846b28f Author: Mark Thomas AuthorDate: Thu May 22 18:00:08 2025 +0100 Improve formatting --- .../apache/tomcat/util/net/SocketProperties.java | 56 ++ 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index cd2e70e4ea..4e911e9bf8 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -42,34 +42,34 @@ public class SocketProperties { /** * Enable/disable socket processor cache, this bounded cache stores - * SocketProcessor objects to reduce GC - * Default is 500 - * -1 is unlimited + * SocketProcessor objects to reduce GC. + * + * Default is 500 + * -1 is unlimited * 0 is disabled - * TODO: The default will be changed to 0 in Tomcat 10 */ protected int processorCache = 500; /** * Enable/disable poller event cache, this bounded cache stores * PollerEvent objects to reduce GC for the poller + * * Default is 500 - * -1 is unlimited - * 0 is disabled + * -1 is unlimited + * 0 is disabled * >0 the max number of objects to keep in cache. - * TODO: The default will be changed to 0 in Tomcat 10 */ protected int eventCache = 500; /** - * Enable/disable direct buffers for the network buffers - * Default value is disabled + * Enable/disable direct buffers for the network buffers. + * Default value is disabled. */ protected boolean directBuffer = false; /** - * Enable/disable direct buffers for the network buffers for SSL - * Default value is disabled + * Enable/disable direct buffers for the network buffers for SSL. + * Default value is disabled. */ protected boolean directSslBuffer = false; @@ -87,40 +87,32 @@ public class SocketProperties { /** * The application read buffer size in bytes. - * Default value is rxBufSize + * Default value is rxBufSize. */ protected int appReadBufSize = 8192; /** - * The application write buffer size in bytes - * Default value is txBufSize + * The application write buffer size in bytes. + * Default value is txBufSize. */ protected int appWriteBufSize = 8192; /** * NioChannel pool size for the endpoint, - * this value is how many channels - * -1 means unlimited cached, 0 means no cache - * Default value is 500 - * TODO: The default should be changed in Tomcat 10, actually it should be - * bufferPoolSize / (appReadBufSize + appWriteBufSize), assuming the SSL - * buffers are ignored (that would be logical), and the value would be 6400. - * So the default value will be changed to a new default value like -2 to - * set a dynamic value based on bufferPoolSize in that case. + * this value is how many channels. + * + * Default value is 500 + * 0 means no cache + * -1 means unlimited cached */ protected int bufferPool = 500; /** - * Buffer pool size in bytes to be cached - * -1 means unlimited, 0 means no cache - * Default value is 100MB (1024*1024*100 bytes) - * TODO: The default value to be used could rather be based on the - * JVM max heap, otherwise it could be a problem in some - * environments. Big servers also need to use a much higher default, - * while small cloud based ones should use 0 instead. - * Possible default value strategy: - * heap inf 1GB: 0 - * heap sup 1GB: heap / 32 + * Buffer pool size in bytes to be cached. + * + * Default value is 100MB (1024*1024*100 bytes) + * -1 means unlimited + * 0 means no cache */ protected int bufferPoolSize = 1024*1024*100; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Code clean-up - formatting. No functional change.
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 408ed18861 Code clean-up - formatting. No functional change. 408ed18861 is described below commit 408ed18861c1f4795fa7ddafd417319c6dea14a2 Author: Mark Thomas AuthorDate: Thu May 22 17:10:23 2025 +0100 Code clean-up - formatting. No functional change. --- .../digester/AbstractObjectCreationFactory.java| 24 +- .../apache/tomcat/util/digester/ArrayStack.java| 70 +-- .../tomcat/util/digester/CallMethodRule.java | 198 .../apache/tomcat/util/digester/CallParamRule.java | 66 +-- java/org/apache/tomcat/util/digester/Digester.java | 541 ++--- .../tomcat/util/digester/DocumentProperties.java | 6 +- .../util/digester/EnvironmentPropertySource.java | 19 +- .../tomcat/util/digester/FactoryCreateRule.java| 50 +- .../tomcat/util/digester/ObjectCreateRule.java | 39 +- .../util/digester/ObjectCreationFactory.java | 25 +- java/org/apache/tomcat/util/digester/Rule.java | 64 ++- java/org/apache/tomcat/util/digester/RuleSet.java | 31 +- java/org/apache/tomcat/util/digester/Rules.java| 36 +- .../org/apache/tomcat/util/digester/RulesBase.java | 80 ++- .../digester/ServiceBindingPropertySource.java | 37 +- .../apache/tomcat/util/digester/SetNextRule.java | 88 ++-- .../tomcat/util/digester/SetPropertiesRule.java| 25 +- .../tomcat/util/digester/SystemPropertySource.java | 5 +- 18 files changed, 652 insertions(+), 752 deletions(-) diff --git a/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java b/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java index 01faa5347c..4c647fa766 100644 --- a/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java +++ b/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java @@ -21,19 +21,18 @@ import org.xml.sax.Attributes; /** - * Abstract base class for ObjectCreationFactory - * implementations. + * + * Abstract base class for ObjectCreationFactory implementations. + * */ -public abstract class AbstractObjectCreationFactory -implements ObjectCreationFactory { +public abstract class AbstractObjectCreationFactory implements ObjectCreationFactory { // - Instance Variables /** - * The associated Digester instance that was set up by - * {@link FactoryCreateRule} upon initialization. + * The associated Digester instance that was set up by {@link FactoryCreateRule} upon initialization. */ private Digester digester = null; @@ -42,8 +41,8 @@ public abstract class AbstractObjectCreationFactory /** - * Factory method called by {@link FactoryCreateRule} to supply an - * object based on the element's attributes. + * + * Factory method called by {@link FactoryCreateRule} to supply an object based on the element's attributes. * * @param attributes the element's attributes * @@ -54,8 +53,8 @@ public abstract class AbstractObjectCreationFactory /** - * Returns the {@link Digester} that was set by the - * {@link FactoryCreateRule} upon initialization. + * + * Returns the {@link Digester} that was set by the {@link FactoryCreateRule} upon initialization. */ @Override public Digester getDigester() { @@ -64,8 +63,9 @@ public abstract class AbstractObjectCreationFactory /** - * Set the {@link Digester} to allow the implementation to do logging, - * classloading based on the digester's classloader, etc. + * + * Set the {@link Digester} to allow the implementation to do logging, classloading based on the digester's + * classloader, etc. * * @param digester parent Digester object */ diff --git a/java/org/apache/tomcat/util/digester/ArrayStack.java b/java/org/apache/tomcat/util/digester/ArrayStack.java index 9911811d54..6f63b4f885 100644 --- a/java/org/apache/tomcat/util/digester/ArrayStack.java +++ b/java/org/apache/tomcat/util/digester/ArrayStack.java @@ -21,27 +21,28 @@ import java.util.ArrayList; import java.util.EmptyStackException; /** - * Imported copy of the ArrayStack class from - * Commons Collections, which was the only direct dependency from Digester. - * - * WARNING - This class is public solely to allow it to be - * used from subpackages of org.apache.commons.digester. - * It should not be considered part of the public API of Commons Digester. - * If you want to use such a class yourself, you should use the one from - * Commons Collections directly. - * - * An implementation of the {@link java.util.Stack} API that is based on an - * ArrayList instead of a Vector, so it is not - * synchronized to protect against multi-threaded a
(tomcat) branch 11.0.x updated: Code clean-up - formatting. No functional change.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 10b0e79c68 Code clean-up - formatting. No functional change. 10b0e79c68 is described below commit 10b0e79c68d36f39fb2918bedc7dac39b8b73170 Author: Mark Thomas AuthorDate: Thu May 22 17:11:10 2025 +0100 Code clean-up - formatting. No functional change. --- .../digester/AbstractObjectCreationFactory.java| 24 +- .../apache/tomcat/util/digester/ArrayStack.java| 70 +-- .../tomcat/util/digester/CallMethodRule.java | 198 .../apache/tomcat/util/digester/CallParamRule.java | 66 +-- java/org/apache/tomcat/util/digester/Digester.java | 541 ++--- .../tomcat/util/digester/DocumentProperties.java | 6 +- .../util/digester/EnvironmentPropertySource.java | 19 +- .../tomcat/util/digester/FactoryCreateRule.java| 50 +- .../tomcat/util/digester/ObjectCreateRule.java | 39 +- .../util/digester/ObjectCreationFactory.java | 25 +- java/org/apache/tomcat/util/digester/Rule.java | 64 ++- java/org/apache/tomcat/util/digester/RuleSet.java | 31 +- java/org/apache/tomcat/util/digester/Rules.java| 36 +- .../org/apache/tomcat/util/digester/RulesBase.java | 80 ++- .../digester/ServiceBindingPropertySource.java | 37 +- .../apache/tomcat/util/digester/SetNextRule.java | 88 ++-- .../tomcat/util/digester/SetPropertiesRule.java| 25 +- .../tomcat/util/digester/SystemPropertySource.java | 5 +- 18 files changed, 652 insertions(+), 752 deletions(-) diff --git a/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java b/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java index 01faa5347c..4c647fa766 100644 --- a/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java +++ b/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java @@ -21,19 +21,18 @@ import org.xml.sax.Attributes; /** - * Abstract base class for ObjectCreationFactory - * implementations. + * + * Abstract base class for ObjectCreationFactory implementations. + * */ -public abstract class AbstractObjectCreationFactory -implements ObjectCreationFactory { +public abstract class AbstractObjectCreationFactory implements ObjectCreationFactory { // - Instance Variables /** - * The associated Digester instance that was set up by - * {@link FactoryCreateRule} upon initialization. + * The associated Digester instance that was set up by {@link FactoryCreateRule} upon initialization. */ private Digester digester = null; @@ -42,8 +41,8 @@ public abstract class AbstractObjectCreationFactory /** - * Factory method called by {@link FactoryCreateRule} to supply an - * object based on the element's attributes. + * + * Factory method called by {@link FactoryCreateRule} to supply an object based on the element's attributes. * * @param attributes the element's attributes * @@ -54,8 +53,8 @@ public abstract class AbstractObjectCreationFactory /** - * Returns the {@link Digester} that was set by the - * {@link FactoryCreateRule} upon initialization. + * + * Returns the {@link Digester} that was set by the {@link FactoryCreateRule} upon initialization. */ @Override public Digester getDigester() { @@ -64,8 +63,9 @@ public abstract class AbstractObjectCreationFactory /** - * Set the {@link Digester} to allow the implementation to do logging, - * classloading based on the digester's classloader, etc. + * + * Set the {@link Digester} to allow the implementation to do logging, classloading based on the digester's + * classloader, etc. * * @param digester parent Digester object */ diff --git a/java/org/apache/tomcat/util/digester/ArrayStack.java b/java/org/apache/tomcat/util/digester/ArrayStack.java index 9911811d54..6f63b4f885 100644 --- a/java/org/apache/tomcat/util/digester/ArrayStack.java +++ b/java/org/apache/tomcat/util/digester/ArrayStack.java @@ -21,27 +21,28 @@ import java.util.ArrayList; import java.util.EmptyStackException; /** - * Imported copy of the ArrayStack class from - * Commons Collections, which was the only direct dependency from Digester. - * - * WARNING - This class is public solely to allow it to be - * used from subpackages of org.apache.commons.digester. - * It should not be considered part of the public API of Commons Digester. - * If you want to use such a class yourself, you should use the one from - * Commons Collections directly. - * - * An implementation of the {@link java.util.Stack} API that is based on an - * ArrayList instead of a Vector, so it is not - * synchronized to protect against multi-thread
(tomcat) branch main updated: Code clean-up - formatting. No functional change.
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 1c571ba59e Code clean-up - formatting. No functional change. 1c571ba59e is described below commit 1c571ba59eaddb6a0f225e63db1e8ff7c481c131 Author: Mark Thomas AuthorDate: Thu May 22 17:13:47 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/file/ConfigFileLoader.java | 14 ++-- .../tomcat/util/file/ConfigurationSource.java | 53 +-- java/org/apache/tomcat/util/file/Matcher.java | 75 +- 3 files changed, 68 insertions(+), 74 deletions(-) diff --git a/java/org/apache/tomcat/util/file/ConfigFileLoader.java b/java/org/apache/tomcat/util/file/ConfigFileLoader.java index a7f6a79cd9..b48318ac07 100644 --- a/java/org/apache/tomcat/util/file/ConfigFileLoader.java +++ b/java/org/apache/tomcat/util/file/ConfigFileLoader.java @@ -20,17 +20,17 @@ package org.apache.tomcat.util.file; import java.io.InputStream; /** - * This class is used to obtain {@link InputStream}s for configuration files - * from a given location String. This allows greater flexibility than these - * files having to be loaded directly from a file system. + * This class is used to obtain {@link InputStream}s for configuration files from a given location String. This allows + * greater flexibility than these files having to be loaded directly from a file system. */ public class ConfigFileLoader { private static ConfigurationSource source; /** - * Get the configured configuration source. If none has been configured, - * a default source based on the calling directory will be used. + * Get the configured configuration source. If none has been configured, a default source based on the calling + * directory will be used. + * * @return the configuration source in use */ public static ConfigurationSource getSource() { @@ -41,8 +41,8 @@ public class ConfigFileLoader { } /** - * Set the configuration source used by Tomcat to locate various - * configuration resources. + * Set the configuration source used by Tomcat to locate various configuration resources. + * * @param source The source */ public static void setSource(ConfigurationSource source) { diff --git a/java/org/apache/tomcat/util/file/ConfigurationSource.java b/java/org/apache/tomcat/util/file/ConfigurationSource.java index b2b3aaeb08..08261dae09 100644 --- a/java/org/apache/tomcat/util/file/ConfigurationSource.java +++ b/java/org/apache/tomcat/util/file/ConfigurationSource.java @@ -29,17 +29,16 @@ import java.net.URLConnection; import org.apache.tomcat.util.buf.UriUtil; /** - * Abstracts configuration file storage. Allows Tomcat embedding using the regular - * configuration style. - * This abstraction aims to be very simple and does not cover resource listing, - * which is usually used for dynamic deployments that are usually not used when - * embedding, as well as resource writing. + * Abstracts configuration file storage. Allows Tomcat embedding using the regular configuration style. This abstraction + * aims to be very simple and does not cover resource listing, which is usually used for dynamic deployments that are + * usually not used when embedding, as well as resource writing. */ public interface ConfigurationSource { ConfigurationSource DEFAULT = new ConfigurationSource() { private final File userDir = new File(System.getProperty("user.dir")); private final URI userDirUri = userDir.toURI(); + @Override public Resource getResource(String name) throws IOException { if (!UriUtil.isAbsoluteURI(name)) { @@ -65,6 +64,7 @@ public interface ConfigurationSource { throw new FileNotFoundException(name); } } + @Override public URI getURI(String name) { if (!UriUtil.isAbsoluteURI(name)) { @@ -81,24 +81,26 @@ public interface ConfigurationSource { }; /** - * Represents a resource: a stream to the resource associated with - * its URI. + * Represents a resource: a stream to the resource associated with its URI. */ class Resource implements AutoCloseable { private final InputStream inputStream; private final URI uri; + public Resource(InputStream inputStream, URI uri) { this.inputStream = inputStream; this.uri = uri; } + public InputStream getInputStream() { return inputStream; } + public URI getURI() { return uri; } -public long getLastModified() -throws MalformedURLException, IOException { + +public long getLastModified() throws MalformedURLExceptio
(tomcat) branch 9.0.x updated: Code clean-up - formatting. No functional change.
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 aa0ee59ec1 Code clean-up - formatting. No functional change. aa0ee59ec1 is described below commit aa0ee59ec1da16e45c12a9c56868f304e516b849 Author: Mark Thomas AuthorDate: Thu May 22 17:14:14 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/file/ConfigFileLoader.java | 17 ++--- .../tomcat/util/file/ConfigurationSource.java | 53 +-- java/org/apache/tomcat/util/file/Matcher.java | 75 +- 3 files changed, 68 insertions(+), 77 deletions(-) diff --git a/java/org/apache/tomcat/util/file/ConfigFileLoader.java b/java/org/apache/tomcat/util/file/ConfigFileLoader.java index 9d8d3d1d3a..533eab54be 100644 --- a/java/org/apache/tomcat/util/file/ConfigFileLoader.java +++ b/java/org/apache/tomcat/util/file/ConfigFileLoader.java @@ -22,9 +22,8 @@ import java.io.InputStream; import java.net.URI; /** - * This class is used to obtain {@link InputStream}s for configuration files - * from a given location String. This allows greater flexibility than these - * files having to be loaded directly from a file system. + * This class is used to obtain {@link InputStream}s for configuration files from a given location String. This allows + * greater flexibility than these files having to be loaded directly from a file system. */ public class ConfigFileLoader { @@ -51,15 +50,13 @@ public class ConfigFileLoader { /** * Load the resource from the specified location. * - * @param location The location for the resource of interest. The location - * may be a URL or a file path. Relative paths will be - * resolved against CATALINA_BASE. + * @param location The location for the resource of interest. The location may be a URL or a file path. Relative + * paths will be resolved against CATALINA_BASE. * - * @return The InputStream for the given resource. The caller is responsible - * for closing this stream when it is no longer used. + * @return The InputStream for the given resource. The caller is responsible for closing this stream when it is no + * longer used. * - * @throws IOException If an InputStream cannot be created using the - * provided location + * @throws IOException If an InputStream cannot be created using the provided location */ @Deprecated public static InputStream getInputStream(String location) throws IOException { diff --git a/java/org/apache/tomcat/util/file/ConfigurationSource.java b/java/org/apache/tomcat/util/file/ConfigurationSource.java index b2b3aaeb08..08261dae09 100644 --- a/java/org/apache/tomcat/util/file/ConfigurationSource.java +++ b/java/org/apache/tomcat/util/file/ConfigurationSource.java @@ -29,17 +29,16 @@ import java.net.URLConnection; import org.apache.tomcat.util.buf.UriUtil; /** - * Abstracts configuration file storage. Allows Tomcat embedding using the regular - * configuration style. - * This abstraction aims to be very simple and does not cover resource listing, - * which is usually used for dynamic deployments that are usually not used when - * embedding, as well as resource writing. + * Abstracts configuration file storage. Allows Tomcat embedding using the regular configuration style. This abstraction + * aims to be very simple and does not cover resource listing, which is usually used for dynamic deployments that are + * usually not used when embedding, as well as resource writing. */ public interface ConfigurationSource { ConfigurationSource DEFAULT = new ConfigurationSource() { private final File userDir = new File(System.getProperty("user.dir")); private final URI userDirUri = userDir.toURI(); + @Override public Resource getResource(String name) throws IOException { if (!UriUtil.isAbsoluteURI(name)) { @@ -65,6 +64,7 @@ public interface ConfigurationSource { throw new FileNotFoundException(name); } } + @Override public URI getURI(String name) { if (!UriUtil.isAbsoluteURI(name)) { @@ -81,24 +81,26 @@ public interface ConfigurationSource { }; /** - * Represents a resource: a stream to the resource associated with - * its URI. + * Represents a resource: a stream to the resource associated with its URI. */ class Resource implements AutoCloseable { private final InputStream inputStream; private final URI uri; + public Resource(InputStream inputStream, URI uri) { this.inputStream = inputStream; this.uri = uri; } + public InputStre
(tomcat) branch 9.0.x updated: Code clean-up - formatting. No functional change.
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 5af15c15c4 Code clean-up - formatting. No functional change. 5af15c15c4 is described below commit 5af15c15c4191a3bb84e64216e14bb291b7c6478 Author: Mark Thomas AuthorDate: Thu May 22 17:12:03 2025 +0100 Code clean-up - formatting. No functional change. --- .../digester/AbstractObjectCreationFactory.java| 24 +- .../apache/tomcat/util/digester/ArrayStack.java| 70 +-- .../tomcat/util/digester/CallMethodRule.java | 198 .../apache/tomcat/util/digester/CallParamRule.java | 66 +-- java/org/apache/tomcat/util/digester/Digester.java | 550 ++--- .../tomcat/util/digester/DocumentProperties.java | 6 +- .../util/digester/EnvironmentPropertySource.java | 19 +- .../tomcat/util/digester/FactoryCreateRule.java| 50 +- .../tomcat/util/digester/ObjectCreateRule.java | 39 +- .../util/digester/ObjectCreationFactory.java | 25 +- java/org/apache/tomcat/util/digester/Rule.java | 64 ++- java/org/apache/tomcat/util/digester/RuleSet.java | 31 +- java/org/apache/tomcat/util/digester/Rules.java| 36 +- .../org/apache/tomcat/util/digester/RulesBase.java | 80 ++- .../digester/ServiceBindingPropertySource.java | 37 +- .../apache/tomcat/util/digester/SetNextRule.java | 88 ++-- .../tomcat/util/digester/SetPropertiesRule.java| 25 +- .../tomcat/util/digester/SystemPropertySource.java | 5 +- 18 files changed, 656 insertions(+), 757 deletions(-) diff --git a/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java b/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java index 01faa5347c..4c647fa766 100644 --- a/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java +++ b/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java @@ -21,19 +21,18 @@ import org.xml.sax.Attributes; /** - * Abstract base class for ObjectCreationFactory - * implementations. + * + * Abstract base class for ObjectCreationFactory implementations. + * */ -public abstract class AbstractObjectCreationFactory -implements ObjectCreationFactory { +public abstract class AbstractObjectCreationFactory implements ObjectCreationFactory { // - Instance Variables /** - * The associated Digester instance that was set up by - * {@link FactoryCreateRule} upon initialization. + * The associated Digester instance that was set up by {@link FactoryCreateRule} upon initialization. */ private Digester digester = null; @@ -42,8 +41,8 @@ public abstract class AbstractObjectCreationFactory /** - * Factory method called by {@link FactoryCreateRule} to supply an - * object based on the element's attributes. + * + * Factory method called by {@link FactoryCreateRule} to supply an object based on the element's attributes. * * @param attributes the element's attributes * @@ -54,8 +53,8 @@ public abstract class AbstractObjectCreationFactory /** - * Returns the {@link Digester} that was set by the - * {@link FactoryCreateRule} upon initialization. + * + * Returns the {@link Digester} that was set by the {@link FactoryCreateRule} upon initialization. */ @Override public Digester getDigester() { @@ -64,8 +63,9 @@ public abstract class AbstractObjectCreationFactory /** - * Set the {@link Digester} to allow the implementation to do logging, - * classloading based on the digester's classloader, etc. + * + * Set the {@link Digester} to allow the implementation to do logging, classloading based on the digester's + * classloader, etc. * * @param digester parent Digester object */ diff --git a/java/org/apache/tomcat/util/digester/ArrayStack.java b/java/org/apache/tomcat/util/digester/ArrayStack.java index d3801f389f..009757a8c6 100644 --- a/java/org/apache/tomcat/util/digester/ArrayStack.java +++ b/java/org/apache/tomcat/util/digester/ArrayStack.java @@ -20,27 +20,28 @@ import java.util.ArrayList; import java.util.EmptyStackException; /** - * Imported copy of the ArrayStack class from - * Commons Collections, which was the only direct dependency from Digester. - * - * WARNING - This class is public solely to allow it to be - * used from subpackages of org.apache.commons.digester. - * It should not be considered part of the public API of Commons Digester. - * If you want to use such a class yourself, you should use the one from - * Commons Collections directly. - * - * An implementation of the {@link java.util.Stack} API that is based on an - * ArrayList instead of a Vector, so it is not - * synchronized to protect against multi-threaded
(tomcat) branch 11.0.x updated: Code clean-up - formatting. No functional change.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 46e28d0fad Code clean-up - formatting. No functional change. 46e28d0fad is described below commit 46e28d0fad14d306816841d2bf96961d180e9450 Author: Mark Thomas AuthorDate: Thu May 22 17:16:13 2025 +0100 Code clean-up - formatting. No functional change. --- .../util/http/InvalidParameterException.java | 4 +- java/org/apache/tomcat/util/http/MimeHeaders.java | 38 +-- .../tomcat/util/http/Rfc6265CookieProcessor.java | 8 +- .../apache/tomcat/util/http/WebdavIfHeader.java| 363 + .../org/apache/tomcat/util/http/parser/Cookie.java | 4 +- 5 files changed, 176 insertions(+), 241 deletions(-) diff --git a/java/org/apache/tomcat/util/http/InvalidParameterException.java b/java/org/apache/tomcat/util/http/InvalidParameterException.java index 91229dc6d7..e27048be4a 100644 --- a/java/org/apache/tomcat/util/http/InvalidParameterException.java +++ b/java/org/apache/tomcat/util/http/InvalidParameterException.java @@ -23,7 +23,7 @@ import jakarta.servlet.http.HttpServletResponse; /** * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. * - * Implementation note: This class extends {@link IllegalStateException} since that is the class that the Servlet 6.1 + * Implementation note: This class extends {@link IllegalStateException} since that is the class that the Servlet 6.1 * onwards Javadocs define is thrown by the various {@code ServletRequest.getParameterXXX()} methods. */ public class InvalidParameterException extends IllegalStateException { @@ -81,7 +81,7 @@ public class InvalidParameterException extends IllegalStateException { * Construct a new exception with the given cause and error code. The message for this exception will be generated * by calling {@code cause.toString()}. * - * @param cause The exception to use as the cause of this exception + * @param cause The exception to use as the cause of this exception * @param errorCode The HTTP status code to use when reporting this error. Expected to be >= 400. */ public InvalidParameterException(Throwable cause, int errorCode) { diff --git a/java/org/apache/tomcat/util/http/MimeHeaders.java b/java/org/apache/tomcat/util/http/MimeHeaders.java index d5a72043db..16f65cb86a 100644 --- a/java/org/apache/tomcat/util/http/MimeHeaders.java +++ b/java/org/apache/tomcat/util/http/MimeHeaders.java @@ -39,34 +39,26 @@ import org.apache.tomcat.util.res.StringManager; * calls header methods, but is easy to avoid inside tomcat. The goal is to use _only_ MessageByte-based Fields, and * reduce to 0 the memory overhead of tomcat. * - * This class is used to contain standard internet message headers, - * used for SMTP (RFC822) and HTTP (RFC2068) messages as well as for - * MIME (RFC 2045) applications such as transferring typed data and - * grouping related items in multipart message bodies. + * This class is used to contain standard internet message headers, used for SMTP (RFC822) and HTTP (RFC2068) messages + * as well as for MIME (RFC 2045) applications such as transferring typed data and grouping related items in multipart + * message bodies. * - * Message headers, as specified in RFC822, include a field name - * and a field body. Order has no semantic significance, and several - * fields with the same name may exist. However, most fields do not - * (and should not) exist more than once in a header. + * Message headers, as specified in RFC822, include a field name and a field body. Order has no semantic significance, + * and several fields with the same name may exist. However, most fields do not (and should not) exist more than once in + * a header. * - * Many kinds of field body must conform to a specified syntax, - * including the standard parenthesized comment syntax. This class - * supports only two simple syntaxes, for dates and integers. + * Many kinds of field body must conform to a specified syntax, including the standard parenthesized comment syntax. + * This class supports only two simple syntaxes, for dates and integers. * - * When processing headers, care must be taken to handle the case of - * multiple same-name fields correctly. The values of such fields are - * only available as strings. They may be accessed by index (treating - * the header as an array of fields), or by name (returning an array - * of string values). + * When processing headers, care must be taken to handle the case of multiple same-name fields correctly. The values of + * such fields are only available as strings. They may be accessed by index (treating the header as an array of fields), + * or by name (returning an array of string values). * - * Headers are first parsed and
(tomcat) branch 10.1.x updated: Code clean-up - formatting. No functional change.
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 19cf662696 Code clean-up - formatting. No functional change. 19cf662696 is described below commit 19cf66269621c96a9899711a9e3c7c658eaac3ad Author: Mark Thomas AuthorDate: Thu May 22 17:25:39 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/modeler/AttributeInfo.java | 33 +- .../tomcat/util/modeler/BaseAttributeFilter.java | 45 +- .../apache/tomcat/util/modeler/BaseModelMBean.java | 457 + .../util/modeler/BaseNotificationBroadcaster.java | 54 +-- .../apache/tomcat/util/modeler/FeatureInfo.java| 10 +- .../apache/tomcat/util/modeler/ManagedBean.java| 111 +++-- .../tomcat/util/modeler/NoDescriptorRegistry.java | 84 ++-- .../tomcat/util/modeler/NotificationInfo.java | 23 +- .../apache/tomcat/util/modeler/OperationInfo.java | 33 +- .../apache/tomcat/util/modeler/ParameterInfo.java | 15 +- java/org/apache/tomcat/util/modeler/Registry.java | 168 .../apache/tomcat/util/modeler/RegistryMBean.java | 79 ++-- .../modules/MbeansDescriptorsDigesterSource.java | 137 +++--- .../MbeansDescriptorsIntrospectionSource.java | 122 ++ .../tomcat/util/modeler/modules/ModelerSource.java | 9 +- 15 files changed, 591 insertions(+), 789 deletions(-) diff --git a/java/org/apache/tomcat/util/modeler/AttributeInfo.java b/java/org/apache/tomcat/util/modeler/AttributeInfo.java index ffb13fe614..c44882fdf5 100644 --- a/java/org/apache/tomcat/util/modeler/AttributeInfo.java +++ b/java/org/apache/tomcat/util/modeler/AttributeInfo.java @@ -19,8 +19,9 @@ package org.apache.tomcat.util.modeler; import javax.management.MBeanAttributeInfo; /** - * Internal configuration information for an Attribute - * descriptor. + * + * Internal configuration information for an Attribute descriptor. + * * * @author Craig R. McClanahan */ @@ -54,7 +55,7 @@ public class AttributeInfo extends FeatureInfo { * @return the name of the property getter method, if non-standard. */ public String getGetMethod() { -if(getMethod == null) { +if (getMethod == null) { getMethod = getMethodName(getName(), true, isIs()); } return this.getMethod; @@ -66,8 +67,8 @@ public class AttributeInfo extends FeatureInfo { /** * Is this a boolean attribute with an "is" getter? - * @return true if this is a boolean attribute - * with an "is" getter + * + * @return true if this is a boolean attribute with an "is" getter */ public boolean isIs() { return this.is; @@ -80,6 +81,7 @@ public class AttributeInfo extends FeatureInfo { /** * Is this attribute readable by management applications? + * * @return true if readable */ public boolean isReadable() { @@ -95,7 +97,7 @@ public class AttributeInfo extends FeatureInfo { * @return the name of the property setter method, if non-standard. */ public String getSetMethod() { -if( setMethod == null ) { +if (setMethod == null) { setMethod = getMethodName(getName(), false, false); } return this.setMethod; @@ -107,6 +109,7 @@ public class AttributeInfo extends FeatureInfo { /** * Is this attribute writable by management applications? + * * @return true if writable */ public boolean isWriteable() { @@ -121,29 +124,29 @@ public class AttributeInfo extends FeatureInfo { /** - * Create and return a ModelMBeanAttributeInfo object that - * corresponds to the attribute described by this instance. + * Create and return a ModelMBeanAttributeInfo object that corresponds to the attribute described by + * this instance. + * * @return the attribute info */ MBeanAttributeInfo createAttributeInfo() { // Return our cached information (if any) if (info == null) { -info = new MBeanAttributeInfo(getName(), getType(), getDescription(), -isReadable(), isWriteable(), false); +info = new MBeanAttributeInfo(getName(), getType(), getDescription(), isReadable(), isWriteable(), false); } -return (MBeanAttributeInfo)info; +return (MBeanAttributeInfo) info; } // Private Methods /** - * Create and return the name of a default property getter or setter - * method, according to the specified values. + * Create and return the name of a default property getter or setter method, according to the specified values. * - * @param name Name of the property itself + * @param name Name of the property itself * @p
(tomcat) branch 11.0.x updated: Code clean-up - formatting. No functional change.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 43d429ed10 Code clean-up - formatting. No functional change. 43d429ed10 is described below commit 43d429ed10ad64821203fe02815826de5928aae1 Author: Mark Thomas AuthorDate: Thu May 22 17:25:19 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/modeler/AttributeInfo.java | 33 +- .../tomcat/util/modeler/BaseAttributeFilter.java | 42 +- .../apache/tomcat/util/modeler/BaseModelMBean.java | 457 + .../util/modeler/BaseNotificationBroadcaster.java | 51 +-- .../apache/tomcat/util/modeler/FeatureInfo.java| 10 +- .../apache/tomcat/util/modeler/ManagedBean.java| 111 +++-- .../tomcat/util/modeler/NoDescriptorRegistry.java | 84 ++-- .../tomcat/util/modeler/NotificationInfo.java | 23 +- .../apache/tomcat/util/modeler/OperationInfo.java | 33 +- .../apache/tomcat/util/modeler/ParameterInfo.java | 15 +- java/org/apache/tomcat/util/modeler/Registry.java | 168 .../apache/tomcat/util/modeler/RegistryMBean.java | 79 ++-- .../modules/MbeansDescriptorsDigesterSource.java | 137 +++--- .../MbeansDescriptorsIntrospectionSource.java | 122 ++ .../tomcat/util/modeler/modules/ModelerSource.java | 9 +- 15 files changed, 589 insertions(+), 785 deletions(-) diff --git a/java/org/apache/tomcat/util/modeler/AttributeInfo.java b/java/org/apache/tomcat/util/modeler/AttributeInfo.java index 0ecf077ff2..15f83e59c3 100644 --- a/java/org/apache/tomcat/util/modeler/AttributeInfo.java +++ b/java/org/apache/tomcat/util/modeler/AttributeInfo.java @@ -21,8 +21,9 @@ import java.io.Serial; import javax.management.MBeanAttributeInfo; /** - * Internal configuration information for an Attribute - * descriptor. + * + * Internal configuration information for an Attribute descriptor. + * * * @author Craig R. McClanahan */ @@ -57,7 +58,7 @@ public class AttributeInfo extends FeatureInfo { * @return the name of the property getter method, if non-standard. */ public String getGetMethod() { -if(getMethod == null) { +if (getMethod == null) { getMethod = getMethodName(getName(), true, isIs()); } return this.getMethod; @@ -69,8 +70,8 @@ public class AttributeInfo extends FeatureInfo { /** * Is this a boolean attribute with an "is" getter? - * @return true if this is a boolean attribute - * with an "is" getter + * + * @return true if this is a boolean attribute with an "is" getter */ public boolean isIs() { return this.is; @@ -83,6 +84,7 @@ public class AttributeInfo extends FeatureInfo { /** * Is this attribute readable by management applications? + * * @return true if readable */ public boolean isReadable() { @@ -98,7 +100,7 @@ public class AttributeInfo extends FeatureInfo { * @return the name of the property setter method, if non-standard. */ public String getSetMethod() { -if( setMethod == null ) { +if (setMethod == null) { setMethod = getMethodName(getName(), false, false); } return this.setMethod; @@ -110,6 +112,7 @@ public class AttributeInfo extends FeatureInfo { /** * Is this attribute writable by management applications? + * * @return true if writable */ public boolean isWriteable() { @@ -124,29 +127,29 @@ public class AttributeInfo extends FeatureInfo { /** - * Create and return a ModelMBeanAttributeInfo object that - * corresponds to the attribute described by this instance. + * Create and return a ModelMBeanAttributeInfo object that corresponds to the attribute described by + * this instance. + * * @return the attribute info */ MBeanAttributeInfo createAttributeInfo() { // Return our cached information (if any) if (info == null) { -info = new MBeanAttributeInfo(getName(), getType(), getDescription(), -isReadable(), isWriteable(), false); +info = new MBeanAttributeInfo(getName(), getType(), getDescription(), isReadable(), isWriteable(), false); } -return (MBeanAttributeInfo)info; +return (MBeanAttributeInfo) info; } // Private Methods /** - * Create and return the name of a default property getter or setter - * method, according to the specified values. + * Create and return the name of a default property getter or setter method, according to the specified values. * - * @param name Name of the property itself + * @param name Name of the property itself * @param getter Do w
(tomcat) branch 9.0.x updated: Code clean-up - formatting. No functional change.
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 4c06f691cb Code clean-up - formatting. No functional change. 4c06f691cb is described below commit 4c06f691cb2193db6f58254a9be0b8988b7d6114 Author: Mark Thomas AuthorDate: Thu May 22 17:26:06 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/modeler/AttributeInfo.java | 33 +- .../tomcat/util/modeler/BaseAttributeFilter.java | 45 +- .../apache/tomcat/util/modeler/BaseModelMBean.java | 457 + .../util/modeler/BaseNotificationBroadcaster.java | 54 +-- .../apache/tomcat/util/modeler/FeatureInfo.java| 10 +- .../apache/tomcat/util/modeler/ManagedBean.java| 111 +++-- .../tomcat/util/modeler/NoDescriptorRegistry.java | 84 ++-- .../tomcat/util/modeler/NotificationInfo.java | 23 +- .../apache/tomcat/util/modeler/OperationInfo.java | 33 +- .../apache/tomcat/util/modeler/ParameterInfo.java | 15 +- java/org/apache/tomcat/util/modeler/Registry.java | 168 .../apache/tomcat/util/modeler/RegistryMBean.java | 79 ++-- .../modules/MbeansDescriptorsDigesterSource.java | 137 +++--- .../MbeansDescriptorsIntrospectionSource.java | 122 ++ .../tomcat/util/modeler/modules/ModelerSource.java | 9 +- 15 files changed, 591 insertions(+), 789 deletions(-) diff --git a/java/org/apache/tomcat/util/modeler/AttributeInfo.java b/java/org/apache/tomcat/util/modeler/AttributeInfo.java index ffb13fe614..c44882fdf5 100644 --- a/java/org/apache/tomcat/util/modeler/AttributeInfo.java +++ b/java/org/apache/tomcat/util/modeler/AttributeInfo.java @@ -19,8 +19,9 @@ package org.apache.tomcat.util.modeler; import javax.management.MBeanAttributeInfo; /** - * Internal configuration information for an Attribute - * descriptor. + * + * Internal configuration information for an Attribute descriptor. + * * * @author Craig R. McClanahan */ @@ -54,7 +55,7 @@ public class AttributeInfo extends FeatureInfo { * @return the name of the property getter method, if non-standard. */ public String getGetMethod() { -if(getMethod == null) { +if (getMethod == null) { getMethod = getMethodName(getName(), true, isIs()); } return this.getMethod; @@ -66,8 +67,8 @@ public class AttributeInfo extends FeatureInfo { /** * Is this a boolean attribute with an "is" getter? - * @return true if this is a boolean attribute - * with an "is" getter + * + * @return true if this is a boolean attribute with an "is" getter */ public boolean isIs() { return this.is; @@ -80,6 +81,7 @@ public class AttributeInfo extends FeatureInfo { /** * Is this attribute readable by management applications? + * * @return true if readable */ public boolean isReadable() { @@ -95,7 +97,7 @@ public class AttributeInfo extends FeatureInfo { * @return the name of the property setter method, if non-standard. */ public String getSetMethod() { -if( setMethod == null ) { +if (setMethod == null) { setMethod = getMethodName(getName(), false, false); } return this.setMethod; @@ -107,6 +109,7 @@ public class AttributeInfo extends FeatureInfo { /** * Is this attribute writable by management applications? + * * @return true if writable */ public boolean isWriteable() { @@ -121,29 +124,29 @@ public class AttributeInfo extends FeatureInfo { /** - * Create and return a ModelMBeanAttributeInfo object that - * corresponds to the attribute described by this instance. + * Create and return a ModelMBeanAttributeInfo object that corresponds to the attribute described by + * this instance. + * * @return the attribute info */ MBeanAttributeInfo createAttributeInfo() { // Return our cached information (if any) if (info == null) { -info = new MBeanAttributeInfo(getName(), getType(), getDescription(), -isReadable(), isWriteable(), false); +info = new MBeanAttributeInfo(getName(), getType(), getDescription(), isReadable(), isWriteable(), false); } -return (MBeanAttributeInfo)info; +return (MBeanAttributeInfo) info; } // Private Methods /** - * Create and return the name of a default property getter or setter - * method, according to the specified values. + * Create and return the name of a default property getter or setter method, according to the specified values. * - * @param name Name of the property itself + * @param name Name of the property itself * @par
(tomcat) branch 11.0.x updated: Code clean-up - formatting. No functional change.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new fb49357c22 Code clean-up - formatting. No functional change. fb49357c22 is described below commit fb49357c2294c7c0fe653ab6b7d8a6d9ebe68fa6 Author: Mark Thomas AuthorDate: Thu May 22 17:14:02 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/file/ConfigFileLoader.java | 14 ++-- .../tomcat/util/file/ConfigurationSource.java | 53 +-- java/org/apache/tomcat/util/file/Matcher.java | 75 +- 3 files changed, 68 insertions(+), 74 deletions(-) diff --git a/java/org/apache/tomcat/util/file/ConfigFileLoader.java b/java/org/apache/tomcat/util/file/ConfigFileLoader.java index a7f6a79cd9..b48318ac07 100644 --- a/java/org/apache/tomcat/util/file/ConfigFileLoader.java +++ b/java/org/apache/tomcat/util/file/ConfigFileLoader.java @@ -20,17 +20,17 @@ package org.apache.tomcat.util.file; import java.io.InputStream; /** - * This class is used to obtain {@link InputStream}s for configuration files - * from a given location String. This allows greater flexibility than these - * files having to be loaded directly from a file system. + * This class is used to obtain {@link InputStream}s for configuration files from a given location String. This allows + * greater flexibility than these files having to be loaded directly from a file system. */ public class ConfigFileLoader { private static ConfigurationSource source; /** - * Get the configured configuration source. If none has been configured, - * a default source based on the calling directory will be used. + * Get the configured configuration source. If none has been configured, a default source based on the calling + * directory will be used. + * * @return the configuration source in use */ public static ConfigurationSource getSource() { @@ -41,8 +41,8 @@ public class ConfigFileLoader { } /** - * Set the configuration source used by Tomcat to locate various - * configuration resources. + * Set the configuration source used by Tomcat to locate various configuration resources. + * * @param source The source */ public static void setSource(ConfigurationSource source) { diff --git a/java/org/apache/tomcat/util/file/ConfigurationSource.java b/java/org/apache/tomcat/util/file/ConfigurationSource.java index b2b3aaeb08..08261dae09 100644 --- a/java/org/apache/tomcat/util/file/ConfigurationSource.java +++ b/java/org/apache/tomcat/util/file/ConfigurationSource.java @@ -29,17 +29,16 @@ import java.net.URLConnection; import org.apache.tomcat.util.buf.UriUtil; /** - * Abstracts configuration file storage. Allows Tomcat embedding using the regular - * configuration style. - * This abstraction aims to be very simple and does not cover resource listing, - * which is usually used for dynamic deployments that are usually not used when - * embedding, as well as resource writing. + * Abstracts configuration file storage. Allows Tomcat embedding using the regular configuration style. This abstraction + * aims to be very simple and does not cover resource listing, which is usually used for dynamic deployments that are + * usually not used when embedding, as well as resource writing. */ public interface ConfigurationSource { ConfigurationSource DEFAULT = new ConfigurationSource() { private final File userDir = new File(System.getProperty("user.dir")); private final URI userDirUri = userDir.toURI(); + @Override public Resource getResource(String name) throws IOException { if (!UriUtil.isAbsoluteURI(name)) { @@ -65,6 +64,7 @@ public interface ConfigurationSource { throw new FileNotFoundException(name); } } + @Override public URI getURI(String name) { if (!UriUtil.isAbsoluteURI(name)) { @@ -81,24 +81,26 @@ public interface ConfigurationSource { }; /** - * Represents a resource: a stream to the resource associated with - * its URI. + * Represents a resource: a stream to the resource associated with its URI. */ class Resource implements AutoCloseable { private final InputStream inputStream; private final URI uri; + public Resource(InputStream inputStream, URI uri) { this.inputStream = inputStream; this.uri = uri; } + public InputStream getInputStream() { return inputStream; } + public URI getURI() { return uri; } -public long getLastModified() -throws MalformedURLException, IOException { + +public long getLastModified() throws MalformedURLExce
(tomcat) branch 10.1.x updated: Code clean-up - formatting. No functional change.
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 9897ae6d57 Code clean-up - formatting. No functional change. 9897ae6d57 is described below commit 9897ae6d579e167f0b3bc11c2731206fa7d89971 Author: Mark Thomas AuthorDate: Thu May 22 17:14:38 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/file/ConfigFileLoader.java | 14 ++-- .../tomcat/util/file/ConfigurationSource.java | 53 +-- java/org/apache/tomcat/util/file/Matcher.java | 75 +- 3 files changed, 68 insertions(+), 74 deletions(-) diff --git a/java/org/apache/tomcat/util/file/ConfigFileLoader.java b/java/org/apache/tomcat/util/file/ConfigFileLoader.java index a7f6a79cd9..b48318ac07 100644 --- a/java/org/apache/tomcat/util/file/ConfigFileLoader.java +++ b/java/org/apache/tomcat/util/file/ConfigFileLoader.java @@ -20,17 +20,17 @@ package org.apache.tomcat.util.file; import java.io.InputStream; /** - * This class is used to obtain {@link InputStream}s for configuration files - * from a given location String. This allows greater flexibility than these - * files having to be loaded directly from a file system. + * This class is used to obtain {@link InputStream}s for configuration files from a given location String. This allows + * greater flexibility than these files having to be loaded directly from a file system. */ public class ConfigFileLoader { private static ConfigurationSource source; /** - * Get the configured configuration source. If none has been configured, - * a default source based on the calling directory will be used. + * Get the configured configuration source. If none has been configured, a default source based on the calling + * directory will be used. + * * @return the configuration source in use */ public static ConfigurationSource getSource() { @@ -41,8 +41,8 @@ public class ConfigFileLoader { } /** - * Set the configuration source used by Tomcat to locate various - * configuration resources. + * Set the configuration source used by Tomcat to locate various configuration resources. + * * @param source The source */ public static void setSource(ConfigurationSource source) { diff --git a/java/org/apache/tomcat/util/file/ConfigurationSource.java b/java/org/apache/tomcat/util/file/ConfigurationSource.java index b2b3aaeb08..08261dae09 100644 --- a/java/org/apache/tomcat/util/file/ConfigurationSource.java +++ b/java/org/apache/tomcat/util/file/ConfigurationSource.java @@ -29,17 +29,16 @@ import java.net.URLConnection; import org.apache.tomcat.util.buf.UriUtil; /** - * Abstracts configuration file storage. Allows Tomcat embedding using the regular - * configuration style. - * This abstraction aims to be very simple and does not cover resource listing, - * which is usually used for dynamic deployments that are usually not used when - * embedding, as well as resource writing. + * Abstracts configuration file storage. Allows Tomcat embedding using the regular configuration style. This abstraction + * aims to be very simple and does not cover resource listing, which is usually used for dynamic deployments that are + * usually not used when embedding, as well as resource writing. */ public interface ConfigurationSource { ConfigurationSource DEFAULT = new ConfigurationSource() { private final File userDir = new File(System.getProperty("user.dir")); private final URI userDirUri = userDir.toURI(); + @Override public Resource getResource(String name) throws IOException { if (!UriUtil.isAbsoluteURI(name)) { @@ -65,6 +64,7 @@ public interface ConfigurationSource { throw new FileNotFoundException(name); } } + @Override public URI getURI(String name) { if (!UriUtil.isAbsoluteURI(name)) { @@ -81,24 +81,26 @@ public interface ConfigurationSource { }; /** - * Represents a resource: a stream to the resource associated with - * its URI. + * Represents a resource: a stream to the resource associated with its URI. */ class Resource implements AutoCloseable { private final InputStream inputStream; private final URI uri; + public Resource(InputStream inputStream, URI uri) { this.inputStream = inputStream; this.uri = uri; } + public InputStream getInputStream() { return inputStream; } + public URI getURI() { return uri; } -public long getLastModified() -throws MalformedURLException, IOException { + +public long getLastModified() throws MalformedURLExce
(tomcat) branch main updated: Code clean-up - formatting. No functional change.
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 0da4a48355 Code clean-up - formatting. No functional change. 0da4a48355 is described below commit 0da4a48355b17ca89eeb8e5134362c5a7b823c7a Author: Mark Thomas AuthorDate: Thu May 22 17:15:51 2025 +0100 Code clean-up - formatting. No functional change. --- .../util/http/InvalidParameterException.java | 4 +- java/org/apache/tomcat/util/http/MimeHeaders.java | 38 +-- .../tomcat/util/http/Rfc6265CookieProcessor.java | 8 +- .../apache/tomcat/util/http/WebdavIfHeader.java| 363 + .../org/apache/tomcat/util/http/parser/Cookie.java | 4 +- 5 files changed, 176 insertions(+), 241 deletions(-) diff --git a/java/org/apache/tomcat/util/http/InvalidParameterException.java b/java/org/apache/tomcat/util/http/InvalidParameterException.java index 91229dc6d7..e27048be4a 100644 --- a/java/org/apache/tomcat/util/http/InvalidParameterException.java +++ b/java/org/apache/tomcat/util/http/InvalidParameterException.java @@ -23,7 +23,7 @@ import jakarta.servlet.http.HttpServletResponse; /** * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. * - * Implementation note: This class extends {@link IllegalStateException} since that is the class that the Servlet 6.1 + * Implementation note: This class extends {@link IllegalStateException} since that is the class that the Servlet 6.1 * onwards Javadocs define is thrown by the various {@code ServletRequest.getParameterXXX()} methods. */ public class InvalidParameterException extends IllegalStateException { @@ -81,7 +81,7 @@ public class InvalidParameterException extends IllegalStateException { * Construct a new exception with the given cause and error code. The message for this exception will be generated * by calling {@code cause.toString()}. * - * @param cause The exception to use as the cause of this exception + * @param cause The exception to use as the cause of this exception * @param errorCode The HTTP status code to use when reporting this error. Expected to be >= 400. */ public InvalidParameterException(Throwable cause, int errorCode) { diff --git a/java/org/apache/tomcat/util/http/MimeHeaders.java b/java/org/apache/tomcat/util/http/MimeHeaders.java index d5a72043db..16f65cb86a 100644 --- a/java/org/apache/tomcat/util/http/MimeHeaders.java +++ b/java/org/apache/tomcat/util/http/MimeHeaders.java @@ -39,34 +39,26 @@ import org.apache.tomcat.util.res.StringManager; * calls header methods, but is easy to avoid inside tomcat. The goal is to use _only_ MessageByte-based Fields, and * reduce to 0 the memory overhead of tomcat. * - * This class is used to contain standard internet message headers, - * used for SMTP (RFC822) and HTTP (RFC2068) messages as well as for - * MIME (RFC 2045) applications such as transferring typed data and - * grouping related items in multipart message bodies. + * This class is used to contain standard internet message headers, used for SMTP (RFC822) and HTTP (RFC2068) messages + * as well as for MIME (RFC 2045) applications such as transferring typed data and grouping related items in multipart + * message bodies. * - * Message headers, as specified in RFC822, include a field name - * and a field body. Order has no semantic significance, and several - * fields with the same name may exist. However, most fields do not - * (and should not) exist more than once in a header. + * Message headers, as specified in RFC822, include a field name and a field body. Order has no semantic significance, + * and several fields with the same name may exist. However, most fields do not (and should not) exist more than once in + * a header. * - * Many kinds of field body must conform to a specified syntax, - * including the standard parenthesized comment syntax. This class - * supports only two simple syntaxes, for dates and integers. + * Many kinds of field body must conform to a specified syntax, including the standard parenthesized comment syntax. + * This class supports only two simple syntaxes, for dates and integers. * - * When processing headers, care must be taken to handle the case of - * multiple same-name fields correctly. The values of such fields are - * only available as strings. They may be accessed by index (treating - * the header as an array of fields), or by name (returning an array - * of string values). + * When processing headers, care must be taken to handle the case of multiple same-name fields correctly. The values of + * such fields are only available as strings. They may be accessed by index (treating the header as an array of fields), + * or by name (returning an array of string values). * - * Headers are first parsed and stor
(tomcat) branch 10.1.x updated: Code clean-up - formatting. No functional change.
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 047e51da13 Code clean-up - formatting. No functional change. 047e51da13 is described below commit 047e51da13a47daa57d815ffa38d12a0a594d915 Author: Mark Thomas AuthorDate: Thu May 22 17:16:38 2025 +0100 Code clean-up - formatting. No functional change. --- java/org/apache/tomcat/util/http/MimeHeaders.java | 38 +-- .../apache/tomcat/util/http/WebdavIfHeader.java| 363 + .../org/apache/tomcat/util/http/parser/Cookie.java | 4 +- 3 files changed, 170 insertions(+), 235 deletions(-) diff --git a/java/org/apache/tomcat/util/http/MimeHeaders.java b/java/org/apache/tomcat/util/http/MimeHeaders.java index e5d5f49983..2c644a23c5 100644 --- a/java/org/apache/tomcat/util/http/MimeHeaders.java +++ b/java/org/apache/tomcat/util/http/MimeHeaders.java @@ -39,34 +39,26 @@ import org.apache.tomcat.util.res.StringManager; * calls header methods, but is easy to avoid inside tomcat. The goal is to use _only_ MessageByte-based Fields, and * reduce to 0 the memory overhead of tomcat. * - * This class is used to contain standard internet message headers, - * used for SMTP (RFC822) and HTTP (RFC2068) messages as well as for - * MIME (RFC 2045) applications such as transferring typed data and - * grouping related items in multipart message bodies. + * This class is used to contain standard internet message headers, used for SMTP (RFC822) and HTTP (RFC2068) messages + * as well as for MIME (RFC 2045) applications such as transferring typed data and grouping related items in multipart + * message bodies. * - * Message headers, as specified in RFC822, include a field name - * and a field body. Order has no semantic significance, and several - * fields with the same name may exist. However, most fields do not - * (and should not) exist more than once in a header. + * Message headers, as specified in RFC822, include a field name and a field body. Order has no semantic significance, + * and several fields with the same name may exist. However, most fields do not (and should not) exist more than once in + * a header. * - * Many kinds of field body must conform to a specified syntax, - * including the standard parenthesized comment syntax. This class - * supports only two simple syntaxes, for dates and integers. + * Many kinds of field body must conform to a specified syntax, including the standard parenthesized comment syntax. + * This class supports only two simple syntaxes, for dates and integers. * - * When processing headers, care must be taken to handle the case of - * multiple same-name fields correctly. The values of such fields are - * only available as strings. They may be accessed by index (treating - * the header as an array of fields), or by name (returning an array - * of string values). + * When processing headers, care must be taken to handle the case of multiple same-name fields correctly. The values of + * such fields are only available as strings. They may be accessed by index (treating the header as an array of fields), + * or by name (returning an array of string values). * - * Headers are first parsed and stored in the order they are - * received. This is based on the fact that most servlets will not - * directly access all headers, and most headers are single-valued. - * (the alternative - a hash or similar data structure - will add - * an overhead that is not needed in most cases) + * Headers are first parsed and stored in the order they are received. This is based on the fact that most servlets will + * not directly access all headers, and most headers are single-valued. (the alternative - a hash or similar data + * structure - will add an overhead that is not needed in most cases) * - * Apache seems to be using a similar method for storing and manipulating - * headers. + * Apache seems to be using a similar method for storing and manipulating headers. * * @author d...@eng.sun.com * @author James Todd [go...@eng.sun.com] diff --git a/java/org/apache/tomcat/util/http/WebdavIfHeader.java b/java/org/apache/tomcat/util/http/WebdavIfHeader.java index bc1a920b29..4316b4b6ea 100644 --- a/java/org/apache/tomcat/util/http/WebdavIfHeader.java +++ b/java/org/apache/tomcat/util/http/WebdavIfHeader.java @@ -30,9 +30,9 @@ import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.res.StringManager; /** - * The IfHeader class represents the state lists defined - * through the HTTP If header, which is specified in RFC 2518 as - * follows : + * The IfHeader class represents the state lists defined through the HTTP If header, which is + * specified in RFC 2518 as follows : + * * *If = "If" ":" ( 1*No-tag-list | 1*Tagged-list) *No-tag-list = List @@ -43,10 +43,10 @@ import
(tomcat) branch 9.0.x updated: Code clean-up - formatting. No functional change.
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 385b0dcc0f Code clean-up - formatting. No functional change. 385b0dcc0f is described below commit 385b0dcc0ff64fd23828513972bea23f55c736f9 Author: Mark Thomas AuthorDate: Thu May 22 17:16:56 2025 +0100 Code clean-up - formatting. No functional change. --- java/org/apache/tomcat/util/http/MimeHeaders.java | 38 +-- .../apache/tomcat/util/http/WebdavIfHeader.java| 363 + .../org/apache/tomcat/util/http/parser/Cookie.java | 4 +- 3 files changed, 170 insertions(+), 235 deletions(-) diff --git a/java/org/apache/tomcat/util/http/MimeHeaders.java b/java/org/apache/tomcat/util/http/MimeHeaders.java index e5d5f49983..2c644a23c5 100644 --- a/java/org/apache/tomcat/util/http/MimeHeaders.java +++ b/java/org/apache/tomcat/util/http/MimeHeaders.java @@ -39,34 +39,26 @@ import org.apache.tomcat.util.res.StringManager; * calls header methods, but is easy to avoid inside tomcat. The goal is to use _only_ MessageByte-based Fields, and * reduce to 0 the memory overhead of tomcat. * - * This class is used to contain standard internet message headers, - * used for SMTP (RFC822) and HTTP (RFC2068) messages as well as for - * MIME (RFC 2045) applications such as transferring typed data and - * grouping related items in multipart message bodies. + * This class is used to contain standard internet message headers, used for SMTP (RFC822) and HTTP (RFC2068) messages + * as well as for MIME (RFC 2045) applications such as transferring typed data and grouping related items in multipart + * message bodies. * - * Message headers, as specified in RFC822, include a field name - * and a field body. Order has no semantic significance, and several - * fields with the same name may exist. However, most fields do not - * (and should not) exist more than once in a header. + * Message headers, as specified in RFC822, include a field name and a field body. Order has no semantic significance, + * and several fields with the same name may exist. However, most fields do not (and should not) exist more than once in + * a header. * - * Many kinds of field body must conform to a specified syntax, - * including the standard parenthesized comment syntax. This class - * supports only two simple syntaxes, for dates and integers. + * Many kinds of field body must conform to a specified syntax, including the standard parenthesized comment syntax. + * This class supports only two simple syntaxes, for dates and integers. * - * When processing headers, care must be taken to handle the case of - * multiple same-name fields correctly. The values of such fields are - * only available as strings. They may be accessed by index (treating - * the header as an array of fields), or by name (returning an array - * of string values). + * When processing headers, care must be taken to handle the case of multiple same-name fields correctly. The values of + * such fields are only available as strings. They may be accessed by index (treating the header as an array of fields), + * or by name (returning an array of string values). * - * Headers are first parsed and stored in the order they are - * received. This is based on the fact that most servlets will not - * directly access all headers, and most headers are single-valued. - * (the alternative - a hash or similar data structure - will add - * an overhead that is not needed in most cases) + * Headers are first parsed and stored in the order they are received. This is based on the fact that most servlets will + * not directly access all headers, and most headers are single-valued. (the alternative - a hash or similar data + * structure - will add an overhead that is not needed in most cases) * - * Apache seems to be using a similar method for storing and manipulating - * headers. + * Apache seems to be using a similar method for storing and manipulating headers. * * @author d...@eng.sun.com * @author James Todd [go...@eng.sun.com] diff --git a/java/org/apache/tomcat/util/http/WebdavIfHeader.java b/java/org/apache/tomcat/util/http/WebdavIfHeader.java index bc1a920b29..4316b4b6ea 100644 --- a/java/org/apache/tomcat/util/http/WebdavIfHeader.java +++ b/java/org/apache/tomcat/util/http/WebdavIfHeader.java @@ -30,9 +30,9 @@ import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.res.StringManager; /** - * The IfHeader class represents the state lists defined - * through the HTTP If header, which is specified in RFC 2518 as - * follows : + * The IfHeader class represents the state lists defined through the HTTP If header, which is + * specified in RFC 2518 as follows : + * * *If = "If" ":" ( 1*No-tag-list | 1*Tagged-list) *No-tag-list = List @@ -43,10 +43,10 @@ import o
(tomcat) branch 11.0.x updated: Code clean-up - formatting. No functional change.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new ba7c46d7f1 Code clean-up - formatting. No functional change. ba7c46d7f1 is described below commit ba7c46d7f14cbf0f74fdf53d04267bebedf7ec6c Author: Mark Thomas AuthorDate: Thu May 22 17:20:44 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/log/SystemLogHandler.java | 12 +++ .../org/apache/tomcat/util/log/UserDataHelper.java | 38 +- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/java/org/apache/tomcat/util/log/SystemLogHandler.java b/java/org/apache/tomcat/util/log/SystemLogHandler.java index dd5fceab15..a6b7c85c9a 100644 --- a/java/org/apache/tomcat/util/log/SystemLogHandler.java +++ b/java/org/apache/tomcat/util/log/SystemLogHandler.java @@ -25,10 +25,8 @@ import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; /** - * This helper class may be used to do sophisticated redirection of - * System.out and System.err on a per Thread basis. - * A stack is implemented per Thread so that nested startCapture - * and stopCapture can be used. + * This helper class may be used to do sophisticated redirection of System.out and System.err on a per Thread basis. A + * stack is implemented per Thread so that nested startCapture and stopCapture can be used. * * @author Remy Maucherat * @author Glenn L. Nielsen @@ -123,6 +121,7 @@ public class SystemLogHandler extends PrintStream { /** * Find PrintStream to which the output must be written to. + * * @return the print stream */ protected PrintStream findStream() { @@ -160,7 +159,7 @@ public class SystemLogHandler extends PrintStream { @Override protected void setError() { -//findStream().setError(); +// findStream().setError(); } @Override @@ -169,8 +168,7 @@ public class SystemLogHandler extends PrintStream { } @Override -public void write(byte[] b) -throws IOException { +public void write(byte[] b) throws IOException { findStream().write(b); } diff --git a/java/org/apache/tomcat/util/log/UserDataHelper.java b/java/org/apache/tomcat/util/log/UserDataHelper.java index 23a57cf3b4..5c2de49ad1 100644 --- a/java/org/apache/tomcat/util/log/UserDataHelper.java +++ b/java/org/apache/tomcat/util/log/UserDataHelper.java @@ -19,22 +19,20 @@ package org.apache.tomcat.util.log; import org.apache.juli.logging.Log; /** - * This helper class assists with the logging associated with invalid input - * data. A developer may want all instances of invalid input data logged to - * assist with debugging whereas in production it is likely to be desirable not - * to log anything for invalid data. The following settings may be used: + * This helper class assists with the logging associated with invalid input data. A developer may want all instances of + * invalid input data logged to assist with debugging whereas in production it is likely to be desirable not to log + * anything for invalid data. The following settings may be used: * * NOTHING: Log nothing. * DEBUG_ALL: Log all problems at DEBUG log level. - * INFO_THEN_DEBUG: Log first problem at INFO log level and any further - * issues in the following TBD (configurable) seconds at DEBUG level + * INFO_THEN_DEBUG: Log first problem at INFO log level and any further issues in the following TBD (configurable) + * seconds at DEBUG level * INFO_ALL: Log all problems at INFO log level. * * By default, INFO_THEN_DEBUG is used with a suppression time of 24 hours. * - * NOTE: This class is not completely thread-safe. When using INFO_THEN_DEBUG it - * is possible that several INFO messages will be logged before dropping to - * DEBUG. + * NOTE: This class is not completely thread-safe. When using INFO_THEN_DEBUG it is possible that several INFO messages + * will be logged before dropping to DEBUG. */ public class UserDataHelper { @@ -54,8 +52,7 @@ public class UserDataHelper { this.log = log; Config tempConfig; -String configString = System.getProperty( -"org.apache.juli.logging.UserDataHelper.CONFIG"); +String configString = System.getProperty("org.apache.juli.logging.UserDataHelper.CONFIG"); if (configString == null) { tempConfig = Config.INFO_THEN_DEBUG; } else { @@ -68,9 +65,9 @@ public class UserDataHelper { } // Default suppression time of 1 day. -suppressionTime = Integer.getInteger( -"org.apache.juli.logging.UserDataHelper.SUPPRESSION_TIME", -60 * 60 * 24).intValue() * 1000L; +suppressionTime = + Integer.getInteger("org.apache.juli.logging.UserDataHelper.SUPPRESSI
(tomcat) branch main updated: Code clean-up - formatting. No functional change.
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 a7c944089f Code clean-up - formatting. No functional change. a7c944089f is described below commit a7c944089fc9470a7b1c33e0dbf79bf8d4abb641 Author: Mark Thomas AuthorDate: Thu May 22 17:20:31 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/log/SystemLogHandler.java | 12 +++ .../org/apache/tomcat/util/log/UserDataHelper.java | 38 +- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/java/org/apache/tomcat/util/log/SystemLogHandler.java b/java/org/apache/tomcat/util/log/SystemLogHandler.java index dd5fceab15..a6b7c85c9a 100644 --- a/java/org/apache/tomcat/util/log/SystemLogHandler.java +++ b/java/org/apache/tomcat/util/log/SystemLogHandler.java @@ -25,10 +25,8 @@ import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; /** - * This helper class may be used to do sophisticated redirection of - * System.out and System.err on a per Thread basis. - * A stack is implemented per Thread so that nested startCapture - * and stopCapture can be used. + * This helper class may be used to do sophisticated redirection of System.out and System.err on a per Thread basis. A + * stack is implemented per Thread so that nested startCapture and stopCapture can be used. * * @author Remy Maucherat * @author Glenn L. Nielsen @@ -123,6 +121,7 @@ public class SystemLogHandler extends PrintStream { /** * Find PrintStream to which the output must be written to. + * * @return the print stream */ protected PrintStream findStream() { @@ -160,7 +159,7 @@ public class SystemLogHandler extends PrintStream { @Override protected void setError() { -//findStream().setError(); +// findStream().setError(); } @Override @@ -169,8 +168,7 @@ public class SystemLogHandler extends PrintStream { } @Override -public void write(byte[] b) -throws IOException { +public void write(byte[] b) throws IOException { findStream().write(b); } diff --git a/java/org/apache/tomcat/util/log/UserDataHelper.java b/java/org/apache/tomcat/util/log/UserDataHelper.java index 23a57cf3b4..5c2de49ad1 100644 --- a/java/org/apache/tomcat/util/log/UserDataHelper.java +++ b/java/org/apache/tomcat/util/log/UserDataHelper.java @@ -19,22 +19,20 @@ package org.apache.tomcat.util.log; import org.apache.juli.logging.Log; /** - * This helper class assists with the logging associated with invalid input - * data. A developer may want all instances of invalid input data logged to - * assist with debugging whereas in production it is likely to be desirable not - * to log anything for invalid data. The following settings may be used: + * This helper class assists with the logging associated with invalid input data. A developer may want all instances of + * invalid input data logged to assist with debugging whereas in production it is likely to be desirable not to log + * anything for invalid data. The following settings may be used: * * NOTHING: Log nothing. * DEBUG_ALL: Log all problems at DEBUG log level. - * INFO_THEN_DEBUG: Log first problem at INFO log level and any further - * issues in the following TBD (configurable) seconds at DEBUG level + * INFO_THEN_DEBUG: Log first problem at INFO log level and any further issues in the following TBD (configurable) + * seconds at DEBUG level * INFO_ALL: Log all problems at INFO log level. * * By default, INFO_THEN_DEBUG is used with a suppression time of 24 hours. * - * NOTE: This class is not completely thread-safe. When using INFO_THEN_DEBUG it - * is possible that several INFO messages will be logged before dropping to - * DEBUG. + * NOTE: This class is not completely thread-safe. When using INFO_THEN_DEBUG it is possible that several INFO messages + * will be logged before dropping to DEBUG. */ public class UserDataHelper { @@ -54,8 +52,7 @@ public class UserDataHelper { this.log = log; Config tempConfig; -String configString = System.getProperty( -"org.apache.juli.logging.UserDataHelper.CONFIG"); +String configString = System.getProperty("org.apache.juli.logging.UserDataHelper.CONFIG"); if (configString == null) { tempConfig = Config.INFO_THEN_DEBUG; } else { @@ -68,9 +65,9 @@ public class UserDataHelper { } // Default suppression time of 1 day. -suppressionTime = Integer.getInteger( -"org.apache.juli.logging.UserDataHelper.SUPPRESSION_TIME", -60 * 60 * 24).intValue() * 1000L; +suppressionTime = + Integer.getInteger("org.apache.juli.logging.UserDataHelper.SUPPRESSION_T
(tomcat) branch 9.0.x updated: Code clean-up - formatting. No functional change.
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 4631a36b3e Code clean-up - formatting. No functional change. 4631a36b3e is described below commit 4631a36b3eb58b54e63349384654f816b2347b36 Author: Mark Thomas AuthorDate: Thu May 22 17:21:12 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/log/SystemLogHandler.java | 12 +++ .../org/apache/tomcat/util/log/UserDataHelper.java | 38 +- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/java/org/apache/tomcat/util/log/SystemLogHandler.java b/java/org/apache/tomcat/util/log/SystemLogHandler.java index dd5fceab15..a6b7c85c9a 100644 --- a/java/org/apache/tomcat/util/log/SystemLogHandler.java +++ b/java/org/apache/tomcat/util/log/SystemLogHandler.java @@ -25,10 +25,8 @@ import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; /** - * This helper class may be used to do sophisticated redirection of - * System.out and System.err on a per Thread basis. - * A stack is implemented per Thread so that nested startCapture - * and stopCapture can be used. + * This helper class may be used to do sophisticated redirection of System.out and System.err on a per Thread basis. A + * stack is implemented per Thread so that nested startCapture and stopCapture can be used. * * @author Remy Maucherat * @author Glenn L. Nielsen @@ -123,6 +121,7 @@ public class SystemLogHandler extends PrintStream { /** * Find PrintStream to which the output must be written to. + * * @return the print stream */ protected PrintStream findStream() { @@ -160,7 +159,7 @@ public class SystemLogHandler extends PrintStream { @Override protected void setError() { -//findStream().setError(); +// findStream().setError(); } @Override @@ -169,8 +168,7 @@ public class SystemLogHandler extends PrintStream { } @Override -public void write(byte[] b) -throws IOException { +public void write(byte[] b) throws IOException { findStream().write(b); } diff --git a/java/org/apache/tomcat/util/log/UserDataHelper.java b/java/org/apache/tomcat/util/log/UserDataHelper.java index 23a57cf3b4..5c2de49ad1 100644 --- a/java/org/apache/tomcat/util/log/UserDataHelper.java +++ b/java/org/apache/tomcat/util/log/UserDataHelper.java @@ -19,22 +19,20 @@ package org.apache.tomcat.util.log; import org.apache.juli.logging.Log; /** - * This helper class assists with the logging associated with invalid input - * data. A developer may want all instances of invalid input data logged to - * assist with debugging whereas in production it is likely to be desirable not - * to log anything for invalid data. The following settings may be used: + * This helper class assists with the logging associated with invalid input data. A developer may want all instances of + * invalid input data logged to assist with debugging whereas in production it is likely to be desirable not to log + * anything for invalid data. The following settings may be used: * * NOTHING: Log nothing. * DEBUG_ALL: Log all problems at DEBUG log level. - * INFO_THEN_DEBUG: Log first problem at INFO log level and any further - * issues in the following TBD (configurable) seconds at DEBUG level + * INFO_THEN_DEBUG: Log first problem at INFO log level and any further issues in the following TBD (configurable) + * seconds at DEBUG level * INFO_ALL: Log all problems at INFO log level. * * By default, INFO_THEN_DEBUG is used with a suppression time of 24 hours. * - * NOTE: This class is not completely thread-safe. When using INFO_THEN_DEBUG it - * is possible that several INFO messages will be logged before dropping to - * DEBUG. + * NOTE: This class is not completely thread-safe. When using INFO_THEN_DEBUG it is possible that several INFO messages + * will be logged before dropping to DEBUG. */ public class UserDataHelper { @@ -54,8 +52,7 @@ public class UserDataHelper { this.log = log; Config tempConfig; -String configString = System.getProperty( -"org.apache.juli.logging.UserDataHelper.CONFIG"); +String configString = System.getProperty("org.apache.juli.logging.UserDataHelper.CONFIG"); if (configString == null) { tempConfig = Config.INFO_THEN_DEBUG; } else { @@ -68,9 +65,9 @@ public class UserDataHelper { } // Default suppression time of 1 day. -suppressionTime = Integer.getInteger( -"org.apache.juli.logging.UserDataHelper.SUPPRESSION_TIME", -60 * 60 * 24).intValue() * 1000L; +suppressionTime = + Integer.getInteger("org.apache.juli.logging.UserDataHelper.SUPPRESSION
(tomcat) branch 10.1.x updated: Code clean-up - formatting. No functional change.
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 5152ae28cb Code clean-up - formatting. No functional change. 5152ae28cb is described below commit 5152ae28cb68b3ea9382072acdfe9876c592c009 Author: Mark Thomas AuthorDate: Thu May 22 17:20:57 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/log/SystemLogHandler.java | 12 +++ .../org/apache/tomcat/util/log/UserDataHelper.java | 38 +- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/java/org/apache/tomcat/util/log/SystemLogHandler.java b/java/org/apache/tomcat/util/log/SystemLogHandler.java index dd5fceab15..a6b7c85c9a 100644 --- a/java/org/apache/tomcat/util/log/SystemLogHandler.java +++ b/java/org/apache/tomcat/util/log/SystemLogHandler.java @@ -25,10 +25,8 @@ import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; /** - * This helper class may be used to do sophisticated redirection of - * System.out and System.err on a per Thread basis. - * A stack is implemented per Thread so that nested startCapture - * and stopCapture can be used. + * This helper class may be used to do sophisticated redirection of System.out and System.err on a per Thread basis. A + * stack is implemented per Thread so that nested startCapture and stopCapture can be used. * * @author Remy Maucherat * @author Glenn L. Nielsen @@ -123,6 +121,7 @@ public class SystemLogHandler extends PrintStream { /** * Find PrintStream to which the output must be written to. + * * @return the print stream */ protected PrintStream findStream() { @@ -160,7 +159,7 @@ public class SystemLogHandler extends PrintStream { @Override protected void setError() { -//findStream().setError(); +// findStream().setError(); } @Override @@ -169,8 +168,7 @@ public class SystemLogHandler extends PrintStream { } @Override -public void write(byte[] b) -throws IOException { +public void write(byte[] b) throws IOException { findStream().write(b); } diff --git a/java/org/apache/tomcat/util/log/UserDataHelper.java b/java/org/apache/tomcat/util/log/UserDataHelper.java index 23a57cf3b4..5c2de49ad1 100644 --- a/java/org/apache/tomcat/util/log/UserDataHelper.java +++ b/java/org/apache/tomcat/util/log/UserDataHelper.java @@ -19,22 +19,20 @@ package org.apache.tomcat.util.log; import org.apache.juli.logging.Log; /** - * This helper class assists with the logging associated with invalid input - * data. A developer may want all instances of invalid input data logged to - * assist with debugging whereas in production it is likely to be desirable not - * to log anything for invalid data. The following settings may be used: + * This helper class assists with the logging associated with invalid input data. A developer may want all instances of + * invalid input data logged to assist with debugging whereas in production it is likely to be desirable not to log + * anything for invalid data. The following settings may be used: * * NOTHING: Log nothing. * DEBUG_ALL: Log all problems at DEBUG log level. - * INFO_THEN_DEBUG: Log first problem at INFO log level and any further - * issues in the following TBD (configurable) seconds at DEBUG level + * INFO_THEN_DEBUG: Log first problem at INFO log level and any further issues in the following TBD (configurable) + * seconds at DEBUG level * INFO_ALL: Log all problems at INFO log level. * * By default, INFO_THEN_DEBUG is used with a suppression time of 24 hours. * - * NOTE: This class is not completely thread-safe. When using INFO_THEN_DEBUG it - * is possible that several INFO messages will be logged before dropping to - * DEBUG. + * NOTE: This class is not completely thread-safe. When using INFO_THEN_DEBUG it is possible that several INFO messages + * will be logged before dropping to DEBUG. */ public class UserDataHelper { @@ -54,8 +52,7 @@ public class UserDataHelper { this.log = log; Config tempConfig; -String configString = System.getProperty( -"org.apache.juli.logging.UserDataHelper.CONFIG"); +String configString = System.getProperty("org.apache.juli.logging.UserDataHelper.CONFIG"); if (configString == null) { tempConfig = Config.INFO_THEN_DEBUG; } else { @@ -68,9 +65,9 @@ public class UserDataHelper { } // Default suppression time of 1 day. -suppressionTime = Integer.getInteger( -"org.apache.juli.logging.UserDataHelper.SUPPRESSION_TIME", -60 * 60 * 24).intValue() * 1000L; +suppressionTime = + Integer.getInteger("org.apache.juli.logging.UserDataHelper.SUPPRESSI
(tomcat) branch main updated: Code clean-up - formatting. No functional change.
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 a613a0c998 Code clean-up - formatting. No functional change. a613a0c998 is described below commit a613a0c99813d9f0dc3a879dffa4ee23677b16a5 Author: Mark Thomas AuthorDate: Thu May 22 17:24:56 2025 +0100 Code clean-up - formatting. No functional change. --- .../apache/tomcat/util/modeler/AttributeInfo.java | 33 +- .../tomcat/util/modeler/BaseAttributeFilter.java | 42 +- .../apache/tomcat/util/modeler/BaseModelMBean.java | 457 + .../util/modeler/BaseNotificationBroadcaster.java | 51 +-- .../apache/tomcat/util/modeler/FeatureInfo.java| 10 +- .../apache/tomcat/util/modeler/ManagedBean.java| 111 +++-- .../tomcat/util/modeler/NoDescriptorRegistry.java | 84 ++-- .../tomcat/util/modeler/NotificationInfo.java | 23 +- .../apache/tomcat/util/modeler/OperationInfo.java | 33 +- .../apache/tomcat/util/modeler/ParameterInfo.java | 15 +- java/org/apache/tomcat/util/modeler/Registry.java | 168 .../apache/tomcat/util/modeler/RegistryMBean.java | 79 ++-- .../modules/MbeansDescriptorsDigesterSource.java | 137 +++--- .../MbeansDescriptorsIntrospectionSource.java | 122 ++ .../tomcat/util/modeler/modules/ModelerSource.java | 9 +- 15 files changed, 589 insertions(+), 785 deletions(-) diff --git a/java/org/apache/tomcat/util/modeler/AttributeInfo.java b/java/org/apache/tomcat/util/modeler/AttributeInfo.java index 0ecf077ff2..15f83e59c3 100644 --- a/java/org/apache/tomcat/util/modeler/AttributeInfo.java +++ b/java/org/apache/tomcat/util/modeler/AttributeInfo.java @@ -21,8 +21,9 @@ import java.io.Serial; import javax.management.MBeanAttributeInfo; /** - * Internal configuration information for an Attribute - * descriptor. + * + * Internal configuration information for an Attribute descriptor. + * * * @author Craig R. McClanahan */ @@ -57,7 +58,7 @@ public class AttributeInfo extends FeatureInfo { * @return the name of the property getter method, if non-standard. */ public String getGetMethod() { -if(getMethod == null) { +if (getMethod == null) { getMethod = getMethodName(getName(), true, isIs()); } return this.getMethod; @@ -69,8 +70,8 @@ public class AttributeInfo extends FeatureInfo { /** * Is this a boolean attribute with an "is" getter? - * @return true if this is a boolean attribute - * with an "is" getter + * + * @return true if this is a boolean attribute with an "is" getter */ public boolean isIs() { return this.is; @@ -83,6 +84,7 @@ public class AttributeInfo extends FeatureInfo { /** * Is this attribute readable by management applications? + * * @return true if readable */ public boolean isReadable() { @@ -98,7 +100,7 @@ public class AttributeInfo extends FeatureInfo { * @return the name of the property setter method, if non-standard. */ public String getSetMethod() { -if( setMethod == null ) { +if (setMethod == null) { setMethod = getMethodName(getName(), false, false); } return this.setMethod; @@ -110,6 +112,7 @@ public class AttributeInfo extends FeatureInfo { /** * Is this attribute writable by management applications? + * * @return true if writable */ public boolean isWriteable() { @@ -124,29 +127,29 @@ public class AttributeInfo extends FeatureInfo { /** - * Create and return a ModelMBeanAttributeInfo object that - * corresponds to the attribute described by this instance. + * Create and return a ModelMBeanAttributeInfo object that corresponds to the attribute described by + * this instance. + * * @return the attribute info */ MBeanAttributeInfo createAttributeInfo() { // Return our cached information (if any) if (info == null) { -info = new MBeanAttributeInfo(getName(), getType(), getDescription(), -isReadable(), isWriteable(), false); +info = new MBeanAttributeInfo(getName(), getType(), getDescription(), isReadable(), isWriteable(), false); } -return (MBeanAttributeInfo)info; +return (MBeanAttributeInfo) info; } // Private Methods /** - * Create and return the name of a default property getter or setter - * method, according to the specified values. + * Create and return the name of a default property getter or setter method, according to the specified values. * - * @param name Name of the property itself + * @param name Name of the property itself * @param getter Do we wa
Buildbot success in on tomcat-11.0.x
Build status: Build succeeded! Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/112/builds/1681 Blamelist: Mark Thomas , remm Build Text: build successful Status Detected: restored build Build Source Stamp: [branch 11.0.x] 326d1e8d316c1725d101a88ac3dc6b1f74a9d588 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 shell_7: 0 compile: 1 shell_8: 0 shell_9: 0 shell_10: 0 shell_11: 0 Rsync docs to nightlies.apache.org: 0 shell_12: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_13: 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 11.0.x updated: Code clean-up - formatting. No functional change.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 913fcee5d4 Code clean-up - formatting. No functional change. 913fcee5d4 is described below commit 913fcee5d41d78aa394a10ddf52e85c0542fb9d7 Author: Mark Thomas AuthorDate: Thu May 22 14:06:04 2025 +0100 Code clean-up - formatting. No functional change. --- .../util/collections/CaseInsensitiveKeyMap.java| 27 --- .../tomcat/util/collections/ConcurrentCache.java | 2 +- .../util/collections/ConcurrentLruCache.java | 4 +-- .../collections/ManagedConcurrentWeakHashMap.java | 30 +- .../tomcat/util/collections/SynchronizedQueue.java | 8 +++--- .../tomcat/util/collections/SynchronizedStack.java | 8 +++--- 6 files changed, 32 insertions(+), 47 deletions(-) diff --git a/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java b/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java index 2ee7cfbc38..d2566a5c43 100644 --- a/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java +++ b/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java @@ -27,11 +27,9 @@ import java.util.Set; import org.apache.tomcat.util.res.StringManager; /** - * A Map implementation that uses case-insensitive (using {@link - * Locale#ENGLISH}) strings as keys. + * A Map implementation that uses case-insensitive (using {@link Locale#ENGLISH}) strings as keys. * - * Keys must be instances of {@link String}. Note that this means that - * null keys are not permitted. + * Keys must be instances of {@link String}. Note that this means that null keys are not permitted. * * This implementation is not thread-safe. * @@ -39,8 +37,7 @@ import org.apache.tomcat.util.res.StringManager; */ public class CaseInsensitiveKeyMap extends AbstractMap { -private static final StringManager sm = -StringManager.getManager(CaseInsensitiveKeyMap.class); +private static final StringManager sm = StringManager.getManager(CaseInsensitiveKeyMap.class); private final Map map = new HashMap<>(); @@ -64,12 +61,11 @@ public class CaseInsensitiveKeyMap extends AbstractMap { /** * {@inheritDoc} * - * Use this method with caution. If the input Map contains duplicate - * keys when the keys are compared in a case-insensitive manner then some - * values will be lost when inserting via this method. + * Use this method with caution. If the input Map contains duplicate keys when the keys are compared in a + * case-insensitive manner then some values will be lost when inserting via this method. */ @Override -public void putAll(Map m) { +public void putAll(Map m) { super.putAll(m); } @@ -87,7 +83,7 @@ public class CaseInsensitiveKeyMap extends AbstractMap { @Override -public Set> entrySet() { +public Set> entrySet() { return new EntrySet<>(map.entrySet()); } @@ -112,8 +108,7 @@ public class CaseInsensitiveKeyMap extends AbstractMap { } -private record EntryIterator( -Iterator> iterator) implements Iterator> { +private record EntryIterator(Iterator> iterator) implements Iterator> { @Override public boolean hasNext() { @@ -121,8 +116,8 @@ public class CaseInsensitiveKeyMap extends AbstractMap { } @Override -public Entry next() { -Entry entry = iterator.next(); +public Entry next() { +Entry entry = iterator.next(); return new EntryImpl<>(entry.getKey().getKey(), entry.getValue()); } @@ -133,7 +128,7 @@ public class CaseInsensitiveKeyMap extends AbstractMap { } -private record EntryImpl(String key, V value) implements Entry { +private record EntryImpl(String key, V value) implements Entry { @Override public String getKey() { diff --git a/java/org/apache/tomcat/util/collections/ConcurrentCache.java b/java/org/apache/tomcat/util/collections/ConcurrentCache.java index 7eff23e567..6355d7d830 100644 --- a/java/org/apache/tomcat/util/collections/ConcurrentCache.java +++ b/java/org/apache/tomcat/util/collections/ConcurrentCache.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.WeakHashMap; import java.util.concurrent.ConcurrentHashMap; -public final class ConcurrentCache { +public final class ConcurrentCache { private final int size; diff --git a/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java b/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java index 031ec8c094..7e5102b1c7 100644 --- a/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java +++ b/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java @@ -77,7 +77,7 @@ public class ConcurrentLru
(tomcat) branch 9.0.x updated: Code clean-up - formatting. No functional change.
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 df5b0497f1 Code clean-up - formatting. No functional change. df5b0497f1 is described below commit df5b0497f1a9d8dc7bded89d2d09666fc43ac1ed Author: Mark Thomas AuthorDate: Thu May 22 14:07:49 2025 +0100 Code clean-up - formatting. No functional change. --- .../util/collections/CaseInsensitiveKeyMap.java| 22 ++--- .../tomcat/util/collections/ConcurrentCache.java | 2 +- .../util/collections/ConcurrentLruCache.java | 4 +-- .../collections/ManagedConcurrentWeakHashMap.java | 36 +- .../tomcat/util/collections/SynchronizedQueue.java | 8 ++--- .../tomcat/util/collections/SynchronizedStack.java | 8 ++--- 6 files changed, 33 insertions(+), 47 deletions(-) diff --git a/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java b/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java index c97a104826..cd2d12e5f3 100644 --- a/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java +++ b/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java @@ -27,11 +27,9 @@ import java.util.Set; import org.apache.tomcat.util.res.StringManager; /** - * A Map implementation that uses case-insensitive (using {@link - * Locale#ENGLISH}) strings as keys. + * A Map implementation that uses case-insensitive (using {@link Locale#ENGLISH}) strings as keys. * - * Keys must be instances of {@link String}. Note that this means that - * null keys are not permitted. + * Keys must be instances of {@link String}. Note that this means that null keys are not permitted. * * This implementation is not thread-safe. * @@ -39,8 +37,7 @@ import org.apache.tomcat.util.res.StringManager; */ public class CaseInsensitiveKeyMap extends AbstractMap { -private static final StringManager sm = -StringManager.getManager(CaseInsensitiveKeyMap.class); +private static final StringManager sm = StringManager.getManager(CaseInsensitiveKeyMap.class); private final Map map = new HashMap<>(); @@ -64,12 +61,11 @@ public class CaseInsensitiveKeyMap extends AbstractMap { /** * {@inheritDoc} * - * Use this method with caution. If the input Map contains duplicate - * keys when the keys are compared in a case-insensitive manner then some - * values will be lost when inserting via this method. + * Use this method with caution. If the input Map contains duplicate keys when the keys are compared in a + * case-insensitive manner then some values will be lost when inserting via this method. */ @Override -public void putAll(Map m) { +public void putAll(Map m) { super.putAll(m); } @@ -87,7 +83,7 @@ public class CaseInsensitiveKeyMap extends AbstractMap { @Override -public Set> entrySet() { +public Set> entrySet() { return new EntrySet<>(map.entrySet()); } @@ -126,8 +122,8 @@ public class CaseInsensitiveKeyMap extends AbstractMap { } @Override -public Entry next() { -Entry entry = iterator.next(); +public Entry next() { +Entry entry = iterator.next(); return new EntryImpl<>(entry.getKey().getKey(), entry.getValue()); } diff --git a/java/org/apache/tomcat/util/collections/ConcurrentCache.java b/java/org/apache/tomcat/util/collections/ConcurrentCache.java index 7eff23e567..6355d7d830 100644 --- a/java/org/apache/tomcat/util/collections/ConcurrentCache.java +++ b/java/org/apache/tomcat/util/collections/ConcurrentCache.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.WeakHashMap; import java.util.concurrent.ConcurrentHashMap; -public final class ConcurrentCache { +public final class ConcurrentCache { private final int size; diff --git a/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java b/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java index d796d92162..99f33fe0b5 100644 --- a/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java +++ b/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java @@ -76,7 +76,7 @@ public class ConcurrentLruCache { if (oldMap != null) { map.putAll(oldMap); } - } else { +} else { map = null; } } @@ -94,7 +94,7 @@ public class ConcurrentLruCache { } -private static class LimitedLinkedHashMap extends LinkedHashMap { +private static class LimitedLinkedHashMap extends LinkedHashMap { private static final long serialVersionUID = 1L; private final int limit; diff --git a/java/org/apache/tomcat/util/collections/ManagedConcurrentWeakHashMap.java b/java/org/apache
(tomcat) branch 10.1.x updated: Code clean-up - formatting. No functional change.
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 85d8656a14 Code clean-up - formatting. No functional change. 85d8656a14 is described below commit 85d8656a147848ef137c9cf3b38d16dea2baa47c Author: Mark Thomas AuthorDate: Thu May 22 14:07:29 2025 +0100 Code clean-up - formatting. No functional change. --- .../util/collections/CaseInsensitiveKeyMap.java| 22 +++- .../tomcat/util/collections/ConcurrentCache.java | 2 +- .../util/collections/ConcurrentLruCache.java | 4 +-- .../collections/ManagedConcurrentWeakHashMap.java | 30 +- .../tomcat/util/collections/SynchronizedQueue.java | 8 +++--- .../tomcat/util/collections/SynchronizedStack.java | 8 +++--- 6 files changed, 30 insertions(+), 44 deletions(-) diff --git a/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java b/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java index c97a104826..cd2d12e5f3 100644 --- a/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java +++ b/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java @@ -27,11 +27,9 @@ import java.util.Set; import org.apache.tomcat.util.res.StringManager; /** - * A Map implementation that uses case-insensitive (using {@link - * Locale#ENGLISH}) strings as keys. + * A Map implementation that uses case-insensitive (using {@link Locale#ENGLISH}) strings as keys. * - * Keys must be instances of {@link String}. Note that this means that - * null keys are not permitted. + * Keys must be instances of {@link String}. Note that this means that null keys are not permitted. * * This implementation is not thread-safe. * @@ -39,8 +37,7 @@ import org.apache.tomcat.util.res.StringManager; */ public class CaseInsensitiveKeyMap extends AbstractMap { -private static final StringManager sm = -StringManager.getManager(CaseInsensitiveKeyMap.class); +private static final StringManager sm = StringManager.getManager(CaseInsensitiveKeyMap.class); private final Map map = new HashMap<>(); @@ -64,12 +61,11 @@ public class CaseInsensitiveKeyMap extends AbstractMap { /** * {@inheritDoc} * - * Use this method with caution. If the input Map contains duplicate - * keys when the keys are compared in a case-insensitive manner then some - * values will be lost when inserting via this method. + * Use this method with caution. If the input Map contains duplicate keys when the keys are compared in a + * case-insensitive manner then some values will be lost when inserting via this method. */ @Override -public void putAll(Map m) { +public void putAll(Map m) { super.putAll(m); } @@ -87,7 +83,7 @@ public class CaseInsensitiveKeyMap extends AbstractMap { @Override -public Set> entrySet() { +public Set> entrySet() { return new EntrySet<>(map.entrySet()); } @@ -126,8 +122,8 @@ public class CaseInsensitiveKeyMap extends AbstractMap { } @Override -public Entry next() { -Entry entry = iterator.next(); +public Entry next() { +Entry entry = iterator.next(); return new EntryImpl<>(entry.getKey().getKey(), entry.getValue()); } diff --git a/java/org/apache/tomcat/util/collections/ConcurrentCache.java b/java/org/apache/tomcat/util/collections/ConcurrentCache.java index 7eff23e567..6355d7d830 100644 --- a/java/org/apache/tomcat/util/collections/ConcurrentCache.java +++ b/java/org/apache/tomcat/util/collections/ConcurrentCache.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.WeakHashMap; import java.util.concurrent.ConcurrentHashMap; -public final class ConcurrentCache { +public final class ConcurrentCache { private final int size; diff --git a/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java b/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java index d796d92162..99f33fe0b5 100644 --- a/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java +++ b/java/org/apache/tomcat/util/collections/ConcurrentLruCache.java @@ -76,7 +76,7 @@ public class ConcurrentLruCache { if (oldMap != null) { map.putAll(oldMap); } - } else { +} else { map = null; } } @@ -94,7 +94,7 @@ public class ConcurrentLruCache { } -private static class LimitedLinkedHashMap extends LinkedHashMap { +private static class LimitedLinkedHashMap extends LinkedHashMap { private static final long serialVersionUID = 1L; private final int limit; diff --git a/java/org/apache/tomcat/util/collections/ManagedConcurrentWeakHashMap.java b/java/org
Re: Tomcat Native and OpenSSL 3.5.x
Mark, On 5/22/25 3:13 AM, Mark Thomas wrote: All, The last Tomcat Native releases were in July 2024. The Windows binaries were built with 3.0.14. There are some low severity CVEs in 3.0.14 that we don't believe apply to Tomcat's usage of OpenSSL but that may trigger a security scanner. There is a new OpenSSL LTS branch, 3.5.x, that includes support for Post Quantum Cryptography. I'd like to get a new round of Tomcat Native releases made where the Windows binaries are built with 3.5.x. My question is does this need a version bump? I'm thinking not as I'm not planning on changing the minimum OpenSSL version and these are convenience binaries. Any objections? No objections as long as earlier versions are still supported. OpenSSL has been getting better about being less incompatible with itself. :) As I already mentioned yesterday (subject: "OpenSSL 3.5"), I just built libtcnative and ran the whole suite of unit tests against Tomcat 11 using OpenSSL 3.5 and things went just fine. That was on a *NIX system which of course has a separate build process, but I just wanted to reiterate that Tomcat and tcnative both seem perfectly happy with OpenSSL 3.5 under the covers. -chris - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat Native and OpenSSL 3.5.x
On 22/05/2025 15:27, Mark Thomas wrote: I'm making progress. I've built Tomcat Native 2.0.x with OpenSSL 3.5.0 but it looks like I've picked up too many dependencies. I'm looking at how to fix that now. Thank you Mladen. He had already made the necessary changes. I just needed to enabled them. I now have a Tomcat Native 2.0.9-dev build using APR 1.7.6 and OpenSSL 3.5.0 working on a clean Windows 2022 install that does not have any Visual Studio runtimes installed. I've made notes of the minor tweaks required to the build process as I worked through creating this Tomcat Native build. I'm going to clean all of that out and start again with a clean build system to make sure I haven't missed anything. I'll update the wiki as I go along. I should be able to tag Tomcat Native 2.0.9 some time next week - in time for the June releases. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot success in on tomcat-12.0.x
Build status: Build succeeded! Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/120/builds/564 Blamelist: Mark Thomas , remm Build Text: build successful Status Detected: restored build Build Source Stamp: [branch main] 9432ba70546820dcda27738c932c828282cd676a Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 shell_7: 0 compile: 1 shell_8: 0 shell_9: 0 shell_10: 0 shell_11: 0 Rsync docs to nightlies.apache.org: 0 shell_12: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_13: 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 failure in on tomcat-10.1.x
Build status: BUILD FAILED: failed compile (failure) Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/44/builds/1761 Blamelist: Mark Thomas Build Text: failed compile (failure) Status Detected: new failure Build Source Stamp: [branch 10.1.x] c05b3c54bdcf1079eed25cd82f7c384d9a386a65 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 compile: 1 shell_7: 0 shell_8: 0 shell_9: 0 shell_10: 0 Rsync docs to nightlies.apache.org: 0 shell_11: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 2 shell_12: 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-9.0.x
Build status: Build succeeded! Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/37/builds/1413 Blamelist: Mark Thomas , remm Build Text: build successful Status Detected: restored build Build Source Stamp: [branch 9.0.x] e3764fe5592e7b3f0632fe795b8274b51ebbf93b Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 compile: 1 shell_7: 0 shell_8: 0 shell_9: 0 shell_10: 0 Rsync docs to nightlies.apache.org: 0 shell_11: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_12: 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: Tomcat Native and OpenSSL 3.5.x
All, This isn't going to work for 3.5.x. We need to use a newer compiler than the one packaged with Mladen's custom Microsoft compiler bundle. I have been meaning to look at updating the Tomcat Native builds so we can use a standard Visual Studio installation. I guess it is time to spend some time looking at that. Mark On 22/05/2025 08:13, Mark Thomas wrote: All, The last Tomcat Native releases were in July 2024. The Windows binaries were built with 3.0.14. There are some low severity CVEs in 3.0.14 that we don't believe apply to Tomcat's usage of OpenSSL but that may trigger a security scanner. There is a new OpenSSL LTS branch, 3.5.x, that includes support for Post Quantum Cryptography. I'd like to get a new round of Tomcat Native releases made where the Windows binaries are built with 3.5.x. My question is does this need a version bump? I'm thinking not as I'm not planning on changing the minimum OpenSSL version and these are convenience binaries. Any objections? Mark - 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
(tomcat) branch 10.1.x updated: Code clean-up - formatting. No fucntional change.
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 382369d3d9 Code clean-up - formatting. No fucntional change. 382369d3d9 is described below commit 382369d3d921ce3507a9f737f04add5e8f946451 Author: Mark Thomas AuthorDate: Thu May 22 11:58:12 2025 +0100 Code clean-up - formatting. No fucntional change. --- java/org/apache/tomcat/jni/Buffer.java | 3 +- .../org/apache/tomcat/jni/CertificateVerifier.java | 13 +- java/org/apache/tomcat/jni/FileInfo.java | 7 +- java/org/apache/tomcat/jni/Library.java| 46 +- .../apache/tomcat/jni/LibraryNotFoundError.java| 10 +- java/org/apache/tomcat/jni/Pool.java | 15 +- java/org/apache/tomcat/jni/SSL.java| 519 - java/org/apache/tomcat/jni/SSLConf.java| 38 +- java/org/apache/tomcat/jni/SSLContext.java | 381 --- java/org/apache/tomcat/jni/Sockaddr.java | 7 +- 10 files changed, 543 insertions(+), 496 deletions(-) diff --git a/java/org/apache/tomcat/jni/Buffer.java b/java/org/apache/tomcat/jni/Buffer.java index 15ce56968e..530021c5f5 100644 --- a/java/org/apache/tomcat/jni/Buffer.java +++ b/java/org/apache/tomcat/jni/Buffer.java @@ -19,8 +19,7 @@ package org.apache.tomcat.jni; import java.nio.ByteBuffer; /** - * Provides utilities related to the use of directly allocated - * {@link ByteBuffer} instances with native code. + * Provides utilities related to the use of directly allocated {@link ByteBuffer} instances with native code. */ public class Buffer { diff --git a/java/org/apache/tomcat/jni/CertificateVerifier.java b/java/org/apache/tomcat/jni/CertificateVerifier.java index b9b0d48290..d88fcde338 100644 --- a/java/org/apache/tomcat/jni/CertificateVerifier.java +++ b/java/org/apache/tomcat/jni/CertificateVerifier.java @@ -22,13 +22,14 @@ package org.apache.tomcat.jni; public interface CertificateVerifier { /** - * Returns {@code true} if the passed in certificate chain could be verified and so the handshake - * should be successful, {@code false} otherwise. + * Returns {@code true} if the passed in certificate chain could be verified and so the handshake should be + * successful, {@code false} otherwise. * - * @param ssl the SSL instance - * @param x509 the {@code X509} certificate chain - * @param authAlgorithm the auth algorithm - * @return verified {@code true} if verified successful, {@code false} otherwise + * @param ssl the SSL instance + * @param x509 the {@code X509} certificate chain + * @param authAlgorithm the auth algorithm + * + * @return verified {@code true} if verified successful, {@code false} otherwise */ boolean verify(long ssl, byte[][] x509, String authAlgorithm); } diff --git a/java/org/apache/tomcat/jni/FileInfo.java b/java/org/apache/tomcat/jni/FileInfo.java index ff807e4a60..3ad4b53835 100644 --- a/java/org/apache/tomcat/jni/FileInfo.java +++ b/java/org/apache/tomcat/jni/FileInfo.java @@ -17,10 +17,9 @@ package org.apache.tomcat.jni; /** - * Tomcat Native 1.2.33 and earlier won't initialise unless this class is - * present. This dummy class ensures initialisation gets as far as being able to - * check the version of the Tomcat Native library and reporting a version error - * if 1.2.33 or earlier is present. + * Tomcat Native 1.2.33 and earlier won't initialise unless this class is present. This dummy class ensures + * initialisation gets as far as being able to check the version of the Tomcat Native library and reporting a version + * error if 1.2.33 or earlier is present. */ public class FileInfo { diff --git a/java/org/apache/tomcat/jni/Library.java b/java/org/apache/tomcat/jni/Library.java index 78a0bfd39e..da88779faf 100644 --- a/java/org/apache/tomcat/jni/Library.java +++ b/java/org/apache/tomcat/jni/Library.java @@ -21,7 +21,7 @@ import java.io.File; public final class Library { /* Default library names - use 2.x in preference to 1.x if both are available */ -private static final String [] NAMES = {"tcnative-2", "libtcnative-2", "tcnative-1", "libtcnative-1"}; +private static final String[] NAMES = { "tcnative-2", "libtcnative-2", "tcnative-1", "libtcnative-1" }; /* System property used to define CATALINA_HOME */ private static final String CATALINA_HOME_PROP = "catalina.home"; /* @@ -56,7 +56,7 @@ public final class Library { } if (!loaded) { String path = System.getProperty("java.library.path"); -String [] paths = path.split(File.pathSeparator); +String[] paths = path.split(File.pathSeparator); for (String value : NAMES) {
(tomcat) branch 11.0.x updated: Code clean-up - formatting. No fucntional change.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 474803fe64 Code clean-up - formatting. No fucntional change. 474803fe64 is described below commit 474803fe64fd99e49b7b1bcb1ac61085163ea4aa Author: Mark Thomas AuthorDate: Thu May 22 11:57:34 2025 +0100 Code clean-up - formatting. No fucntional change. --- java/org/apache/tomcat/jni/Buffer.java | 3 +- .../org/apache/tomcat/jni/CertificateVerifier.java | 13 +- java/org/apache/tomcat/jni/FileInfo.java | 7 +- java/org/apache/tomcat/jni/Library.java| 46 +- .../apache/tomcat/jni/LibraryNotFoundError.java| 10 +- java/org/apache/tomcat/jni/Pool.java | 15 +- java/org/apache/tomcat/jni/SSL.java| 515 - java/org/apache/tomcat/jni/SSLConf.java| 38 +- java/org/apache/tomcat/jni/SSLContext.java | 381 --- java/org/apache/tomcat/jni/Sockaddr.java | 7 +- 10 files changed, 541 insertions(+), 494 deletions(-) diff --git a/java/org/apache/tomcat/jni/Buffer.java b/java/org/apache/tomcat/jni/Buffer.java index 15ce56968e..530021c5f5 100644 --- a/java/org/apache/tomcat/jni/Buffer.java +++ b/java/org/apache/tomcat/jni/Buffer.java @@ -19,8 +19,7 @@ package org.apache.tomcat.jni; import java.nio.ByteBuffer; /** - * Provides utilities related to the use of directly allocated - * {@link ByteBuffer} instances with native code. + * Provides utilities related to the use of directly allocated {@link ByteBuffer} instances with native code. */ public class Buffer { diff --git a/java/org/apache/tomcat/jni/CertificateVerifier.java b/java/org/apache/tomcat/jni/CertificateVerifier.java index b9b0d48290..d88fcde338 100644 --- a/java/org/apache/tomcat/jni/CertificateVerifier.java +++ b/java/org/apache/tomcat/jni/CertificateVerifier.java @@ -22,13 +22,14 @@ package org.apache.tomcat.jni; public interface CertificateVerifier { /** - * Returns {@code true} if the passed in certificate chain could be verified and so the handshake - * should be successful, {@code false} otherwise. + * Returns {@code true} if the passed in certificate chain could be verified and so the handshake should be + * successful, {@code false} otherwise. * - * @param ssl the SSL instance - * @param x509 the {@code X509} certificate chain - * @param authAlgorithm the auth algorithm - * @return verified {@code true} if verified successful, {@code false} otherwise + * @param ssl the SSL instance + * @param x509 the {@code X509} certificate chain + * @param authAlgorithm the auth algorithm + * + * @return verified {@code true} if verified successful, {@code false} otherwise */ boolean verify(long ssl, byte[][] x509, String authAlgorithm); } diff --git a/java/org/apache/tomcat/jni/FileInfo.java b/java/org/apache/tomcat/jni/FileInfo.java index ff807e4a60..3ad4b53835 100644 --- a/java/org/apache/tomcat/jni/FileInfo.java +++ b/java/org/apache/tomcat/jni/FileInfo.java @@ -17,10 +17,9 @@ package org.apache.tomcat.jni; /** - * Tomcat Native 1.2.33 and earlier won't initialise unless this class is - * present. This dummy class ensures initialisation gets as far as being able to - * check the version of the Tomcat Native library and reporting a version error - * if 1.2.33 or earlier is present. + * Tomcat Native 1.2.33 and earlier won't initialise unless this class is present. This dummy class ensures + * initialisation gets as far as being able to check the version of the Tomcat Native library and reporting a version + * error if 1.2.33 or earlier is present. */ public class FileInfo { diff --git a/java/org/apache/tomcat/jni/Library.java b/java/org/apache/tomcat/jni/Library.java index 72c4a7ec23..8b89ff73ac 100644 --- a/java/org/apache/tomcat/jni/Library.java +++ b/java/org/apache/tomcat/jni/Library.java @@ -21,7 +21,7 @@ import java.io.File; public final class Library { /* Default library names - use 2.x in preference to 1.x if both are available */ -private static final String [] NAMES = {"tcnative-2", "libtcnative-2", "tcnative-1", "libtcnative-1"}; +private static final String[] NAMES = { "tcnative-2", "libtcnative-2", "tcnative-1", "libtcnative-1" }; /* System property used to define CATALINA_HOME */ private static final String CATALINA_HOME_PROP = "catalina.home"; /* @@ -56,7 +56,7 @@ public final class Library { } if (!loaded) { String path = System.getProperty("java.library.path"); -String [] paths = path.split(File.pathSeparator); +String[] paths = path.split(File.pathSeparator); for (String value : NAMES) {
(tomcat) branch main updated: Code clean-up - formatting. No fucntional change.
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 baac872509 Code clean-up - formatting. No fucntional change. baac872509 is described below commit baac872509abd086d4e32546a0c59f6d14968011 Author: Mark Thomas AuthorDate: Thu May 22 11:56:57 2025 +0100 Code clean-up - formatting. No fucntional change. --- java/org/apache/tomcat/jni/Buffer.java | 3 +- .../org/apache/tomcat/jni/CertificateVerifier.java | 13 +- java/org/apache/tomcat/jni/FileInfo.java | 7 +- java/org/apache/tomcat/jni/Library.java| 46 +- .../apache/tomcat/jni/LibraryNotFoundError.java| 10 +- java/org/apache/tomcat/jni/Pool.java | 15 +- java/org/apache/tomcat/jni/SSL.java| 515 - java/org/apache/tomcat/jni/SSLConf.java| 38 +- java/org/apache/tomcat/jni/SSLContext.java | 381 --- java/org/apache/tomcat/jni/Sockaddr.java | 7 +- 10 files changed, 541 insertions(+), 494 deletions(-) diff --git a/java/org/apache/tomcat/jni/Buffer.java b/java/org/apache/tomcat/jni/Buffer.java index 15ce56968e..530021c5f5 100644 --- a/java/org/apache/tomcat/jni/Buffer.java +++ b/java/org/apache/tomcat/jni/Buffer.java @@ -19,8 +19,7 @@ package org.apache.tomcat.jni; import java.nio.ByteBuffer; /** - * Provides utilities related to the use of directly allocated - * {@link ByteBuffer} instances with native code. + * Provides utilities related to the use of directly allocated {@link ByteBuffer} instances with native code. */ public class Buffer { diff --git a/java/org/apache/tomcat/jni/CertificateVerifier.java b/java/org/apache/tomcat/jni/CertificateVerifier.java index b9b0d48290..d88fcde338 100644 --- a/java/org/apache/tomcat/jni/CertificateVerifier.java +++ b/java/org/apache/tomcat/jni/CertificateVerifier.java @@ -22,13 +22,14 @@ package org.apache.tomcat.jni; public interface CertificateVerifier { /** - * Returns {@code true} if the passed in certificate chain could be verified and so the handshake - * should be successful, {@code false} otherwise. + * Returns {@code true} if the passed in certificate chain could be verified and so the handshake should be + * successful, {@code false} otherwise. * - * @param ssl the SSL instance - * @param x509 the {@code X509} certificate chain - * @param authAlgorithm the auth algorithm - * @return verified {@code true} if verified successful, {@code false} otherwise + * @param ssl the SSL instance + * @param x509 the {@code X509} certificate chain + * @param authAlgorithm the auth algorithm + * + * @return verified {@code true} if verified successful, {@code false} otherwise */ boolean verify(long ssl, byte[][] x509, String authAlgorithm); } diff --git a/java/org/apache/tomcat/jni/FileInfo.java b/java/org/apache/tomcat/jni/FileInfo.java index ff807e4a60..3ad4b53835 100644 --- a/java/org/apache/tomcat/jni/FileInfo.java +++ b/java/org/apache/tomcat/jni/FileInfo.java @@ -17,10 +17,9 @@ package org.apache.tomcat.jni; /** - * Tomcat Native 1.2.33 and earlier won't initialise unless this class is - * present. This dummy class ensures initialisation gets as far as being able to - * check the version of the Tomcat Native library and reporting a version error - * if 1.2.33 or earlier is present. + * Tomcat Native 1.2.33 and earlier won't initialise unless this class is present. This dummy class ensures + * initialisation gets as far as being able to check the version of the Tomcat Native library and reporting a version + * error if 1.2.33 or earlier is present. */ public class FileInfo { diff --git a/java/org/apache/tomcat/jni/Library.java b/java/org/apache/tomcat/jni/Library.java index 72c4a7ec23..8b89ff73ac 100644 --- a/java/org/apache/tomcat/jni/Library.java +++ b/java/org/apache/tomcat/jni/Library.java @@ -21,7 +21,7 @@ import java.io.File; public final class Library { /* Default library names - use 2.x in preference to 1.x if both are available */ -private static final String [] NAMES = {"tcnative-2", "libtcnative-2", "tcnative-1", "libtcnative-1"}; +private static final String[] NAMES = { "tcnative-2", "libtcnative-2", "tcnative-1", "libtcnative-1" }; /* System property used to define CATALINA_HOME */ private static final String CATALINA_HOME_PROP = "catalina.home"; /* @@ -56,7 +56,7 @@ public final class Library { } if (!loaded) { String path = System.getProperty("java.library.path"); -String [] paths = path.split(File.pathSeparator); +String[] paths = path.split(File.pathSeparator); for (String value : NAMES) {
Re: Tomcat Native and OpenSSL 3.5.x
On Thu, May 22, 2025 at 9:13 AM Mark Thomas wrote: > > All, > > The last Tomcat Native releases were in July 2024. The Windows binaries > were built with 3.0.14. > > There are some low severity CVEs in 3.0.14 that we don't believe apply > to Tomcat's usage of OpenSSL but that may trigger a security scanner. > > There is a new OpenSSL LTS branch, 3.5.x, that includes support for Post > Quantum Cryptography. > > I'd like to get a new round of Tomcat Native releases made where the > Windows binaries are built with 3.5.x. > > My question is does this need a version bump? I'm thinking not as I'm > not planning on changing the minimum OpenSSL version and these are > convenience binaries. > > Any objections? +1 Fedora 42 is still on OpenSSL 3.2, so it will take one more upgrade cycle for people to actually upgrade to 3.5, unless they are rushing it. Rémy > Mark > > - > 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
Re: Tomcat Native and OpenSSL 3.5.x
On 2025/05/22 07:13:49 Mark Thomas wrote: > All, > > The last Tomcat Native releases were in July 2024. The Windows binaries > were built with 3.0.14. > > There are some low severity CVEs in 3.0.14 that we don't believe apply > to Tomcat's usage of OpenSSL but that may trigger a security scanner. > > There is a new OpenSSL LTS branch, 3.5.x, that includes support for Post > Quantum Cryptography. > > I'd like to get a new round of Tomcat Native releases made where the > Windows binaries are built with 3.5.x. > > My question is does this need a version bump? I'm thinking not as I'm > not planning on changing the minimum OpenSSL version and these are > convenience binaries. > > Any objections? If 3.5 retains ABI and API then I don't see a reason to raise the minor version. Go for it. M - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [PR] Acceptor & Poller Thread should print error logs when it crashes now [tomcat]
jmilktea commented on PR #859: URL: https://github.com/apache/tomcat/pull/859#issuecomment-2900303902 Yes sir, the service will hang, but there is no log to help me find it quickly. I need to find it through some other means. If there is a log, I can find it at a glance, and it is reasonable to print the error log. @rmaucher -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat Native and OpenSSL 3.5.x
Am 22.05.25 um 09:13 schrieb Mark Thomas: All, The last Tomcat Native releases were in July 2024. The Windows binaries were built with 3.0.14. There are some low severity CVEs in 3.0.14 that we don't believe apply to Tomcat's usage of OpenSSL but that may trigger a security scanner. There is a new OpenSSL LTS branch, 3.5.x, that includes support for Post Quantum Cryptography. I'd like to get a new round of Tomcat Native releases made where the Windows binaries are built with 3.5.x. My question is does this need a version bump? I'm thinking not as I'm not planning on changing the minimum OpenSSL version and these are convenience binaries. Any objections? +1, no objections. There were some important performance optimizations post 3.0 (improve lock use and handling). Not sure, whether the overlap with tcnative use cases though. I regularly run my release vote tests (TC unit tests) using tcnative 1.3.1 and 2.0.8 also with OpenSSL 3.5.0 (since beta) and never observed a problem. Since the binary artefacts provided for download already contain the OpenSSL version as part of their name, I don't see any reason for a new tcnative version. Best regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Tomcat Native and OpenSSL 3.5.x
All, The last Tomcat Native releases were in July 2024. The Windows binaries were built with 3.0.14. There are some low severity CVEs in 3.0.14 that we don't believe apply to Tomcat's usage of OpenSSL but that may trigger a security scanner. There is a new OpenSSL LTS branch, 3.5.x, that includes support for Post Quantum Cryptography. I'd like to get a new round of Tomcat Native releases made where the Windows binaries are built with 3.5.x. My question is does this need a version bump? I'm thinking not as I'm not planning on changing the minimum OpenSSL version and these are convenience binaries. Any objections? Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat-native) branch 1.3.x updated: Update EOL dates
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 1.3.x in repository https://gitbox.apache.org/repos/asf/tomcat-native.git The following commit(s) were added to refs/heads/1.3.x by this push: new f828ae2c5 Update EOL dates f828ae2c5 is described below commit f828ae2c5fea0544a113af5988ddd4ecc7b1cb6d Author: Mark Thomas AuthorDate: Thu May 22 08:19:40 2025 +0100 Update EOL dates --- native/srclib/VERSIONS | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/native/srclib/VERSIONS b/native/srclib/VERSIONS index f39f66ea1..c6f49540f 100644 --- a/native/srclib/VERSIONS +++ b/native/srclib/VERSIONS @@ -12,25 +12,25 @@ Native team The minimum version of OpenSSL is driven by the version of OpenSSL used by -downstream distributions. +downstream distributions. EOL dates exclude paid support offerings. The current state of OpenSSL in Debian is: -- OpenSSL 1.1.1n in Debian 10 (EOL end June 2024) -- OpenSSL 1.1.1n in Debian 11 (EOL end June 2026) +- OpenSSL 1.1.1w in Debian 11 LTS (EOL end June 2026) +- OpenSSL 3.0.14 in Debian 12 LTS (EOL end June 2028) And in Ubuntu: -- OpenSSL 1.1.1 in Ubuntu 18.04 LTS (EOL in April 2028) -- OpenSSL 1.1.1f in Ubuntu 20.04 LTS (EOL in April 2030) -- OpenSSL 3.0.2 in Ubuntu 22.04 LTS (EOL in April 2032) +- OpenSSL 1.1.1f in Ubuntu 20.04 LTS (EOL in May 2025) +- OpenSSL 3.0.2 in Ubuntu 22.04 LTS (EOL in April 2027) +- OpenSSL 3.0.13 in Ubuntu 24.04 LTS (EOL in April 2029) The minimum version of APR is driven by the version of APR used by downstream distributions. The current state of APR in Debian is: -- APR 1.6.5 in Debian 10 (EOL end June 2024) - APR 1.7.0 in Debian 11 (EOL end June 2026) +- APR 1.7.2 in Debian 12 (EOL end June 2028) And in Ubuntu: -- APR 1.6.3 in Ubuntu 18.04 LTS (EOL in April 2028) -- APR 1.6.5 in Ubuntu 20.04 LTS (EOL in April 2030) -- APR 1.7.0 in Ubuntu 22.04 LTS (EOL in April 2032) +- APR 1.6.5 in Ubuntu 20.04 LTS (EOL in May 2025) +- APR 1.7.0 in Ubuntu 22.04 LTS (EOL in April 2027) +- APR 1.7.2 in Ubuntu 24.04 LTS (EOL in April 2029) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Code clean-up - formatting. No functional change.
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 97c6bcc556 Code clean-up - formatting. No functional change. 97c6bcc556 is described below commit 97c6bcc55602eea9e06c03b090188b5285e92607 Author: Mark Thomas AuthorDate: Thu May 22 12:02:01 2025 +0100 Code clean-up - formatting. No functional change. --- java/org/apache/tomcat/util/buf/AbstractChunk.java | 18 +++--- java/org/apache/tomcat/util/buf/ByteChunk.java | 22 ++ java/org/apache/tomcat/util/buf/HexUtils.java | 6 +++--- java/org/apache/tomcat/util/buf/StringCache.java | 2 +- java/org/apache/tomcat/util/buf/StringUtils.java | 6 +++--- 5 files changed, 28 insertions(+), 26 deletions(-) diff --git a/java/org/apache/tomcat/util/buf/AbstractChunk.java b/java/org/apache/tomcat/util/buf/AbstractChunk.java index 62d9f5ceb8..d6f4f07da3 100644 --- a/java/org/apache/tomcat/util/buf/AbstractChunk.java +++ b/java/org/apache/tomcat/util/buf/AbstractChunk.java @@ -87,6 +87,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set the start position of the data in the buffer. + * * @param start the new start position */ public void setStart(int start) { @@ -107,6 +108,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set the end position of the data in the buffer. + * * @param end the new end position */ public void setEnd(int end) { @@ -134,15 +136,15 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** - * Return the index of the first occurrence of the subsequence of - * the given String, or -1 if it is not found. + * Return the index of the first occurrence of the subsequence of the given String, or -1 if it is not found. * - * @param src the String to look for + * @param src the String to look for * @param srcStart the subsequence start in the String - * @param srcLen the subsequence length in the String + * @param srcLen the subsequence length in the String * @param myOffset the index on which to start the search in the buffer - * @return the position of the first character of the first occurrence - * of the subsequence in the buffer, or -1 if not found + * + * @return the position of the first character of the first occurrence of the subsequence in the buffer, or -1 if + * not found */ public int indexOf(String src, int srcStart, int srcLen, int myOffset) { char first = src.charAt(srcStart); @@ -150,7 +152,8 @@ public abstract class AbstractChunk implements Cloneable, Serializable { // Look for first char int srcEnd = srcStart + srcLen; -mainLoop: for (int i = myOffset + start; i <= (end - srcLen); i++) { +mainLoop: +for (int i = myOffset + start; i <= (end - srcLen); i++) { if (getBufferElement(i) != first) { continue; } @@ -204,6 +207,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * @param index the element location in the buffer + * * @return the element */ protected abstract int getBufferElement(int index); diff --git a/java/org/apache/tomcat/util/buf/ByteChunk.java b/java/org/apache/tomcat/util/buf/ByteChunk.java index eb8870794e..b4aa88a2e0 100644 --- a/java/org/apache/tomcat/util/buf/ByteChunk.java +++ b/java/org/apache/tomcat/util/buf/ByteChunk.java @@ -42,17 +42,13 @@ import java.nio.charset.StandardCharsets; * chars and Strings until the strings are needed. In addition, the charset is determined later, from headers or user * code. * - * In a server it is very important to be able to operate on - * the original byte[] without converting everything to chars. - * Some protocols are ASCII only, and some allow different - * non-UNICODE encodings. The encoding is not known beforehand, - * and can even change during the execution of the protocol. - * ( for example a multipart message may have parts with different - * encoding ) + * In a server it is very important to be able to operate on the original byte[] without converting everything to chars. + * Some protocols are ASCII only, and some allow different non-UNICODE encodings. The encoding is not known beforehand, + * and can even change during the execution of the protocol. ( for example a multipart message may have parts with + * different encoding ) * - * For HTTP, it is not very clear how the encoding of RequestURI - * and mime values can be determined, but it is a great advantage - * to be able to parse the request without converting to string. + * For HTTP, it is not very clear how the encodin
(tomcat) branch 9.0.x updated: Code clean-up - formatting. No functional change.
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 fe70fa9fac Code clean-up - formatting. No functional change. fe70fa9fac is described below commit fe70fa9fac0c73643e87aff57c340f8960c7e9b5 Author: Mark Thomas AuthorDate: Thu May 22 12:02:54 2025 +0100 Code clean-up - formatting. No functional change. --- java/org/apache/tomcat/util/buf/AbstractChunk.java | 21 ++--- java/org/apache/tomcat/util/buf/ByteChunk.java | 22 ++ java/org/apache/tomcat/util/buf/HexUtils.java | 6 +++--- java/org/apache/tomcat/util/buf/StringCache.java | 6 +++--- java/org/apache/tomcat/util/buf/StringUtils.java | 6 +++--- java/org/apache/tomcat/util/buf/ToStringUtil.java | 4 ++-- 6 files changed, 35 insertions(+), 30 deletions(-) diff --git a/java/org/apache/tomcat/util/buf/AbstractChunk.java b/java/org/apache/tomcat/util/buf/AbstractChunk.java index bdc53c93e7..67c11aa942 100644 --- a/java/org/apache/tomcat/util/buf/AbstractChunk.java +++ b/java/org/apache/tomcat/util/buf/AbstractChunk.java @@ -85,6 +85,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set the start position of the data in the buffer. + * * @param start the new start position */ public void setStart(int start) { @@ -105,6 +106,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set the end position of the data in the buffer. + * * @param end the new end position */ public void setEnd(int end) { @@ -114,6 +116,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * @return start + * * @deprecated Unused. This method will be removed in Tomcat 12. */ @Deprecated @@ -123,7 +126,9 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set start. + * * @param off the new start + * * @deprecated Unused. This method will be removed in Tomcat 12. */ @Deprecated @@ -155,15 +160,15 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** - * Return the index of the first occurrence of the subsequence of - * the given String, or -1 if it is not found. + * Return the index of the first occurrence of the subsequence of the given String, or -1 if it is not found. * - * @param src the String to look for + * @param src the String to look for * @param srcStart the subsequence start in the String - * @param srcLen the subsequence length in the String + * @param srcLen the subsequence length in the String * @param myOffset the index on which to start the search in the buffer - * @return the position of the first character of the first occurrence - * of the subsequence in the buffer, or -1 if not found + * + * @return the position of the first character of the first occurrence of the subsequence in the buffer, or -1 if + * not found */ public int indexOf(String src, int srcStart, int srcLen, int myOffset) { char first = src.charAt(srcStart); @@ -171,7 +176,8 @@ public abstract class AbstractChunk implements Cloneable, Serializable { // Look for first char int srcEnd = srcStart + srcLen; -mainLoop: for (int i = myOffset + start; i <= (end - srcLen); i++) { +mainLoop: +for (int i = myOffset + start; i <= (end - srcLen); i++) { if (getBufferElement(i) != first) { continue; } @@ -225,6 +231,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * @param index the element location in the buffer + * * @return the element */ protected abstract int getBufferElement(int index); diff --git a/java/org/apache/tomcat/util/buf/ByteChunk.java b/java/org/apache/tomcat/util/buf/ByteChunk.java index 1f86c31d41..63f3668af9 100644 --- a/java/org/apache/tomcat/util/buf/ByteChunk.java +++ b/java/org/apache/tomcat/util/buf/ByteChunk.java @@ -41,17 +41,13 @@ import java.nio.charset.StandardCharsets; * chars and Strings until the strings are needed. In addition, the charset is determined later, from headers or user * code. * - * In a server it is very important to be able to operate on - * the original byte[] without converting everything to chars. - * Some protocols are ASCII only, and some allow different - * non-UNICODE encodings. The encoding is not known beforehand, - * and can even change during the execution of the protocol. - * ( for example a multipart message may have parts with different - * encoding ) + * In a server it is very important to be able to operate on the orig
(tomcat) branch 10.1.x updated: Code clean-up - formatting. No functional change.
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 43294ebaee Code clean-up - formatting. No functional change. 43294ebaee is described below commit 43294ebaee217f3042c2352afc64a0594062f7c1 Author: Mark Thomas AuthorDate: Thu May 22 12:02:36 2025 +0100 Code clean-up - formatting. No functional change. --- java/org/apache/tomcat/util/buf/AbstractChunk.java | 21 ++--- java/org/apache/tomcat/util/buf/ByteChunk.java | 22 ++ java/org/apache/tomcat/util/buf/HexUtils.java | 6 +++--- java/org/apache/tomcat/util/buf/StringCache.java | 6 +++--- java/org/apache/tomcat/util/buf/StringUtils.java | 6 +++--- 5 files changed, 33 insertions(+), 28 deletions(-) diff --git a/java/org/apache/tomcat/util/buf/AbstractChunk.java b/java/org/apache/tomcat/util/buf/AbstractChunk.java index bdc53c93e7..67c11aa942 100644 --- a/java/org/apache/tomcat/util/buf/AbstractChunk.java +++ b/java/org/apache/tomcat/util/buf/AbstractChunk.java @@ -85,6 +85,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set the start position of the data in the buffer. + * * @param start the new start position */ public void setStart(int start) { @@ -105,6 +106,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set the end position of the data in the buffer. + * * @param end the new end position */ public void setEnd(int end) { @@ -114,6 +116,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * @return start + * * @deprecated Unused. This method will be removed in Tomcat 12. */ @Deprecated @@ -123,7 +126,9 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set start. + * * @param off the new start + * * @deprecated Unused. This method will be removed in Tomcat 12. */ @Deprecated @@ -155,15 +160,15 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** - * Return the index of the first occurrence of the subsequence of - * the given String, or -1 if it is not found. + * Return the index of the first occurrence of the subsequence of the given String, or -1 if it is not found. * - * @param src the String to look for + * @param src the String to look for * @param srcStart the subsequence start in the String - * @param srcLen the subsequence length in the String + * @param srcLen the subsequence length in the String * @param myOffset the index on which to start the search in the buffer - * @return the position of the first character of the first occurrence - * of the subsequence in the buffer, or -1 if not found + * + * @return the position of the first character of the first occurrence of the subsequence in the buffer, or -1 if + * not found */ public int indexOf(String src, int srcStart, int srcLen, int myOffset) { char first = src.charAt(srcStart); @@ -171,7 +176,8 @@ public abstract class AbstractChunk implements Cloneable, Serializable { // Look for first char int srcEnd = srcStart + srcLen; -mainLoop: for (int i = myOffset + start; i <= (end - srcLen); i++) { +mainLoop: +for (int i = myOffset + start; i <= (end - srcLen); i++) { if (getBufferElement(i) != first) { continue; } @@ -225,6 +231,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * @param index the element location in the buffer + * * @return the element */ protected abstract int getBufferElement(int index); diff --git a/java/org/apache/tomcat/util/buf/ByteChunk.java b/java/org/apache/tomcat/util/buf/ByteChunk.java index 6d26b9dd94..93fac3a57a 100644 --- a/java/org/apache/tomcat/util/buf/ByteChunk.java +++ b/java/org/apache/tomcat/util/buf/ByteChunk.java @@ -41,17 +41,13 @@ import java.nio.charset.StandardCharsets; * chars and Strings until the strings are needed. In addition, the charset is determined later, from headers or user * code. * - * In a server it is very important to be able to operate on - * the original byte[] without converting everything to chars. - * Some protocols are ASCII only, and some allow different - * non-UNICODE encodings. The encoding is not known beforehand, - * and can even change during the execution of the protocol. - * ( for example a multipart message may have parts with different - * encoding ) + * In a server it is very important to be able to operate on the original byte[] without converting everything to chars. + * Som
(tomcat) branch 11.0.x updated: Code clean-up - formatting. No functional change.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 163952922a Code clean-up - formatting. No functional change. 163952922a is described below commit 163952922a0d93f1a3e8f666e156eecf6816037d Author: Mark Thomas AuthorDate: Thu May 22 12:02:20 2025 +0100 Code clean-up - formatting. No functional change. --- java/org/apache/tomcat/util/buf/AbstractChunk.java | 21 ++--- java/org/apache/tomcat/util/buf/ByteChunk.java | 22 ++ java/org/apache/tomcat/util/buf/HexUtils.java | 6 +++--- java/org/apache/tomcat/util/buf/StringCache.java | 2 +- java/org/apache/tomcat/util/buf/StringUtils.java | 6 +++--- 5 files changed, 31 insertions(+), 26 deletions(-) diff --git a/java/org/apache/tomcat/util/buf/AbstractChunk.java b/java/org/apache/tomcat/util/buf/AbstractChunk.java index e26204b762..1c4bea9ede 100644 --- a/java/org/apache/tomcat/util/buf/AbstractChunk.java +++ b/java/org/apache/tomcat/util/buf/AbstractChunk.java @@ -87,6 +87,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set the start position of the data in the buffer. + * * @param start the new start position */ public void setStart(int start) { @@ -107,6 +108,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set the end position of the data in the buffer. + * * @param end the new end position */ public void setEnd(int end) { @@ -116,6 +118,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * @return start + * * @deprecated Unused. This method will be removed in Tomcat 12. */ @Deprecated @@ -125,7 +128,9 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * Set start. + * * @param off the new start + * * @deprecated Unused. This method will be removed in Tomcat 12. */ @Deprecated @@ -157,15 +162,15 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** - * Return the index of the first occurrence of the subsequence of - * the given String, or -1 if it is not found. + * Return the index of the first occurrence of the subsequence of the given String, or -1 if it is not found. * - * @param src the String to look for + * @param src the String to look for * @param srcStart the subsequence start in the String - * @param srcLen the subsequence length in the String + * @param srcLen the subsequence length in the String * @param myOffset the index on which to start the search in the buffer - * @return the position of the first character of the first occurrence - * of the subsequence in the buffer, or -1 if not found + * + * @return the position of the first character of the first occurrence of the subsequence in the buffer, or -1 if + * not found */ public int indexOf(String src, int srcStart, int srcLen, int myOffset) { char first = src.charAt(srcStart); @@ -173,7 +178,8 @@ public abstract class AbstractChunk implements Cloneable, Serializable { // Look for first char int srcEnd = srcStart + srcLen; -mainLoop: for (int i = myOffset + start; i <= (end - srcLen); i++) { +mainLoop: +for (int i = myOffset + start; i <= (end - srcLen); i++) { if (getBufferElement(i) != first) { continue; } @@ -227,6 +233,7 @@ public abstract class AbstractChunk implements Cloneable, Serializable { /** * @param index the element location in the buffer + * * @return the element */ protected abstract int getBufferElement(int index); diff --git a/java/org/apache/tomcat/util/buf/ByteChunk.java b/java/org/apache/tomcat/util/buf/ByteChunk.java index eb8870794e..b4aa88a2e0 100644 --- a/java/org/apache/tomcat/util/buf/ByteChunk.java +++ b/java/org/apache/tomcat/util/buf/ByteChunk.java @@ -42,17 +42,13 @@ import java.nio.charset.StandardCharsets; * chars and Strings until the strings are needed. In addition, the charset is determined later, from headers or user * code. * - * In a server it is very important to be able to operate on - * the original byte[] without converting everything to chars. - * Some protocols are ASCII only, and some allow different - * non-UNICODE encodings. The encoding is not known beforehand, - * and can even change during the execution of the protocol. - * ( for example a multipart message may have parts with different - * encoding ) + * In a server it is very important to be able to operate on the original byte[] without converting everything to chars. + * Some pr
Buildbot success in on tomcat-12.0.x
Build status: Build succeeded! Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/120/builds/560 Blamelist: Mark Thomas , remm Build Text: build successful Status Detected: restored build Build Source Stamp: [branch main] baac872509abd086d4e32546a0c59f6d14968011 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 shell_7: 0 compile: 1 shell_8: 0 shell_9: 0 shell_10: 0 shell_11: 0 Rsync docs to nightlies.apache.org: 0 shell_12: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_13: 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 failure in on tomcat-12.0.x
Build status: BUILD FAILED: Snapshot deployed to ASF Maven snapshot repository (failure) Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/120/builds/561 Blamelist: Mark Thomas Build Text: Snapshot deployed to ASF Maven snapshot repository (failure) Status Detected: new failure Build Source Stamp: [branch main] 97c6bcc55602eea9e06c03b090188b5285e92607 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 shell_7: 0 compile: 1 shell_8: 0 shell_9: 0 shell_10: 2 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org