[tomcat] branch main updated: Minor Panama API updates

2023-06-14 Thread remm
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 4b7fdaa488 Minor Panama API updates
4b7fdaa488 is described below

commit 4b7fdaa488f5996db7b8311ecca783c7dd62284a
Author: remm 
AuthorDate: Wed Jun 14 21:39:10 2023 +0200

Minor Panama API updates
---
 modules/openssl-foreign/pom.xml|  4 +--
 .../util/net/openssl/panama/OpenSSLContext.java| 42 +++---
 .../util/net/openssl/panama/OpenSSLEngine.java | 16 -
 .../openssl/panama/OpenSSLLifecycleListener.java   | 16 -
 .../apache/tomcat/util/openssl/Constants$root.java |  1 -
 .../apache/tomcat/util/openssl/constants$29.java   |  2 +-
 6 files changed, 40 insertions(+), 41 deletions(-)

diff --git a/modules/openssl-foreign/pom.xml b/modules/openssl-foreign/pom.xml
index e48b5536b0..89b4a2bc73 100644
--- a/modules/openssl-foreign/pom.xml
+++ b/modules/openssl-foreign/pom.xml
@@ -78,8 +78,8 @@
 org.apache.maven.plugins
 maven-compiler-plugin
 
-21
-21
+22
+22
 
 --enable-preview
 
diff --git 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
index 61d953a1c4..4419bbfe8f 100644
--- 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
+++ 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
@@ -186,7 +186,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 for (int i = 0; i < len; i++) {
 MemorySegment cipher = OPENSSL_sk_value(sk, i);
 MemorySegment cipherName = SSL_CIPHER_get_name(cipher);
-ciphers.add(cipherName.getUtf8String(0));
+ciphers.add(cipherName.getString(0));
 }
 return ciphers.toArray(new String[0]);
 }
@@ -225,7 +225,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 try (var localArena = Arena.ofConfined()) {
 var buf = 
localArena.allocateArray(ValueLayout.JAVA_BYTE, new byte[128]);
 ERR_error_string(errCode, buf);
-
log.error(sm.getString("openssl.errorLoadingCertificate", 
buf.getUtf8String(0)));
+
log.error(sm.getString("openssl.errorLoadingCertificate", buf.getString(0)));
 }
 }
 SSL_CONF_CTX_set_flags(confCtx, SSL_CONF_FLAG_FILE() |
@@ -405,13 +405,13 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 if (name.equals("NO_OCSP_CHECK")) {
 rc = 1;
 } else {
-int code = SSL_CONF_cmd_value_type(state.confCtx, 
localArena.allocateUtf8String(name));
+int code = SSL_CONF_cmd_value_type(state.confCtx, 
localArena.allocateString(name));
 rc = 1;
 long errCode = ERR_get_error();
 if (errCode != 0) {
 var buf = 
localArena.allocateArray(ValueLayout.JAVA_BYTE, new byte[128]);
 ERR_error_string(errCode, buf);
-log.error(sm.getString("opensslconf.checkFailed", 
buf.getUtf8String(0)));
+log.error(sm.getString("opensslconf.checkFailed", 
buf.getString(0)));
 rc = 0;
 }
 if (code == SSL_CONF_TYPE_UNKNOWN()) {
@@ -481,13 +481,13 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 noOcspCheck = Boolean.valueOf(value);
 rc = 1;
 } else {
-rc = SSL_CONF_cmd(state.confCtx, 
localArena.allocateUtf8String(name),
-localArena.allocateUtf8String(value));
+rc = SSL_CONF_cmd(state.confCtx, 
localArena.allocateString(name),
+localArena.allocateString(value));
 long errCode = ERR_get_error();
 if (rc <= 0 || errCode != 0) {
 var buf = 
localArena.allocateArray(ValueLayout.JAVA_BYTE, new byte[128]);
 ERR_error_string(errCode, buf);
-log.error(sm.getString("opensslconf.commandError", 
name, value, buf.getUtf8String(0)));
+log.error(sm.getString("opensslconf.commandError", 
name, value, 

[tomcat] branch 8.5.x updated (27fe45a184 -> fb2265ab5c)

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

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


from 27fe45a184 Fix copy/paste error & simplify
 new eb2c56ed33 Code clean-up - formatting. No functional change.
 new 1e0c67b624 Code clean-up - formatting. No functional change.
 new fb2265ab5c Code clean-up - formatting. No functional change.

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


Summary of changes:
 .../apache/catalina/core/ApplicationContext.java   | 24 +++---
 .../catalina/core/ApplicationContextFacade.java| 12 +--
 .../catalina/core/ApplicationDispatcher.java   |  8 +-
 .../catalina/core/ApplicationFilterChain.java  |  8 +-
 .../catalina/core/ApplicationFilterConfig.java |  8 +-
 .../catalina/core/ApplicationFilterFactory.java|  8 +-
 .../core/ApplicationFilterRegistration.java| 10 +--
 .../catalina/core/ApplicationHttpRequest.java  | 20 ++---
 java/org/apache/catalina/core/ApplicationPart.java |  2 +-
 .../catalina/core/ApplicationPushBuilder.java  |  8 +-
 .../apache/catalina/core/ApplicationRequest.java   | 14 ++--
 .../core/ApplicationServletRegistration.java   | 10 +--
 .../org/apache/catalina/core/AsyncContextImpl.java |  4 +-
 java/org/apache/catalina/core/ContainerBase.java   |  2 +-
 .../catalina/core/ContextNamingInfoListener.java   | 13 ++--
 .../catalina/core/DefaultInstanceManager.java  | 38 +-
 .../core/JreMemoryLeakPreventionListener.java  | 12 +--
 .../catalina/core/NamingContextListener.java   | 12 +--
 java/org/apache/catalina/core/StandardContext.java | 86 +++---
 java/org/apache/catalina/core/StandardHost.java|  4 +-
 java/org/apache/catalina/core/StandardWrapper.java |  4 +-
 .../tomcat/util/http/FastHttpDateFormat.java   | 12 +--
 java/org/apache/tomcat/util/http/HttpMessages.java |  6 +-
 .../tomcat/util/http/LegacyCookieProcessor.java|  8 +-
 java/org/apache/tomcat/util/http/Parameters.java   |  8 +-
 .../tomcat/util/http/Rfc6265CookieProcessor.java   |  4 +-
 test/org/apache/jasper/compiler/Dumper.java| 20 +++--
 .../jasper/compiler/TestAttributeParser.java   | 39 --
 test/org/apache/jasper/compiler/TestCompiler.java  | 41 ---
 .../jasper/compiler/TestELInterpreterFactory.java  |  8 +-
 test/org/apache/jasper/compiler/TestELParser.java  | 26 +++
 .../jasper/compiler/TestEncodingDetector.java  | 39 +-
 test/org/apache/jasper/compiler/TestGenerator.java | 62 ++--
 test/org/apache/jasper/compiler/TestJspConfig.java | 21 ++
 .../jasper/compiler/TestJspDocumentParser.java | 19 ++---
 test/org/apache/jasper/compiler/TestJspReader.java |  3 +-
 test/org/apache/jasper/compiler/TestJspUtil.java   |  2 +-
 test/org/apache/jasper/compiler/TestNode.java  |  4 +-
 .../jasper/compiler/TestNodeIntegration.java   |  6 +-
 test/org/apache/jasper/compiler/TestParser.java| 86 --
 .../compiler/TestParserNoStrictWhitespace.java | 23 ++
 .../jasper/compiler/TestScriptingVariabler.java|  5 +-
 .../jasper/compiler/TestTagLibraryInfoImpl.java|  6 +-
 .../jasper/compiler/TestTagPluginManager.java  | 15 ++--
 test/org/apache/jasper/compiler/TestValidator.java | 39 --
 .../apache/jasper/compiler/TesterValidator.java| 15 ++--
 46 files changed, 352 insertions(+), 472 deletions(-)


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



[tomcat] 03/03: Code clean-up - formatting. No functional change.

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

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

commit fb2265ab5c20c26536f74d42f90b434614bfacf9
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:20:20 2023 +0100

Code clean-up - formatting. No functional change.
---
 test/org/apache/jasper/compiler/Dumper.java| 20 +++--
 .../jasper/compiler/TestAttributeParser.java   | 39 --
 test/org/apache/jasper/compiler/TestCompiler.java  | 41 ---
 .../jasper/compiler/TestELInterpreterFactory.java  |  8 +-
 test/org/apache/jasper/compiler/TestELParser.java  | 26 +++
 .../jasper/compiler/TestEncodingDetector.java  | 39 +-
 test/org/apache/jasper/compiler/TestGenerator.java | 62 ++--
 test/org/apache/jasper/compiler/TestJspConfig.java | 21 ++
 .../jasper/compiler/TestJspDocumentParser.java | 19 ++---
 test/org/apache/jasper/compiler/TestJspReader.java |  3 +-
 test/org/apache/jasper/compiler/TestJspUtil.java   |  2 +-
 test/org/apache/jasper/compiler/TestNode.java  |  4 +-
 .../jasper/compiler/TestNodeIntegration.java   |  6 +-
 test/org/apache/jasper/compiler/TestParser.java| 86 --
 .../compiler/TestParserNoStrictWhitespace.java | 23 ++
 .../jasper/compiler/TestScriptingVariabler.java|  5 +-
 .../jasper/compiler/TestTagLibraryInfoImpl.java|  6 +-
 .../jasper/compiler/TestTagPluginManager.java  | 15 ++--
 test/org/apache/jasper/compiler/TestValidator.java | 39 --
 .../apache/jasper/compiler/TesterValidator.java| 15 ++--
 20 files changed, 178 insertions(+), 301 deletions(-)

diff --git a/test/org/apache/jasper/compiler/Dumper.java 
b/test/org/apache/jasper/compiler/Dumper.java
index 9bc49170c6..d05172499f 100644
--- a/test/org/apache/jasper/compiler/Dumper.java
+++ b/test/org/apache/jasper/compiler/Dumper.java
@@ -26,13 +26,12 @@ class Dumper {
 
 private String getAttributes(Attributes attrs) {
 if (attrs == null) {
-  return "";
+return "";
 }
 
 StringBuilder buf = new StringBuilder();
-for (int i=0; i < attrs.getLength(); i++) {
-buf.append(" " + attrs.getQName(i) + "=\""
-   + attrs.getValue(i) + "\"");
+for (int i = 0; i < attrs.getLength(); i++) {
+buf.append(" " + attrs.getQName(i) + "=\"" + attrs.getValue(i) 
+ "\"");
 }
 return buf.toString();
 }
@@ -51,17 +50,16 @@ class Dumper {
 }
 }
 
-private void printAttributes(String prefix, Attributes attrs,
- String suffix) {
+private void printAttributes(String prefix, Attributes attrs, String 
suffix) {
 printString(prefix, getAttributes(attrs), suffix);
 }
 
 private void dumpBody(Node n) throws JasperException {
 Node.Nodes page = n.getBody();
 if (page != null) {
-//indent++;
+// indent++;
 page.visit(this);
-//indent--;
+// indent--;
 }
 }
 
@@ -171,7 +169,7 @@ class Dumper {
 
 @Override
 public void visit(Node.ELExpression n) throws JasperException {
-printString( "${" + n.getText() + "}" );
+printString("${" + n.getText() + "}");
 }
 
 @Override
@@ -184,7 +182,7 @@ class Dumper {
 @Override
 public void visit(Node.UninterpretedTag n) throws JasperException {
 String tag = n.getQName();
-printAttributes("<"+tag, n.getAttributes(), ">");
+printAttributes("<" + tag, n.getAttributes(), ">");
 dumpBody(n);
 printString("");
 }
@@ -195,7 +193,7 @@ class Dumper {
 }
 
 private void printIndent() {
-for (int i=0; i < indent; i++) {
+for (int i = 0; i < indent; i++) {
 System.out.print("  ");
 }
 }
diff --git a/test/org/apache/jasper/compiler/TestAttributeParser.java 
b/test/org/apache/jasper/compiler/TestAttributeParser.java
index 5bba8588da..df0e01d770 100644
--- a/test/org/apache/jasper/compiler/TestAttributeParser.java
+++ b/test/org/apache/jasper/compiler/TestAttributeParser.java
@@ -26,14 +26,13 @@ import org.apache.el.TesterFunctions;
 import org.apache.jasper.el.ELContextImpl;
 
 /**
- * Test the EL processing from JSP attributes. Similar tests may be found in
- * {@link org.apache.el.TestELEvaluation} and {@link 
org.apache.el.TestELInJsp}.
+ * Test the EL processing from JSP attributes. Similar tests may be found in 
{@link org.apache.el.TestELEvaluation} and
+ * {@link org.apache.el.TestELInJsp}.
  */
 public class TestAttributeParser {
 
 /**
- * Test use of spaces in ternary expressions. This was primarily an EL
- * parser bug.
+ 

[tomcat] 02/03: Code clean-up - formatting. No functional change.

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

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

commit 1e0c67b624188945a498f5519f481c0ae9d6039d
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:19:46 2023 +0100

Code clean-up - formatting. No functional change.
---
 .../apache/catalina/core/ApplicationContext.java   | 24 +++---
 .../catalina/core/ApplicationContextFacade.java| 12 +--
 .../catalina/core/ApplicationDispatcher.java   |  8 +-
 .../catalina/core/ApplicationFilterChain.java  |  8 +-
 .../catalina/core/ApplicationFilterConfig.java |  8 +-
 .../catalina/core/ApplicationFilterFactory.java|  8 +-
 .../core/ApplicationFilterRegistration.java| 10 +--
 .../catalina/core/ApplicationHttpRequest.java  | 20 ++---
 java/org/apache/catalina/core/ApplicationPart.java |  2 +-
 .../catalina/core/ApplicationPushBuilder.java  |  8 +-
 .../apache/catalina/core/ApplicationRequest.java   | 14 ++--
 .../core/ApplicationServletRegistration.java   | 10 +--
 .../org/apache/catalina/core/AsyncContextImpl.java |  4 +-
 java/org/apache/catalina/core/ContainerBase.java   |  2 +-
 .../catalina/core/ContextNamingInfoListener.java   | 13 ++--
 .../catalina/core/DefaultInstanceManager.java  | 38 +-
 .../core/JreMemoryLeakPreventionListener.java  | 12 +--
 .../catalina/core/NamingContextListener.java   | 12 +--
 java/org/apache/catalina/core/StandardContext.java | 86 +++---
 java/org/apache/catalina/core/StandardHost.java|  4 +-
 java/org/apache/catalina/core/StandardWrapper.java |  4 +-
 21 files changed, 155 insertions(+), 152 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationContext.java 
b/java/org/apache/catalina/core/ApplicationContext.java
index 7abd09995d..1e33f41dbd 100644
--- a/java/org/apache/catalina/core/ApplicationContext.java
+++ b/java/org/apache/catalina/core/ApplicationContext.java
@@ -95,8 +95,8 @@ public class ApplicationContext implements ServletContext {
 static {
 STRICT_SERVLET_COMPLIANCE = Globals.STRICT_SERVLET_COMPLIANCE;
 
-String requireSlash = System
-
.getProperty("org.apache.catalina.core.ApplicationContext.GET_RESOURCE_REQUIRE_SLASH");
+String requireSlash =
+
System.getProperty("org.apache.catalina.core.ApplicationContext.GET_RESOURCE_REQUIRE_SLASH");
 if (requireSlash == null) {
 GET_RESOURCE_REQUIRE_SLASH = STRICT_SERVLET_COMPLIANCE;
 } else {
@@ -129,13 +129,13 @@ public class ApplicationContext implements ServletContext 
{
 /**
  * The context attributes for this context.
  */
-protected Map attributes = new ConcurrentHashMap<>();
+protected Map attributes = new ConcurrentHashMap<>();
 
 
 /**
  * List of read only attributes for this context.
  */
-private final Map readOnlyAttributes = new 
ConcurrentHashMap<>();
+private final Map readOnlyAttributes = new 
ConcurrentHashMap<>();
 
 
 /**
@@ -171,7 +171,7 @@ public class ApplicationContext implements ServletContext {
 /**
  * The merged context initialization parameters for this Context.
  */
-private final ConcurrentMap parameters = new 
ConcurrentHashMap<>();
+private final ConcurrentMap parameters = new 
ConcurrentHashMap<>();
 
 
 /**
@@ -854,7 +854,7 @@ public class ApplicationContext implements ServletContext {
 }
 
 String jspServletClassName = null;
-Map jspFileInitParams = new HashMap<>();
+Map jspFileInitParams = new HashMap<>();
 
 Wrapper jspServlet = (Wrapper) context.findChild("jsp");
 
@@ -881,7 +881,7 @@ public class ApplicationContext implements ServletContext {
 
 
 private ServletRegistration.Dynamic addServlet(String servletName, String 
servletClass, Servlet servlet,
-Map initParams) throws IllegalStateException {
+Map initParams) throws IllegalStateException {
 
 if (servletName == null || servletName.equals("")) {
 throw new 
IllegalArgumentException(sm.getString("applicationContext.invalidServletName", 
servletName));
@@ -924,7 +924,7 @@ public class ApplicationContext implements ServletContext {
 }
 
 if (initParams != null) {
-for (Map.Entry initParam : initParams.entrySet()) {
+for (Map.Entry initParam : initParams.entrySet()) {
 wrapper.addInitParameter(initParam.getKey(), 
initParam.getValue());
 }
 }
@@ -1191,8 +1191,8 @@ public class ApplicationContext implements ServletContext 
{
 
 
 @Override
-public Map getFilterRegistrations() {
-Map result = new HashMap<>();
+public Map getFilterRegistrations() {
+Map result = new HashMap<>();
 
 FilterDef[] filterDefs = context.findFilterDefs();
 for (FilterDef filterDef : filterDefs) {
@@ -1210,8 +1210,8 @@ public class ApplicationContext 

[tomcat] 01/03: Code clean-up - formatting. No functional change.

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

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

commit eb2c56ed3320cc0a3925ee3949b3bb000cb80e75
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:19:32 2023 +0100

Code clean-up - formatting. No functional change.
---
 java/org/apache/tomcat/util/http/FastHttpDateFormat.java | 12 ++--
 java/org/apache/tomcat/util/http/HttpMessages.java   |  6 +++---
 java/org/apache/tomcat/util/http/LegacyCookieProcessor.java  |  8 
 java/org/apache/tomcat/util/http/Parameters.java |  8 
 java/org/apache/tomcat/util/http/Rfc6265CookieProcessor.java |  4 ++--
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index 6c941c984e..cbb7be9151 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -35,8 +35,8 @@ public final class FastHttpDateFormat {
 // -- Variables
 
 
-private static final int CACHE_SIZE = Integer
-
.getInteger("org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE", 
1000).intValue();
+private static final int CACHE_SIZE =
+
Integer.getInteger("org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE", 
1000).intValue();
 
 
 /**
@@ -66,8 +66,8 @@ public final class FastHttpDateFormat {
 FORMAT_OBSOLETE_RFC850 = new 
ConcurrentDateFormat(DATE_OBSOLETE_RFC850, Locale.US, tz);
 FORMAT_OBSOLETE_ASCTIME = new 
ConcurrentDateFormat(DATE_OBSOLETE_ASCTIME, Locale.US, tz);
 
-httpParseFormats = new ConcurrentDateFormat[] { FORMAT_RFC5322, 
FORMAT_OBSOLETE_RFC850,
-FORMAT_OBSOLETE_ASCTIME };
+httpParseFormats =
+new ConcurrentDateFormat[] { FORMAT_RFC5322, 
FORMAT_OBSOLETE_RFC850, FORMAT_OBSOLETE_ASCTIME };
 }
 
 /**
@@ -85,13 +85,13 @@ public final class FastHttpDateFormat {
 /**
  * Formatter cache.
  */
-private static final Map formatCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
+private static final Map formatCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
 
 
 /**
  * Parser cache.
  */
-private static final Map parseCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
+private static final Map parseCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
 
 
 // - Public Methods
diff --git a/java/org/apache/tomcat/util/http/HttpMessages.java 
b/java/org/apache/tomcat/util/http/HttpMessages.java
index dee85c18fd..816b0e9cb5 100644
--- a/java/org/apache/tomcat/util/http/HttpMessages.java
+++ b/java/org/apache/tomcat/util/http/HttpMessages.java
@@ -33,10 +33,10 @@ import org.apache.tomcat.util.res.StringManager;
  */
 public class HttpMessages {
 
-private static final Map instances = new 
ConcurrentHashMap<>();
+private static final Map instances = new 
ConcurrentHashMap<>();
 
-private static final HttpMessages DEFAULT = new HttpMessages(
-StringManager.getManager("org.apache.tomcat.util.http.res", 
Locale.getDefault()));
+private static final HttpMessages DEFAULT =
+new 
HttpMessages(StringManager.getManager("org.apache.tomcat.util.http.res", 
Locale.getDefault()));
 
 
 // XXX move message resources in this package
diff --git a/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java 
b/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
index d41b829ae3..6494ba75f1 100644
--- a/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
+++ b/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
@@ -52,8 +52,8 @@ public final class LegacyCookieProcessor extends 
CookieProcessorBase {
 
 // Excludes '/' since configuration controls whether or not to treat '/' as
 // a separator
-private static final char[] HTTP_SEPARATORS = new char[] { '\t', ' ', 
'\"', '(', ')', ',', ':', ';', '<', '=', '>',
-'?', '@', '[', '\\', ']', '{', '}' };
+private static final char[] HTTP_SEPARATORS =
+new char[] { '\t', ' ', '\"', '(', ')', ',', ':', ';', '<', '=', 
'>', '?', '@', '[', '\\', ']', '{', '}' };
 
 static {
 for (char c : V0_SEPARATORS) {
@@ -61,8 +61,8 @@ public final class LegacyCookieProcessor extends 
CookieProcessorBase {
 }
 }
 
-private final boolean STRICT_SERVLET_COMPLIANCE = Boolean
-.getBoolean("org.apache.catalina.STRICT_SERVLET_COMPLIANCE");
+private final boolean STRICT_SERVLET_COMPLIANCE =
+
Boolean.getBoolean("org.apache.catalina.STRICT_SERVLET_COMPLIANCE");
 
 private boolean allowEqualsInValue = false;
 
diff --git a/java/org/apache/tomcat/util/http/Parameters.java 

[tomcat] 03/03: Code clean-up - formatting. No functional change.

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

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

commit 2d1ade5ac3a2549d567dbb1d53c24d87522ceec9
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:18:44 2023 +0100

Code clean-up - formatting. No functional change.
---
 test/org/apache/jasper/compiler/Dumper.java| 20 +++--
 .../jasper/compiler/TestAttributeParser.java   | 39 --
 test/org/apache/jasper/compiler/TestCompiler.java  | 41 ---
 .../jasper/compiler/TestELInterpreterFactory.java  |  8 +-
 test/org/apache/jasper/compiler/TestELParser.java  | 26 +++
 .../jasper/compiler/TestEncodingDetector.java  | 39 +-
 test/org/apache/jasper/compiler/TestGenerator.java | 60 ++-
 test/org/apache/jasper/compiler/TestJspConfig.java | 24 ++
 .../jasper/compiler/TestJspDocumentParser.java | 19 ++---
 test/org/apache/jasper/compiler/TestJspReader.java |  3 +-
 test/org/apache/jasper/compiler/TestJspUtil.java   |  2 +-
 .../compiler/TestJspUtilMakeJavaPackage.java   | 26 +++
 test/org/apache/jasper/compiler/TestNode.java  |  4 +-
 .../jasper/compiler/TestNodeIntegration.java   |  6 +-
 test/org/apache/jasper/compiler/TestParser.java| 86 --
 .../compiler/TestParserNoStrictWhitespace.java | 23 ++
 .../jasper/compiler/TestScriptingVariabler.java|  5 +-
 .../apache/jasper/compiler/TestSmapStratum.java|  2 +
 .../jasper/compiler/TestTagLibraryInfoImpl.java|  6 +-
 .../jasper/compiler/TestTagPluginManager.java  | 15 ++--
 test/org/apache/jasper/compiler/TestValidator.java | 45 ---
 .../apache/jasper/compiler/TesterValidator.java| 15 ++--
 22 files changed, 195 insertions(+), 319 deletions(-)

diff --git a/test/org/apache/jasper/compiler/Dumper.java 
b/test/org/apache/jasper/compiler/Dumper.java
index 9bc49170c6..d05172499f 100644
--- a/test/org/apache/jasper/compiler/Dumper.java
+++ b/test/org/apache/jasper/compiler/Dumper.java
@@ -26,13 +26,12 @@ class Dumper {
 
 private String getAttributes(Attributes attrs) {
 if (attrs == null) {
-  return "";
+return "";
 }
 
 StringBuilder buf = new StringBuilder();
-for (int i=0; i < attrs.getLength(); i++) {
-buf.append(" " + attrs.getQName(i) + "=\""
-   + attrs.getValue(i) + "\"");
+for (int i = 0; i < attrs.getLength(); i++) {
+buf.append(" " + attrs.getQName(i) + "=\"" + attrs.getValue(i) 
+ "\"");
 }
 return buf.toString();
 }
@@ -51,17 +50,16 @@ class Dumper {
 }
 }
 
-private void printAttributes(String prefix, Attributes attrs,
- String suffix) {
+private void printAttributes(String prefix, Attributes attrs, String 
suffix) {
 printString(prefix, getAttributes(attrs), suffix);
 }
 
 private void dumpBody(Node n) throws JasperException {
 Node.Nodes page = n.getBody();
 if (page != null) {
-//indent++;
+// indent++;
 page.visit(this);
-//indent--;
+// indent--;
 }
 }
 
@@ -171,7 +169,7 @@ class Dumper {
 
 @Override
 public void visit(Node.ELExpression n) throws JasperException {
-printString( "${" + n.getText() + "}" );
+printString("${" + n.getText() + "}");
 }
 
 @Override
@@ -184,7 +182,7 @@ class Dumper {
 @Override
 public void visit(Node.UninterpretedTag n) throws JasperException {
 String tag = n.getQName();
-printAttributes("<"+tag, n.getAttributes(), ">");
+printAttributes("<" + tag, n.getAttributes(), ">");
 dumpBody(n);
 printString("");
 }
@@ -195,7 +193,7 @@ class Dumper {
 }
 
 private void printIndent() {
-for (int i=0; i < indent; i++) {
+for (int i = 0; i < indent; i++) {
 System.out.print("  ");
 }
 }
diff --git a/test/org/apache/jasper/compiler/TestAttributeParser.java 
b/test/org/apache/jasper/compiler/TestAttributeParser.java
index 5bba8588da..df0e01d770 100644
--- a/test/org/apache/jasper/compiler/TestAttributeParser.java
+++ b/test/org/apache/jasper/compiler/TestAttributeParser.java
@@ -26,14 +26,13 @@ import org.apache.el.TesterFunctions;
 import org.apache.jasper.el.ELContextImpl;
 
 /**
- * Test the EL processing from JSP attributes. Similar tests may be found in
- * {@link org.apache.el.TestELEvaluation} and {@link 
org.apache.el.TestELInJsp}.
+ * Test the EL processing from JSP attributes. Similar tests may be found in 
{@link org.apache.el.TestELEvaluation} and
+ * {@link org.apache.el.TestELInJsp}.
  */
 public class 

[tomcat] 01/03: Code clean-up - formatting. No functional change.

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

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

commit e664967cafc80e9580202280e89693857e353294
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:17:24 2023 +0100

Code clean-up - formatting. No functional change.
---
 java/org/apache/tomcat/util/http/FastHttpDateFormat.java | 12 ++--
 java/org/apache/tomcat/util/http/LegacyCookieProcessor.java  |  8 
 java/org/apache/tomcat/util/http/Parameters.java |  8 
 java/org/apache/tomcat/util/http/Rfc6265CookieProcessor.java |  4 ++--
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index 6c941c984e..cbb7be9151 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -35,8 +35,8 @@ public final class FastHttpDateFormat {
 // -- Variables
 
 
-private static final int CACHE_SIZE = Integer
-
.getInteger("org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE", 
1000).intValue();
+private static final int CACHE_SIZE =
+
Integer.getInteger("org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE", 
1000).intValue();
 
 
 /**
@@ -66,8 +66,8 @@ public final class FastHttpDateFormat {
 FORMAT_OBSOLETE_RFC850 = new 
ConcurrentDateFormat(DATE_OBSOLETE_RFC850, Locale.US, tz);
 FORMAT_OBSOLETE_ASCTIME = new 
ConcurrentDateFormat(DATE_OBSOLETE_ASCTIME, Locale.US, tz);
 
-httpParseFormats = new ConcurrentDateFormat[] { FORMAT_RFC5322, 
FORMAT_OBSOLETE_RFC850,
-FORMAT_OBSOLETE_ASCTIME };
+httpParseFormats =
+new ConcurrentDateFormat[] { FORMAT_RFC5322, 
FORMAT_OBSOLETE_RFC850, FORMAT_OBSOLETE_ASCTIME };
 }
 
 /**
@@ -85,13 +85,13 @@ public final class FastHttpDateFormat {
 /**
  * Formatter cache.
  */
-private static final Map formatCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
+private static final Map formatCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
 
 
 /**
  * Parser cache.
  */
-private static final Map parseCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
+private static final Map parseCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
 
 
 // - Public Methods
diff --git a/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java 
b/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
index 55656306c4..5e622d8f2f 100644
--- a/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
+++ b/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
@@ -52,8 +52,8 @@ public final class LegacyCookieProcessor extends 
CookieProcessorBase {
 
 // Excludes '/' since configuration controls whether or not to treat '/' as
 // a separator
-private static final char[] HTTP_SEPARATORS = new char[] { '\t', ' ', 
'\"', '(', ')', ',', ':', ';', '<', '=', '>',
-'?', '@', '[', '\\', ']', '{', '}' };
+private static final char[] HTTP_SEPARATORS =
+new char[] { '\t', ' ', '\"', '(', ')', ',', ':', ';', '<', '=', 
'>', '?', '@', '[', '\\', ']', '{', '}' };
 
 static {
 for (char c : V0_SEPARATORS) {
@@ -61,8 +61,8 @@ public final class LegacyCookieProcessor extends 
CookieProcessorBase {
 }
 }
 
-private final boolean STRICT_SERVLET_COMPLIANCE = Boolean
-.getBoolean("org.apache.catalina.STRICT_SERVLET_COMPLIANCE");
+private final boolean STRICT_SERVLET_COMPLIANCE =
+
Boolean.getBoolean("org.apache.catalina.STRICT_SERVLET_COMPLIANCE");
 
 private boolean allowEqualsInValue = false;
 
diff --git a/java/org/apache/tomcat/util/http/Parameters.java 
b/java/org/apache/tomcat/util/http/Parameters.java
index debf968acf..e56793b3de 100644
--- a/java/org/apache/tomcat/util/http/Parameters.java
+++ b/java/org/apache/tomcat/util/http/Parameters.java
@@ -44,7 +44,7 @@ public final class Parameters {
 
 private static final StringManager sm = 
StringManager.getManager("org.apache.tomcat.util.http");
 
-private final Map> paramHashValues = new 
LinkedHashMap<>();
+private final Map> paramHashValues = new 
LinkedHashMap<>();
 private boolean didQueryParameters = false;
 
 private MessageBytes queryMB;
@@ -418,8 +418,8 @@ public final class Parameters {
 } else if (log.isInfoEnabled()) {
 UserDataHelper.Mode logMode = 
userDataLog.getNextMode();
 if (logMode != null) {
-String message = 
sm.getString("parameters.decodeFail.info", tmpName.toString(),
-tmpValue.toString());
+String 

[tomcat] 02/03: Code clean-up - formatting. No functional change.

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

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

commit bd84d912bfa00e63ddd98baf3934e5fd1a320224
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:17:47 2023 +0100

Code clean-up - formatting. No functional change.
---
 .../apache/catalina/core/ApplicationContext.java   | 24 +++---
 .../catalina/core/ApplicationContextFacade.java| 12 +--
 .../catalina/core/ApplicationDispatcher.java   |  8 +-
 .../catalina/core/ApplicationFilterChain.java  |  8 +-
 .../catalina/core/ApplicationFilterConfig.java |  6 +-
 .../catalina/core/ApplicationFilterFactory.java|  8 +-
 .../core/ApplicationFilterRegistration.java| 10 +--
 .../catalina/core/ApplicationHttpRequest.java  | 20 ++---
 java/org/apache/catalina/core/ApplicationPart.java |  2 +-
 .../catalina/core/ApplicationPushBuilder.java  |  8 +-
 .../apache/catalina/core/ApplicationRequest.java   | 16 ++--
 .../core/ApplicationServletRegistration.java   | 10 +--
 .../org/apache/catalina/core/AsyncContextImpl.java |  4 +-
 java/org/apache/catalina/core/ContainerBase.java   |  2 +-
 .../catalina/core/ContextNamingInfoListener.java   | 13 ++--
 .../catalina/core/DefaultInstanceManager.java  | 38 +-
 .../apache/catalina/core/FrameworkListener.java|  2 +-
 .../core/JreMemoryLeakPreventionListener.java  | 12 +--
 .../catalina/core/NamingContextListener.java   | 12 +--
 java/org/apache/catalina/core/StandardContext.java | 86 +++---
 java/org/apache/catalina/core/StandardHost.java|  8 +-
 java/org/apache/catalina/core/StandardServer.java  |  9 +--
 java/org/apache/catalina/core/StandardWrapper.java |  4 +-
 23 files changed, 162 insertions(+), 160 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationContext.java 
b/java/org/apache/catalina/core/ApplicationContext.java
index d3adceb4d7..409018243d 100644
--- a/java/org/apache/catalina/core/ApplicationContext.java
+++ b/java/org/apache/catalina/core/ApplicationContext.java
@@ -95,8 +95,8 @@ public class ApplicationContext implements ServletContext {
 static {
 STRICT_SERVLET_COMPLIANCE = Globals.STRICT_SERVLET_COMPLIANCE;
 
-String requireSlash = System
-
.getProperty("org.apache.catalina.core.ApplicationContext.GET_RESOURCE_REQUIRE_SLASH");
+String requireSlash =
+
System.getProperty("org.apache.catalina.core.ApplicationContext.GET_RESOURCE_REQUIRE_SLASH");
 if (requireSlash == null) {
 GET_RESOURCE_REQUIRE_SLASH = STRICT_SERVLET_COMPLIANCE;
 } else {
@@ -129,13 +129,13 @@ public class ApplicationContext implements ServletContext 
{
 /**
  * The context attributes for this context.
  */
-protected Map attributes = new ConcurrentHashMap<>();
+protected Map attributes = new ConcurrentHashMap<>();
 
 
 /**
  * List of read only attributes for this context.
  */
-private final Map readOnlyAttributes = new 
ConcurrentHashMap<>();
+private final Map readOnlyAttributes = new 
ConcurrentHashMap<>();
 
 
 /**
@@ -171,7 +171,7 @@ public class ApplicationContext implements ServletContext {
 /**
  * The merged context initialization parameters for this Context.
  */
-private final Map parameters = new ConcurrentHashMap<>();
+private final Map parameters = new ConcurrentHashMap<>();
 
 
 /**
@@ -855,7 +855,7 @@ public class ApplicationContext implements ServletContext {
 }
 
 String jspServletClassName = null;
-Map jspFileInitParams = new HashMap<>();
+Map jspFileInitParams = new HashMap<>();
 
 Wrapper jspServlet = (Wrapper) context.findChild("jsp");
 
@@ -882,7 +882,7 @@ public class ApplicationContext implements ServletContext {
 
 
 private ServletRegistration.Dynamic addServlet(String servletName, String 
servletClass, Servlet servlet,
-Map initParams) throws IllegalStateException {
+Map initParams) throws IllegalStateException {
 
 if (servletName == null || servletName.equals("")) {
 throw new 
IllegalArgumentException(sm.getString("applicationContext.invalidServletName", 
servletName));
@@ -925,7 +925,7 @@ public class ApplicationContext implements ServletContext {
 }
 
 if (initParams != null) {
-for (Map.Entry initParam : initParams.entrySet()) {
+for (Map.Entry initParam : initParams.entrySet()) {
 wrapper.addInitParameter(initParam.getKey(), 
initParam.getValue());
 }
 }
@@ -1192,8 +1192,8 @@ public class ApplicationContext implements ServletContext 
{
 
 
 @Override
-public Map getFilterRegistrations() {
-Map result = new HashMap<>();
+public Map getFilterRegistrations() {
+Map result = new HashMap<>();
 
 FilterDef[] filterDefs = context.findFilterDefs();

[tomcat] branch 9.0.x updated (b0f0377b47 -> 2d1ade5ac3)

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

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


from b0f0377b47 Fix copy/paste error & simplify
 new e664967caf Code clean-up - formatting. No functional change.
 new bd84d912bf Code clean-up - formatting. No functional change.
 new 2d1ade5ac3 Code clean-up - formatting. No functional change.

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


Summary of changes:
 .../apache/catalina/core/ApplicationContext.java   | 24 +++---
 .../catalina/core/ApplicationContextFacade.java| 12 +--
 .../catalina/core/ApplicationDispatcher.java   |  8 +-
 .../catalina/core/ApplicationFilterChain.java  |  8 +-
 .../catalina/core/ApplicationFilterConfig.java |  6 +-
 .../catalina/core/ApplicationFilterFactory.java|  8 +-
 .../core/ApplicationFilterRegistration.java| 10 +--
 .../catalina/core/ApplicationHttpRequest.java  | 20 ++---
 java/org/apache/catalina/core/ApplicationPart.java |  2 +-
 .../catalina/core/ApplicationPushBuilder.java  |  8 +-
 .../apache/catalina/core/ApplicationRequest.java   | 16 ++--
 .../core/ApplicationServletRegistration.java   | 10 +--
 .../org/apache/catalina/core/AsyncContextImpl.java |  4 +-
 java/org/apache/catalina/core/ContainerBase.java   |  2 +-
 .../catalina/core/ContextNamingInfoListener.java   | 13 ++--
 .../catalina/core/DefaultInstanceManager.java  | 38 +-
 .../apache/catalina/core/FrameworkListener.java|  2 +-
 .../core/JreMemoryLeakPreventionListener.java  | 12 +--
 .../catalina/core/NamingContextListener.java   | 12 +--
 java/org/apache/catalina/core/StandardContext.java | 86 +++---
 java/org/apache/catalina/core/StandardHost.java|  8 +-
 java/org/apache/catalina/core/StandardServer.java  |  9 +--
 java/org/apache/catalina/core/StandardWrapper.java |  4 +-
 .../tomcat/util/http/FastHttpDateFormat.java   | 12 +--
 .../tomcat/util/http/LegacyCookieProcessor.java|  8 +-
 java/org/apache/tomcat/util/http/Parameters.java   |  8 +-
 .../tomcat/util/http/Rfc6265CookieProcessor.java   |  4 +-
 test/org/apache/jasper/compiler/Dumper.java| 20 +++--
 .../jasper/compiler/TestAttributeParser.java   | 39 --
 test/org/apache/jasper/compiler/TestCompiler.java  | 41 ---
 .../jasper/compiler/TestELInterpreterFactory.java  |  8 +-
 test/org/apache/jasper/compiler/TestELParser.java  | 26 +++
 .../jasper/compiler/TestEncodingDetector.java  | 39 +-
 test/org/apache/jasper/compiler/TestGenerator.java | 60 ++-
 test/org/apache/jasper/compiler/TestJspConfig.java | 24 ++
 .../jasper/compiler/TestJspDocumentParser.java | 19 ++---
 test/org/apache/jasper/compiler/TestJspReader.java |  3 +-
 test/org/apache/jasper/compiler/TestJspUtil.java   |  2 +-
 .../compiler/TestJspUtilMakeJavaPackage.java   | 26 +++
 test/org/apache/jasper/compiler/TestNode.java  |  4 +-
 .../jasper/compiler/TestNodeIntegration.java   |  6 +-
 test/org/apache/jasper/compiler/TestParser.java| 86 --
 .../compiler/TestParserNoStrictWhitespace.java | 23 ++
 .../jasper/compiler/TestScriptingVariabler.java|  5 +-
 .../apache/jasper/compiler/TestSmapStratum.java|  2 +
 .../jasper/compiler/TestTagLibraryInfoImpl.java|  6 +-
 .../jasper/compiler/TestTagPluginManager.java  | 15 ++--
 test/org/apache/jasper/compiler/TestValidator.java | 45 ---
 .../apache/jasper/compiler/TesterValidator.java| 15 ++--
 49 files changed, 373 insertions(+), 495 deletions(-)


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



[tomcat] 01/04: Code clean-up - formatting. No functional change.

2023-06-14 Thread markt
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 866e44ee4bbd0209c5e061aa2542703761af734e
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:14:52 2023 +0100

Code clean-up - formatting. No functional change.
---
 java/org/apache/tomcat/util/http/FastHttpDateFormat.java | 12 ++--
 java/org/apache/tomcat/util/http/Parameters.java |  8 
 java/org/apache/tomcat/util/http/Rfc6265CookieProcessor.java |  6 +++---
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index f33aa851a3..f48913bad8 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -34,8 +34,8 @@ public final class FastHttpDateFormat {
 // -- Variables
 
 
-private static final int CACHE_SIZE = Integer
-
.getInteger("org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE", 
1000).intValue();
+private static final int CACHE_SIZE =
+
Integer.getInteger("org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE", 
1000).intValue();
 
 
 // HTTP date formats
@@ -57,8 +57,8 @@ public final class FastHttpDateFormat {
 FORMAT_OBSOLETE_RFC850 = new 
ConcurrentDateFormat(DATE_OBSOLETE_RFC850, Locale.US, tz);
 FORMAT_OBSOLETE_ASCTIME = new 
ConcurrentDateFormat(DATE_OBSOLETE_ASCTIME, Locale.US, tz);
 
-httpParseFormats = new ConcurrentDateFormat[] { FORMAT_RFC5322, 
FORMAT_OBSOLETE_RFC850,
-FORMAT_OBSOLETE_ASCTIME };
+httpParseFormats =
+new ConcurrentDateFormat[] { FORMAT_RFC5322, 
FORMAT_OBSOLETE_RFC850, FORMAT_OBSOLETE_ASCTIME };
 }
 
 /**
@@ -76,13 +76,13 @@ public final class FastHttpDateFormat {
 /**
  * Formatter cache.
  */
-private static final Map formatCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
+private static final Map formatCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
 
 
 /**
  * Parser cache.
  */
-private static final Map parseCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
+private static final Map parseCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
 
 
 // - Public Methods
diff --git a/java/org/apache/tomcat/util/http/Parameters.java 
b/java/org/apache/tomcat/util/http/Parameters.java
index debf968acf..e56793b3de 100644
--- a/java/org/apache/tomcat/util/http/Parameters.java
+++ b/java/org/apache/tomcat/util/http/Parameters.java
@@ -44,7 +44,7 @@ public final class Parameters {
 
 private static final StringManager sm = 
StringManager.getManager("org.apache.tomcat.util.http");
 
-private final Map> paramHashValues = new 
LinkedHashMap<>();
+private final Map> paramHashValues = new 
LinkedHashMap<>();
 private boolean didQueryParameters = false;
 
 private MessageBytes queryMB;
@@ -418,8 +418,8 @@ public final class Parameters {
 } else if (log.isInfoEnabled()) {
 UserDataHelper.Mode logMode = 
userDataLog.getNextMode();
 if (logMode != null) {
-String message = 
sm.getString("parameters.decodeFail.info", tmpName.toString(),
-tmpValue.toString());
+String message =
+sm.getString("parameters.decodeFail.info", 
tmpName.toString(), tmpValue.toString());
 switch (logMode) {
 case INFO_THEN_DEBUG:
 message += 
sm.getString("parameters.fallToDebug");
@@ -487,7 +487,7 @@ public final class Parameters {
 @Override
 public String toString() {
 StringBuilder sb = new StringBuilder();
-for (Map.Entry> e : 
paramHashValues.entrySet()) {
+for (Map.Entry> e : 
paramHashValues.entrySet()) {
 sb.append(e.getKey()).append('=');
 StringUtils.join(e.getValue(), ',', sb);
 sb.append('\n');
diff --git a/java/org/apache/tomcat/util/http/Rfc6265CookieProcessor.java 
b/java/org/apache/tomcat/util/http/Rfc6265CookieProcessor.java
index 32440dad4e..fc4e5cbe8a 100644
--- a/java/org/apache/tomcat/util/http/Rfc6265CookieProcessor.java
+++ b/java/org/apache/tomcat/util/http/Rfc6265CookieProcessor.java
@@ -38,8 +38,8 @@ public class Rfc6265CookieProcessor extends 
CookieProcessorBase {
 
 private static final Log log = 
LogFactory.getLog(Rfc6265CookieProcessor.class);
 
-private static final StringManager sm = StringManager
-.getManager(Rfc6265CookieProcessor.class.getPackage().getName());
+private static final StringManager sm =
+ 

[tomcat] 02/04: Code clean-up - formatting. No functional change.

2023-06-14 Thread markt
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 38b2243ef277b52339cabb3dd808013400a4b8a2
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:15:09 2023 +0100

Code clean-up - formatting. No functional change.
---
 .../apache/catalina/core/ApplicationContext.java   | 20 ++---
 .../catalina/core/ApplicationContextFacade.java| 12 +--
 .../catalina/core/ApplicationDispatcher.java   |  8 +-
 .../catalina/core/ApplicationFilterChain.java  |  8 +-
 .../catalina/core/ApplicationFilterConfig.java |  6 +-
 .../catalina/core/ApplicationFilterFactory.java|  8 +-
 .../core/ApplicationFilterRegistration.java| 10 +--
 .../catalina/core/ApplicationHttpRequest.java  | 20 ++---
 java/org/apache/catalina/core/ApplicationPart.java |  2 +-
 .../catalina/core/ApplicationPushBuilder.java  |  8 +-
 .../apache/catalina/core/ApplicationRequest.java   | 16 ++--
 .../core/ApplicationServletRegistration.java   | 10 +--
 .../core/ApplicationSessionCookieConfig.java   |  6 +-
 .../org/apache/catalina/core/AsyncContextImpl.java |  4 +-
 java/org/apache/catalina/core/ContainerBase.java   |  2 +-
 .../catalina/core/ContextNamingInfoListener.java   | 13 ++--
 .../catalina/core/DefaultInstanceManager.java  | 38 +-
 .../apache/catalina/core/FrameworkListener.java|  2 +-
 .../core/JreMemoryLeakPreventionListener.java  |  5 +-
 .../catalina/core/NamingContextListener.java   | 12 +--
 java/org/apache/catalina/core/StandardContext.java | 86 +++---
 java/org/apache/catalina/core/StandardHost.java|  8 +-
 java/org/apache/catalina/core/StandardServer.java  |  9 +--
 java/org/apache/catalina/core/StandardWrapper.java |  4 +-
 24 files changed, 159 insertions(+), 158 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationContext.java 
b/java/org/apache/catalina/core/ApplicationContext.java
index de2fd12cd7..691ce5acc6 100644
--- a/java/org/apache/catalina/core/ApplicationContext.java
+++ b/java/org/apache/catalina/core/ApplicationContext.java
@@ -113,13 +113,13 @@ public class ApplicationContext implements ServletContext 
{
 /**
  * The context attributes for this context.
  */
-protected Map attributes = new ConcurrentHashMap<>();
+protected Map attributes = new ConcurrentHashMap<>();
 
 
 /**
  * List of read only attributes for this context.
  */
-private final Map readOnlyAttributes = new 
ConcurrentHashMap<>();
+private final Map readOnlyAttributes = new 
ConcurrentHashMap<>();
 
 
 /**
@@ -143,7 +143,7 @@ public class ApplicationContext implements ServletContext {
 /**
  * The merged context initialization parameters for this Context.
  */
-private final Map parameters = new ConcurrentHashMap<>();
+private final Map parameters = new ConcurrentHashMap<>();
 
 
 /**
@@ -799,7 +799,7 @@ public class ApplicationContext implements ServletContext {
 }
 
 String jspServletClassName = null;
-Map jspFileInitParams = new HashMap<>();
+Map jspFileInitParams = new HashMap<>();
 
 Wrapper jspServlet = (Wrapper) context.findChild("jsp");
 
@@ -826,7 +826,7 @@ public class ApplicationContext implements ServletContext {
 
 
 private ServletRegistration.Dynamic addServlet(String servletName, String 
servletClass, Servlet servlet,
-Map initParams) throws IllegalStateException {
+Map initParams) throws IllegalStateException {
 
 if (servletName == null || servletName.equals("")) {
 throw new 
IllegalArgumentException(sm.getString("applicationContext.invalidServletName", 
servletName));
@@ -869,7 +869,7 @@ public class ApplicationContext implements ServletContext {
 }
 
 if (initParams != null) {
-for (Map.Entry initParam : initParams.entrySet()) {
+for (Map.Entry initParam : initParams.entrySet()) {
 wrapper.addInitParameter(initParam.getKey(), 
initParam.getValue());
 }
 }
@@ -1136,8 +1136,8 @@ public class ApplicationContext implements ServletContext 
{
 
 
 @Override
-public Map getFilterRegistrations() {
-Map result = new HashMap<>();
+public Map getFilterRegistrations() {
+Map result = new HashMap<>();
 
 FilterDef[] filterDefs = context.findFilterDefs();
 for (FilterDef filterDef : filterDefs) {
@@ -1155,8 +1155,8 @@ public class ApplicationContext implements ServletContext 
{
 
 
 @Override
-public Map 
getServletRegistrations() {
-Map result = new HashMap<>();
+public Map getServletRegistrations() 
{
+Map result = new HashMap<>();
 
 Container[] wrappers = context.findChildren();
 for (Container wrapper : wrappers) {
diff --git a/java/org/apache/catalina/core/ApplicationContextFacade.java 

[tomcat] 03/04: Code clean-up - formatting. No functional change.

2023-06-14 Thread markt
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 941633150e68644df5bfb023e33fc627de109927
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:15:26 2023 +0100

Code clean-up - formatting. No functional change.
---
 test/jakarta/servlet/TestSessionCookieConfig.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/jakarta/servlet/TestSessionCookieConfig.java 
b/test/jakarta/servlet/TestSessionCookieConfig.java
index 5faa6680ba..737c702f83 100644
--- a/test/jakarta/servlet/TestSessionCookieConfig.java
+++ b/test/jakarta/servlet/TestSessionCookieConfig.java
@@ -48,7 +48,7 @@ public class TestSessionCookieConfig extends TomcatBaseTest {
 Assert.assertTrue(responseHeaders.containsKey("Set-Cookie"));
 
 List setCookieHeaders = responseHeaders.get("Set-Cookie");
-Assert.assertEquals(1,  setCookieHeaders.size());
+Assert.assertEquals(1, setCookieHeaders.size());
 
 String setCookieHeader = setCookieHeaders.get(0);
 Assert.assertTrue(setCookieHeader.contains("; aaa=bbb"));


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



[tomcat] 04/04: Code clean-up - formatting. No functional change.

2023-06-14 Thread markt
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 872ad691eebc0e2e42302d8df5a5871aea0c2578
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:16:42 2023 +0100

Code clean-up - formatting. No functional change.
---
 test/org/apache/jasper/compiler/Dumper.java| 20 +++--
 .../jasper/compiler/TestAttributeParser.java   | 39 --
 test/org/apache/jasper/compiler/TestCompiler.java  | 41 --
 .../jasper/compiler/TestELInterpreterFactory.java  |  8 +-
 test/org/apache/jasper/compiler/TestELParser.java  | 26 +++
 .../jasper/compiler/TestEncodingDetector.java  | 39 +-
 test/org/apache/jasper/compiler/TestGenerator.java | 60 +--
 test/org/apache/jasper/compiler/TestJspConfig.java | 36 -
 .../jasper/compiler/TestJspDocumentParser.java | 17 ++---
 test/org/apache/jasper/compiler/TestJspReader.java |  3 +-
 test/org/apache/jasper/compiler/TestJspUtil.java   |  2 +-
 .../compiler/TestJspUtilMakeJavaPackage.java   | 26 +++
 test/org/apache/jasper/compiler/TestNode.java  |  4 +-
 .../jasper/compiler/TestNodeIntegration.java   |  6 +-
 test/org/apache/jasper/compiler/TestParser.java| 89 --
 .../compiler/TestParserNoStrictWhitespace.java |  5 +-
 .../jasper/compiler/TestScriptingVariabler.java|  5 +-
 .../apache/jasper/compiler/TestSmapStratum.java|  2 +
 .../jasper/compiler/TestTagLibraryInfoImpl.java|  6 +-
 .../jasper/compiler/TestTagPluginManager.java  | 15 ++--
 test/org/apache/jasper/compiler/TestValidator.java | 57 +-
 .../apache/jasper/compiler/TesterValidator.java| 15 ++--
 22 files changed, 200 insertions(+), 321 deletions(-)

diff --git a/test/org/apache/jasper/compiler/Dumper.java 
b/test/org/apache/jasper/compiler/Dumper.java
index 9bc49170c6..d05172499f 100644
--- a/test/org/apache/jasper/compiler/Dumper.java
+++ b/test/org/apache/jasper/compiler/Dumper.java
@@ -26,13 +26,12 @@ class Dumper {
 
 private String getAttributes(Attributes attrs) {
 if (attrs == null) {
-  return "";
+return "";
 }
 
 StringBuilder buf = new StringBuilder();
-for (int i=0; i < attrs.getLength(); i++) {
-buf.append(" " + attrs.getQName(i) + "=\""
-   + attrs.getValue(i) + "\"");
+for (int i = 0; i < attrs.getLength(); i++) {
+buf.append(" " + attrs.getQName(i) + "=\"" + attrs.getValue(i) 
+ "\"");
 }
 return buf.toString();
 }
@@ -51,17 +50,16 @@ class Dumper {
 }
 }
 
-private void printAttributes(String prefix, Attributes attrs,
- String suffix) {
+private void printAttributes(String prefix, Attributes attrs, String 
suffix) {
 printString(prefix, getAttributes(attrs), suffix);
 }
 
 private void dumpBody(Node n) throws JasperException {
 Node.Nodes page = n.getBody();
 if (page != null) {
-//indent++;
+// indent++;
 page.visit(this);
-//indent--;
+// indent--;
 }
 }
 
@@ -171,7 +169,7 @@ class Dumper {
 
 @Override
 public void visit(Node.ELExpression n) throws JasperException {
-printString( "${" + n.getText() + "}" );
+printString("${" + n.getText() + "}");
 }
 
 @Override
@@ -184,7 +182,7 @@ class Dumper {
 @Override
 public void visit(Node.UninterpretedTag n) throws JasperException {
 String tag = n.getQName();
-printAttributes("<"+tag, n.getAttributes(), ">");
+printAttributes("<" + tag, n.getAttributes(), ">");
 dumpBody(n);
 printString("");
 }
@@ -195,7 +193,7 @@ class Dumper {
 }
 
 private void printIndent() {
-for (int i=0; i < indent; i++) {
+for (int i = 0; i < indent; i++) {
 System.out.print("  ");
 }
 }
diff --git a/test/org/apache/jasper/compiler/TestAttributeParser.java 
b/test/org/apache/jasper/compiler/TestAttributeParser.java
index 7164628332..286de767ab 100644
--- a/test/org/apache/jasper/compiler/TestAttributeParser.java
+++ b/test/org/apache/jasper/compiler/TestAttributeParser.java
@@ -26,14 +26,13 @@ import org.apache.el.TesterFunctions;
 import org.apache.jasper.el.ELContextImpl;
 
 /**
- * Test the EL processing from JSP attributes. Similar tests may be found in
- * {@link org.apache.el.TestELEvaluation} and {@link 
org.apache.el.TestELInJsp}.
+ * Test the EL processing from JSP attributes. Similar tests may be found in 
{@link org.apache.el.TestELEvaluation} and
+ * {@link org.apache.el.TestELInJsp}.
  */
 public class 

[tomcat] branch 10.1.x updated (8b55a6aa6b -> 872ad691ee)

2023-06-14 Thread markt
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 8b55a6aa6b Fix copy/paste error & simplify
 new 866e44ee4b Code clean-up - formatting. No functional change.
 new 38b2243ef2 Code clean-up - formatting. No functional change.
 new 941633150e Code clean-up - formatting. No functional change.
 new 872ad691ee 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:
 .../apache/catalina/core/ApplicationContext.java   | 20 ++---
 .../catalina/core/ApplicationContextFacade.java| 12 +--
 .../catalina/core/ApplicationDispatcher.java   |  8 +-
 .../catalina/core/ApplicationFilterChain.java  |  8 +-
 .../catalina/core/ApplicationFilterConfig.java |  6 +-
 .../catalina/core/ApplicationFilterFactory.java|  8 +-
 .../core/ApplicationFilterRegistration.java| 10 +--
 .../catalina/core/ApplicationHttpRequest.java  | 20 ++---
 java/org/apache/catalina/core/ApplicationPart.java |  2 +-
 .../catalina/core/ApplicationPushBuilder.java  |  8 +-
 .../apache/catalina/core/ApplicationRequest.java   | 16 ++--
 .../core/ApplicationServletRegistration.java   | 10 +--
 .../core/ApplicationSessionCookieConfig.java   |  6 +-
 .../org/apache/catalina/core/AsyncContextImpl.java |  4 +-
 java/org/apache/catalina/core/ContainerBase.java   |  2 +-
 .../catalina/core/ContextNamingInfoListener.java   | 13 ++--
 .../catalina/core/DefaultInstanceManager.java  | 38 -
 .../apache/catalina/core/FrameworkListener.java|  2 +-
 .../core/JreMemoryLeakPreventionListener.java  |  5 +-
 .../catalina/core/NamingContextListener.java   | 12 +--
 java/org/apache/catalina/core/StandardContext.java | 86 ++---
 java/org/apache/catalina/core/StandardHost.java|  8 +-
 java/org/apache/catalina/core/StandardServer.java  |  9 +--
 java/org/apache/catalina/core/StandardWrapper.java |  4 +-
 .../tomcat/util/http/FastHttpDateFormat.java   | 12 +--
 java/org/apache/tomcat/util/http/Parameters.java   |  8 +-
 .../tomcat/util/http/Rfc6265CookieProcessor.java   |  6 +-
 test/jakarta/servlet/TestSessionCookieConfig.java  |  2 +-
 test/org/apache/jasper/compiler/Dumper.java| 20 +++--
 .../jasper/compiler/TestAttributeParser.java   | 39 --
 test/org/apache/jasper/compiler/TestCompiler.java  | 41 --
 .../jasper/compiler/TestELInterpreterFactory.java  |  8 +-
 test/org/apache/jasper/compiler/TestELParser.java  | 26 +++
 .../jasper/compiler/TestEncodingDetector.java  | 39 +-
 test/org/apache/jasper/compiler/TestGenerator.java | 60 +--
 test/org/apache/jasper/compiler/TestJspConfig.java | 36 -
 .../jasper/compiler/TestJspDocumentParser.java | 17 ++---
 test/org/apache/jasper/compiler/TestJspReader.java |  3 +-
 test/org/apache/jasper/compiler/TestJspUtil.java   |  2 +-
 .../compiler/TestJspUtilMakeJavaPackage.java   | 26 +++
 test/org/apache/jasper/compiler/TestNode.java  |  4 +-
 .../jasper/compiler/TestNodeIntegration.java   |  6 +-
 test/org/apache/jasper/compiler/TestParser.java| 89 --
 .../compiler/TestParserNoStrictWhitespace.java |  5 +-
 .../jasper/compiler/TestScriptingVariabler.java|  5 +-
 .../apache/jasper/compiler/TestSmapStratum.java|  2 +
 .../jasper/compiler/TestTagLibraryInfoImpl.java|  6 +-
 .../jasper/compiler/TestTagPluginManager.java  | 15 ++--
 test/org/apache/jasper/compiler/TestValidator.java | 57 +-
 .../apache/jasper/compiler/TesterValidator.java| 15 ++--
 50 files changed, 373 insertions(+), 493 deletions(-)


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



[tomcat] 04/04: Code clean-up - formatting. No fucntional change.

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

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

commit 91365f8e27349c177bc0f7028c194aa62ffabfcb
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:05:27 2023 +0100

Code clean-up - formatting. No fucntional change.
---
 test/org/apache/jasper/compiler/Dumper.java| 20 +++--
 .../jasper/compiler/TestAttributeParser.java   | 39 --
 test/org/apache/jasper/compiler/TestCompiler.java  | 41 --
 .../jasper/compiler/TestELInterpreterFactory.java  |  8 +-
 test/org/apache/jasper/compiler/TestELParser.java  | 26 +++
 .../jasper/compiler/TestEncodingDetector.java  | 39 +-
 test/org/apache/jasper/compiler/TestGenerator.java | 60 +--
 test/org/apache/jasper/compiler/TestJspConfig.java | 36 -
 .../jasper/compiler/TestJspDocumentParser.java | 17 ++---
 test/org/apache/jasper/compiler/TestJspReader.java |  3 +-
 test/org/apache/jasper/compiler/TestJspUtil.java   |  2 +-
 .../compiler/TestJspUtilMakeJavaPackage.java   | 26 +++
 test/org/apache/jasper/compiler/TestNode.java  |  4 +-
 .../jasper/compiler/TestNodeIntegration.java   |  6 +-
 test/org/apache/jasper/compiler/TestParser.java| 89 --
 .../compiler/TestParserNoStrictWhitespace.java |  5 +-
 .../jasper/compiler/TestScriptingVariabler.java|  5 +-
 .../apache/jasper/compiler/TestSmapStratum.java|  2 +
 .../jasper/compiler/TestTagLibraryInfoImpl.java|  6 +-
 .../jasper/compiler/TestTagPluginManager.java  | 15 ++--
 test/org/apache/jasper/compiler/TestValidator.java | 57 +-
 .../apache/jasper/compiler/TesterValidator.java| 15 ++--
 22 files changed, 200 insertions(+), 321 deletions(-)

diff --git a/test/org/apache/jasper/compiler/Dumper.java 
b/test/org/apache/jasper/compiler/Dumper.java
index afa55bbaa3..b94811a6b5 100644
--- a/test/org/apache/jasper/compiler/Dumper.java
+++ b/test/org/apache/jasper/compiler/Dumper.java
@@ -26,13 +26,12 @@ class Dumper {
 
 private String getAttributes(Attributes attrs) {
 if (attrs == null) {
-  return "";
+return "";
 }
 
 StringBuilder buf = new StringBuilder();
-for (int i=0; i < attrs.getLength(); i++) {
-buf.append(" " + attrs.getQName(i) + "=\""
-   + attrs.getValue(i) + "\"");
+for (int i = 0; i < attrs.getLength(); i++) {
+buf.append(" " + attrs.getQName(i) + "=\"" + attrs.getValue(i) 
+ "\"");
 }
 return buf.toString();
 }
@@ -51,17 +50,16 @@ class Dumper {
 }
 }
 
-private void printAttributes(String prefix, Attributes attrs,
- String suffix) {
+private void printAttributes(String prefix, Attributes attrs, String 
suffix) {
 printString(prefix, getAttributes(attrs), suffix);
 }
 
 private void dumpBody(Node n) throws JasperException {
 Node.Nodes page = n.getBody();
 if (page != null) {
-//indent++;
+// indent++;
 page.visit(this);
-//indent--;
+// indent--;
 }
 }
 
@@ -157,7 +155,7 @@ class Dumper {
 
 @Override
 public void visit(Node.ELExpression n) throws JasperException {
-printString( "${" + n.getText() + "}" );
+printString("${" + n.getText() + "}");
 }
 
 @Override
@@ -170,7 +168,7 @@ class Dumper {
 @Override
 public void visit(Node.UninterpretedTag n) throws JasperException {
 String tag = n.getQName();
-printAttributes("<"+tag, n.getAttributes(), ">");
+printAttributes("<" + tag, n.getAttributes(), ">");
 dumpBody(n);
 printString("");
 }
@@ -181,7 +179,7 @@ class Dumper {
 }
 
 private void printIndent() {
-for (int i=0; i < indent; i++) {
+for (int i = 0; i < indent; i++) {
 System.out.print("  ");
 }
 }
diff --git a/test/org/apache/jasper/compiler/TestAttributeParser.java 
b/test/org/apache/jasper/compiler/TestAttributeParser.java
index 7fc0d29813..b9854f9ff1 100644
--- a/test/org/apache/jasper/compiler/TestAttributeParser.java
+++ b/test/org/apache/jasper/compiler/TestAttributeParser.java
@@ -26,14 +26,13 @@ import org.apache.el.TesterFunctions;
 import org.apache.jasper.el.ELContextImpl;
 
 /**
- * Test the EL processing from JSP attributes. Similar tests may be found in
- * {@link org.apache.el.TestELEvaluation} and {@link 
org.apache.el.TestELInJsp}.
+ * Test the EL processing from JSP attributes. Similar tests may be found in 
{@link org.apache.el.TestELEvaluation} and
+ * {@link org.apache.el.TestELInJsp}.
  */
 public class 

[tomcat] 03/04: Code clean-up - formatting. No functional change.

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

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

commit f49913c656a808172adaf329667c3253935c01f4
Author: Mark Thomas 
AuthorDate: Wed Jun 14 12:00:33 2023 +0100

Code clean-up - formatting. No functional change.
---
 test/jakarta/servlet/TestSessionCookieConfig.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/jakarta/servlet/TestSessionCookieConfig.java 
b/test/jakarta/servlet/TestSessionCookieConfig.java
index 5faa6680ba..737c702f83 100644
--- a/test/jakarta/servlet/TestSessionCookieConfig.java
+++ b/test/jakarta/servlet/TestSessionCookieConfig.java
@@ -48,7 +48,7 @@ public class TestSessionCookieConfig extends TomcatBaseTest {
 Assert.assertTrue(responseHeaders.containsKey("Set-Cookie"));
 
 List setCookieHeaders = responseHeaders.get("Set-Cookie");
-Assert.assertEquals(1,  setCookieHeaders.size());
+Assert.assertEquals(1, setCookieHeaders.size());
 
 String setCookieHeader = setCookieHeaders.get(0);
 Assert.assertTrue(setCookieHeader.contains("; aaa=bbb"));


-
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 functional change.

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

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

commit b8e6d382c61c9ea250b082bbe70d4f85ef804928
Author: Mark Thomas 
AuthorDate: Wed Jun 14 11:59:33 2023 +0100

Code clean-up - formatting. No functional change.
---
 .../apache/catalina/core/ApplicationContext.java   | 20 ++---
 .../catalina/core/ApplicationContextFacade.java|  6 +-
 .../catalina/core/ApplicationDispatcher.java   |  8 +-
 .../catalina/core/ApplicationFilterConfig.java |  6 +-
 .../catalina/core/ApplicationFilterFactory.java|  8 +-
 .../core/ApplicationFilterRegistration.java| 10 +--
 .../catalina/core/ApplicationHttpRequest.java  | 20 ++---
 java/org/apache/catalina/core/ApplicationPart.java |  2 +-
 .../catalina/core/ApplicationPushBuilder.java  |  8 +-
 .../apache/catalina/core/ApplicationRequest.java   | 16 ++--
 .../core/ApplicationServletRegistration.java   | 10 +--
 .../core/ApplicationSessionCookieConfig.java   |  6 +-
 .../org/apache/catalina/core/AsyncContextImpl.java |  4 +-
 java/org/apache/catalina/core/ContainerBase.java   |  2 +-
 .../catalina/core/ContextNamingInfoListener.java   | 13 ++--
 .../catalina/core/DefaultInstanceManager.java  | 38 +-
 .../apache/catalina/core/FrameworkListener.java|  2 +-
 .../core/JreMemoryLeakPreventionListener.java  |  5 +-
 .../catalina/core/NamingContextListener.java   | 12 +--
 java/org/apache/catalina/core/StandardContext.java | 86 +++---
 java/org/apache/catalina/core/StandardHost.java|  8 +-
 java/org/apache/catalina/core/StandardServer.java  |  9 +--
 java/org/apache/catalina/core/StandardWrapper.java |  4 +-
 23 files changed, 152 insertions(+), 151 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationContext.java 
b/java/org/apache/catalina/core/ApplicationContext.java
index a04a7706b0..682ccc123b 100644
--- a/java/org/apache/catalina/core/ApplicationContext.java
+++ b/java/org/apache/catalina/core/ApplicationContext.java
@@ -113,13 +113,13 @@ public class ApplicationContext implements ServletContext 
{
 /**
  * The context attributes for this context.
  */
-protected Map attributes = new ConcurrentHashMap<>();
+protected Map attributes = new ConcurrentHashMap<>();
 
 
 /**
  * List of read only attributes for this context.
  */
-private final Map readOnlyAttributes = new 
ConcurrentHashMap<>();
+private final Map readOnlyAttributes = new 
ConcurrentHashMap<>();
 
 
 /**
@@ -143,7 +143,7 @@ public class ApplicationContext implements ServletContext {
 /**
  * The merged context initialization parameters for this Context.
  */
-private final Map parameters = new ConcurrentHashMap<>();
+private final Map parameters = new ConcurrentHashMap<>();
 
 
 /**
@@ -799,7 +799,7 @@ public class ApplicationContext implements ServletContext {
 }
 
 String jspServletClassName = null;
-Map jspFileInitParams = new HashMap<>();
+Map jspFileInitParams = new HashMap<>();
 
 Wrapper jspServlet = (Wrapper) context.findChild("jsp");
 
@@ -826,7 +826,7 @@ public class ApplicationContext implements ServletContext {
 
 
 private ServletRegistration.Dynamic addServlet(String servletName, String 
servletClass, Servlet servlet,
-Map initParams) throws IllegalStateException {
+Map initParams) throws IllegalStateException {
 
 if (servletName == null || servletName.equals("")) {
 throw new 
IllegalArgumentException(sm.getString("applicationContext.invalidServletName", 
servletName));
@@ -869,7 +869,7 @@ public class ApplicationContext implements ServletContext {
 }
 
 if (initParams != null) {
-for (Map.Entry initParam : initParams.entrySet()) {
+for (Map.Entry initParam : initParams.entrySet()) {
 wrapper.addInitParameter(initParam.getKey(), 
initParam.getValue());
 }
 }
@@ -1121,8 +1121,8 @@ public class ApplicationContext implements ServletContext 
{
 
 
 @Override
-public Map getFilterRegistrations() {
-Map result = new HashMap<>();
+public Map getFilterRegistrations() {
+Map result = new HashMap<>();
 
 FilterDef[] filterDefs = context.findFilterDefs();
 for (FilterDef filterDef : filterDefs) {
@@ -1140,8 +1140,8 @@ public class ApplicationContext implements ServletContext 
{
 
 
 @Override
-public Map 
getServletRegistrations() {
-Map result = new HashMap<>();
+public Map getServletRegistrations() 
{
+Map result = new HashMap<>();
 
 Container[] wrappers = context.findChildren();
 for (Container wrapper : wrappers) {
diff --git a/java/org/apache/catalina/core/ApplicationContextFacade.java 
b/java/org/apache/catalina/core/ApplicationContextFacade.java
index 260eaa91fd..24678d8782 

[tomcat] 01/04: Code clean-up - formatting. No functional change.

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

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

commit a6534bca9ff82044da749ec01b64ef167dd0c6a9
Author: Mark Thomas 
AuthorDate: Wed Jun 14 11:56:07 2023 +0100

Code clean-up - formatting. No functional change.
---
 .../tomcat/util/http/FastHttpDateFormat.java   |  12 +-
 java/org/apache/tomcat/util/http/MimeHeaders.java  | 181 +++--
 java/org/apache/tomcat/util/http/Parameters.java   |   8 +-
 .../tomcat/util/http/Rfc6265CookieProcessor.java   |   6 +-
 4 files changed, 105 insertions(+), 102 deletions(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index f33aa851a3..f48913bad8 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -34,8 +34,8 @@ public final class FastHttpDateFormat {
 // -- Variables
 
 
-private static final int CACHE_SIZE = Integer
-
.getInteger("org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE", 
1000).intValue();
+private static final int CACHE_SIZE =
+
Integer.getInteger("org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE", 
1000).intValue();
 
 
 // HTTP date formats
@@ -57,8 +57,8 @@ public final class FastHttpDateFormat {
 FORMAT_OBSOLETE_RFC850 = new 
ConcurrentDateFormat(DATE_OBSOLETE_RFC850, Locale.US, tz);
 FORMAT_OBSOLETE_ASCTIME = new 
ConcurrentDateFormat(DATE_OBSOLETE_ASCTIME, Locale.US, tz);
 
-httpParseFormats = new ConcurrentDateFormat[] { FORMAT_RFC5322, 
FORMAT_OBSOLETE_RFC850,
-FORMAT_OBSOLETE_ASCTIME };
+httpParseFormats =
+new ConcurrentDateFormat[] { FORMAT_RFC5322, 
FORMAT_OBSOLETE_RFC850, FORMAT_OBSOLETE_ASCTIME };
 }
 
 /**
@@ -76,13 +76,13 @@ public final class FastHttpDateFormat {
 /**
  * Formatter cache.
  */
-private static final Map formatCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
+private static final Map formatCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
 
 
 /**
  * Parser cache.
  */
-private static final Map parseCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
+private static final Map parseCache = new 
ConcurrentHashMap<>(CACHE_SIZE);
 
 
 // - Public Methods
diff --git a/java/org/apache/tomcat/util/http/MimeHeaders.java 
b/java/org/apache/tomcat/util/http/MimeHeaders.java
index 3f1992dc3c..eb9a06534a 100644
--- a/java/org/apache/tomcat/util/http/MimeHeaders.java
+++ b/java/org/apache/tomcat/util/http/MimeHeaders.java
@@ -65,26 +65,22 @@ import org.apache.tomcat.util.res.StringManager;
 
 
 /**
- *  Memory-efficient repository for Mime Headers. When the object is recycled, 
it
- *  will keep the allocated headers[] and all the MimeHeaderField - no GC is 
generated.
- *  
- *  For input headers it is possible to use the MessageByte for Fields - so no 
GC
- *  will be generated.
+ * Memory-efficient repository for Mime Headers. When the object is recycled, 
it will keep the allocated headers[] and
+ * all the MimeHeaderField - no GC is generated.
  * 
- *  The only garbage is generated when using the String for header 
names/values -
- *  this can't be avoided when the servlet 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.
- *  
- *
- *  TODO:
- *  
- *  one-buffer parsing - for http (other protocols don't need that)
- *  remove unused methods
- *  External enumerations, with 0 GC.
- *  use HeaderName ID
- *  
- *
+ * For input headers it is possible to use the MessageByte for Fields - so no 
GC will be generated.
+ * 
+ * The only garbage is generated when using the String for header names/values 
- this can't be avoided when the servlet
+ * 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.
+ * 
+ * TODO:
+ * 
+ * one-buffer parsing - for http (other protocols don't need that)
+ * remove unused methods
+ * External enumerations, with 0 GC.
+ * use HeaderName ID
+ * 
  *
  * @author d...@eng.sun.com
  * @author James Todd [go...@eng.sun.com]
@@ -97,16 +93,14 @@ public class MimeHeaders {
  * 
  * TODO make it configurable (fine-tuning of web-apps)
  */
-public static final int DEFAULT_HEADER_SIZE=8;
+public static final int DEFAULT_HEADER_SIZE = 8;
 
-private static final StringManager sm =
-StringManager.getManager("org.apache.tomcat.util.http");
+private static final StringManager sm = 
StringManager.getManager("org.apache.tomcat.util.http");
 
 /**
  * The header fields.
  */
- 

[tomcat] branch main updated (2dcf2acc25 -> 91365f8e27)

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

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


from 2dcf2acc25 Fix copy/paste error & simplify
 new a6534bca9f Code clean-up - formatting. No functional change.
 new b8e6d382c6 Code clean-up - formatting. No functional change.
 new f49913c656 Code clean-up - formatting. No functional change.
 new 91365f8e27 Code clean-up - formatting. No fucntional 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:
 .../apache/catalina/core/ApplicationContext.java   |  20 +--
 .../catalina/core/ApplicationContextFacade.java|   6 +-
 .../catalina/core/ApplicationDispatcher.java   |   8 +-
 .../catalina/core/ApplicationFilterConfig.java |   6 +-
 .../catalina/core/ApplicationFilterFactory.java|   8 +-
 .../core/ApplicationFilterRegistration.java|  10 +-
 .../catalina/core/ApplicationHttpRequest.java  |  20 +--
 java/org/apache/catalina/core/ApplicationPart.java |   2 +-
 .../catalina/core/ApplicationPushBuilder.java  |   8 +-
 .../apache/catalina/core/ApplicationRequest.java   |  16 +-
 .../core/ApplicationServletRegistration.java   |  10 +-
 .../core/ApplicationSessionCookieConfig.java   |   6 +-
 .../org/apache/catalina/core/AsyncContextImpl.java |   4 +-
 java/org/apache/catalina/core/ContainerBase.java   |   2 +-
 .../catalina/core/ContextNamingInfoListener.java   |  13 +-
 .../catalina/core/DefaultInstanceManager.java  |  38 +++--
 .../apache/catalina/core/FrameworkListener.java|   2 +-
 .../core/JreMemoryLeakPreventionListener.java  |   5 +-
 .../catalina/core/NamingContextListener.java   |  12 +-
 java/org/apache/catalina/core/StandardContext.java |  86 +-
 java/org/apache/catalina/core/StandardHost.java|   8 +-
 java/org/apache/catalina/core/StandardServer.java  |   9 +-
 java/org/apache/catalina/core/StandardWrapper.java |   4 +-
 .../tomcat/util/http/FastHttpDateFormat.java   |  12 +-
 java/org/apache/tomcat/util/http/MimeHeaders.java  | 181 +++--
 java/org/apache/tomcat/util/http/Parameters.java   |   8 +-
 .../tomcat/util/http/Rfc6265CookieProcessor.java   |   6 +-
 test/jakarta/servlet/TestSessionCookieConfig.java  |   2 +-
 test/org/apache/jasper/compiler/Dumper.java|  20 +--
 .../jasper/compiler/TestAttributeParser.java   |  39 ++---
 test/org/apache/jasper/compiler/TestCompiler.java  |  41 ++---
 .../jasper/compiler/TestELInterpreterFactory.java  |   8 +-
 test/org/apache/jasper/compiler/TestELParser.java  |  26 ++-
 .../jasper/compiler/TestEncodingDetector.java  |  39 +++--
 test/org/apache/jasper/compiler/TestGenerator.java |  60 +++
 test/org/apache/jasper/compiler/TestJspConfig.java |  36 ++--
 .../jasper/compiler/TestJspDocumentParser.java |  17 +-
 test/org/apache/jasper/compiler/TestJspReader.java |   3 +-
 test/org/apache/jasper/compiler/TestJspUtil.java   |   2 +-
 .../compiler/TestJspUtilMakeJavaPackage.java   |  26 +--
 test/org/apache/jasper/compiler/TestNode.java  |   4 +-
 .../jasper/compiler/TestNodeIntegration.java   |   6 +-
 test/org/apache/jasper/compiler/TestParser.java|  89 --
 .../compiler/TestParserNoStrictWhitespace.java |   5 +-
 .../jasper/compiler/TestScriptingVariabler.java|   5 +-
 .../apache/jasper/compiler/TestSmapStratum.java|   2 +
 .../jasper/compiler/TestTagLibraryInfoImpl.java|   6 +-
 .../jasper/compiler/TestTagPluginManager.java  |  15 +-
 test/org/apache/jasper/compiler/TestValidator.java |  57 +++
 .../apache/jasper/compiler/TesterValidator.java|  15 +-
 50 files changed, 458 insertions(+), 575 deletions(-)


-
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

2023-06-14 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/37/builds/595
Blamelist: Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 9.0.x] b0f0377b475aef2542f19ea606fdc248c08fba21


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



[Bug 66635] AbstractEndpoint#logCertificate() prints incorrect information

2023-06-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66635

--- Comment #4 from Michael Osipov  ---
(In reply to Mark Thomas from comment #3)
> Yes. A new issue needs a new BZ entry.

Done in Bug 66647.

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



[Bug 66647] Analyze usefulness and consider deprecation of certificateChainFile in favor of certificateFile

2023-06-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66647

Michael Osipov  changed:

   What|Removed |Added

 CC||micha...@apache.org

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



[Bug 66647] New: Analyze usefulness and consider deprecation of certificateChainFile in favor of certificateFile

2023-06-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66647

Bug ID: 66647
   Summary: Analyze usefulness and consider deprecation of
certificateChainFile in favor of certificateFile
   Product: Tomcat 9
   Version: 9.0.75
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: micha...@apache.org
  Target Milestone: -

This is a spinoff of Bug 66635.

Our OpenSSL code is mostly based on HTTPd's mod_ssl. HTTPd has deprecated
SSLCertificateChainFile
(https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatechainfile)
long time ago in favor of SSLCertificateFile which can contain the entire chain
already.

Out task is to:
* Analyse our usage (code-wise) for/of both parameters and update to the
behavior of mod_ssl
* Deprecate certificateChainFile then in favor of certificateFile
* Ideally remove in Tomcat 11 then

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



JDK 21 is in Rampdown / The importance of testing with Early-Access Builds

2023-06-14 Thread David Delabassee
Welcome to the OpenJDK Quality Outreach June update.

JDK 21 has entered Rampdown Phase One (RDP1) [1], which means that the 
main-line has been forked into a dedicated JDK 21 stabilization repository. At 
this point, the overall JDK 21 feature set is frozen. Any changes pushed to the 
main line are now bound for JDK 22. The stabilization repository is open for 
select bug fixes and, with approval, late low-risk enhancements per the JDK 
Release Process [2]. And in contrast to past practice, most stabilization 
changes will be integrated via backports from the main-line repository [1].

The coming weeks are critical to identify and resolve as many issues as 
possible, i.e. before JDK 21 enters the Release Candidates phase in August. We 
need to make sure those few weeks are leveraged to test both existing code 
running on top of JDK 21 and new JDK 21 features. The heads-up below 
illustrates the importance and the benefits of doing such tests.

[1] https://mail.openjdk.org/pipermail/jdk-dev/2023-June/007911.html
[2] https://openjdk.org/jeps/3#Integrating-fixes-and-enhancements


## Heads-up: On the Importance of Doing Tests With OpenJDK Early-Access Builds

The following is a recent example that demonstrates the benefits of testing an 
existing codebase using the OpenJDK early-access builds.

Last month, we published a heads-up focused on Sequenced Collections [3] as 
they could potentially introduce some incompatibilities.
The Eclipse Collections (EC) team did their homework and sure enough, EC was 
impacted as it was now throwing compilation errors with JDK 21 early-access 
builds. The EC team was able to quickly fix those compilation errors, i.e., it 
was mainly about adding overriding default methods. But once those compilation 
errors were fixed, and this is where it gets interesting, another issue 
surfaced. This time, the problem was related to LinkedHashMap serialization. 
After some investigation, the EC team identified that second issue as JDK one 
and a JBS ticket was opened. That issue was then confirmed as a JDK regression 
and was promptly fixed in OpenJDK main-line, i.e., JDK 22. The fix was then 
backported into the JDK 21 stabilization repository. This EC pull request [4] 
provides additional details.
In this case, the JDK fix was easy but it is nevertheless the kind of issues 
that could have easily fallen through the crack if the EC team wasn’t 
pro-actively testing with OpenJDK early-access builds. The EC issue would have 
then surfaced after the JDK 21 General Availability... and who knows when the 
JDK LinkedHashMap serialization regression would have been fixed?
TL; DR; Testing an existing codebase with OpenJDK early-access builds is a 
win-win situation. It helps the project itself, Eclipse Collections in this 
case, as it enables developers to identify issues in their own codebase before 
that new JDK version is Generally Available. It helps the JDK too as any JDK 
issue detected early enough in the development cycle gives the OpenJDK 
engineers a chance to address it before the General Availability of that new 
JDK version. And last but not least, having a robust JDK is also a win for the 
Java community at large.

And thanks to the Eclipse Collections team and especially to Don Raab for 
helping to make the Java platform more robust!

[3] https://inside.java/2023/05/12/quality-heads-up/
[4] https://github.com/eclipse/eclipse-collections/pull/1461


## JDK 21 Early-Access Builds

JDK 21 Early-Access builds 26 are now available [5], and are provided under the 
GNU General Public License v2, with the Classpath Exception. The Release Notes 
are available here [6] and the javadocs here [7].

### JEPs integrated into JDK 21:
- 430: String Templates (Preview)
- 431: Sequenced Collections
- 439: Generational ZGC
- 440: Record Patterns
- 441: Pattern Matching for switch
- 442: Foreign Function & Memory API (3rd Preview)
- 443: Unnamed Patterns and Variables (Preview)
- 444: Virtual Threads
- 445: Unnamed Classes and Instance Main Methods (Preview)
- 446: Scoped Values (Preview)
- 448: Vector API (6th Incubator)
- 449: Deprecate the Windows 32-bit x86 Port for Removal
- 451: Prepare to Disallow the Dynamic Loading of Agents
- 452: Key Encapsulation Mechanism API
- 453: Structured Concurrency (Preview)

It is worth mentioning that JEP 404 (Generational Shenandoah - Experimental) 
has been proposed to drop from JDK 21 [8].

### Changes in recent JDK 21 builds (b23-b26) that may be of interest:

Note that this is only a curated list of changes, make sure to check [9] for 
additional changes.

- JDK-8298127: HSS/LMS Signature Verification
- JDK-8305972: Update XML Security for Java to 3.0.2
- JDK-8308244: Installation of jdk rpm corrupts alternatives
- JDK-8307990: jspawnhelper must close its writing side of a pipe before 
reading from it
- JDK-8303465: KeyStore of type KeychainStore, provider Apple does not show all 
trusted certificates
- JDK-8303530: Redefine JAXP Configuration File
- 

[Bug 66635] AbstractEndpoint#logCertificate() prints incorrect information

2023-06-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66635

--- Comment #3 from Mark Thomas  ---
Yes. A new issue needs a new BZ entry.

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



[tomcat] branch 8.5.x updated: Fix copy/paste error & simplify

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 27fe45a184 Fix copy/paste error & simplify
27fe45a184 is described below

commit 27fe45a1842fd0e734e50b767d8d4c3d60d30854
Author: Mark Thomas 
AuthorDate: Wed Jun 14 09:10:07 2023 +0100

Fix copy/paste error & simplify
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index ee704bd1f3..bc78d0c90e 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -379,18 +379,16 @@ public abstract class AbstractEndpoint {
 
 if (certificate.getStoreType() == StoreType.PEM) {
 // PEM file based
-String keySource = certificate.getCertificateKeystoreFile();
-keySource = certificate.getCertificateKeyFile();
-certificateInfo = sm.getString("endpoint.tls.info.cert.pem", 
keySource, certificate.getCertificateFile(),
-certificate.getCertificateChainFile());
+certificateInfo = sm.getString("endpoint.tls.info.cert.pem", 
certificate.getCertificateKeyFile(),
+certificate.getCertificateFile(), 
certificate.getCertificateChainFile());
 } else {
 // Keystore based
-String keyStore = certificate.getCertificateKeystoreFile();
 String keyAlias = certificate.getCertificateKeyAlias();
 if (keyAlias == null) {
 keyAlias = SSLUtilBase.DEFAULT_KEY_ALIAS;
 }
-certificateInfo = sm.getString("endpoint.tls.info.cert.keystore", 
keyStore, keyAlias);
+certificateInfo =
+sm.getString("endpoint.tls.info.cert.keystore", 
certificate.getCertificateKeystoreFile(), keyAlias);
 }
 
 String trustStoreSource = sslHostConfig.getTruststoreFile();


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



[tomcat] branch 9.0.x updated: Fix copy/paste error & simplify

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

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new b0f0377b47 Fix copy/paste error & simplify
b0f0377b47 is described below

commit b0f0377b475aef2542f19ea606fdc248c08fba21
Author: Mark Thomas 
AuthorDate: Wed Jun 14 09:10:07 2023 +0100

Fix copy/paste error & simplify
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index fd3278d51e..44a288ad79 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -381,18 +381,16 @@ public abstract class AbstractEndpoint {
 
 if (certificate.getStoreType() == StoreType.PEM) {
 // PEM file based
-String keySource = certificate.getCertificateKeystoreFile();
-keySource = certificate.getCertificateKeyFile();
-certificateInfo = sm.getString("endpoint.tls.info.cert.pem", 
keySource, certificate.getCertificateFile(),
-certificate.getCertificateChainFile());
+certificateInfo = sm.getString("endpoint.tls.info.cert.pem", 
certificate.getCertificateKeyFile(),
+certificate.getCertificateFile(), 
certificate.getCertificateChainFile());
 } else {
 // Keystore based
-String keyStore = certificate.getCertificateKeystoreFile();
 String keyAlias = certificate.getCertificateKeyAlias();
 if (keyAlias == null) {
 keyAlias = SSLUtilBase.DEFAULT_KEY_ALIAS;
 }
-certificateInfo = sm.getString("endpoint.tls.info.cert.keystore", 
keyStore, keyAlias);
+certificateInfo =
+sm.getString("endpoint.tls.info.cert.keystore", 
certificate.getCertificateKeystoreFile(), keyAlias);
 }
 
 String trustStoreSource = sslHostConfig.getTruststoreFile();


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



[tomcat] branch main updated: Fix copy/paste error & simplify

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

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


The following commit(s) were added to refs/heads/main by this push:
 new 2dcf2acc25 Fix copy/paste error & simplify
2dcf2acc25 is described below

commit 2dcf2acc254e5d9199a1f3e9a2eb2e06dd5c83de
Author: Mark Thomas 
AuthorDate: Wed Jun 14 09:10:07 2023 +0100

Fix copy/paste error & simplify
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index 1001e5490c..13114d7552 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -426,18 +426,16 @@ public abstract class AbstractEndpoint {
 
 if (certificate.getStoreType() == StoreType.PEM) {
 // PEM file based
-String keySource = certificate.getCertificateKeystoreFile();
-keySource = certificate.getCertificateKeyFile();
-certificateInfo = sm.getString("endpoint.tls.info.cert.pem", 
keySource, certificate.getCertificateFile(),
-certificate.getCertificateChainFile());
+certificateInfo = sm.getString("endpoint.tls.info.cert.pem", 
certificate.getCertificateKeyFile(),
+certificate.getCertificateFile(), 
certificate.getCertificateChainFile());
 } else {
 // Keystore based
-String keyStore = certificate.getCertificateKeystoreFile();
 String keyAlias = certificate.getCertificateKeyAlias();
 if (keyAlias == null) {
 keyAlias = SSLUtilBase.DEFAULT_KEY_ALIAS;
 }
-certificateInfo = sm.getString("endpoint.tls.info.cert.keystore", 
keyStore, keyAlias);
+certificateInfo =
+sm.getString("endpoint.tls.info.cert.keystore", 
certificate.getCertificateKeystoreFile(), keyAlias);
 }
 
 String trustStoreSource = sslHostConfig.getTruststoreFile();


-
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: Fix copy/paste error & simplify

2023-06-14 Thread markt
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 8b55a6aa6b Fix copy/paste error & simplify
8b55a6aa6b is described below

commit 8b55a6aa6bc4534b6f5ffc28d2a85810247e5509
Author: Mark Thomas 
AuthorDate: Wed Jun 14 09:10:07 2023 +0100

Fix copy/paste error & simplify
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index 3f0862286b..071fa1c954 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -371,18 +371,16 @@ public abstract class AbstractEndpoint {
 
 if (certificate.getStoreType() == StoreType.PEM) {
 // PEM file based
-String keySource = certificate.getCertificateKeystoreFile();
-keySource = certificate.getCertificateKeyFile();
-certificateInfo = sm.getString("endpoint.tls.info.cert.pem", 
keySource, certificate.getCertificateFile(),
-certificate.getCertificateChainFile());
+certificateInfo = sm.getString("endpoint.tls.info.cert.pem", 
certificate.getCertificateKeyFile(),
+certificate.getCertificateFile(), 
certificate.getCertificateChainFile());
 } else {
 // Keystore based
-String keyStore = certificate.getCertificateKeystoreFile();
 String keyAlias = certificate.getCertificateKeyAlias();
 if (keyAlias == null) {
 keyAlias = SSLUtilBase.DEFAULT_KEY_ALIAS;
 }
-certificateInfo = sm.getString("endpoint.tls.info.cert.keystore", 
keyStore, keyAlias);
+certificateInfo =
+sm.getString("endpoint.tls.info.cert.keystore", 
certificate.getCertificateKeystoreFile(), keyAlias);
 }
 
 String trustStoreSource = sslHostConfig.getTruststoreFile();


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



[Bug 66635] AbstractEndpoint#logCertificate() prints incorrect information

2023-06-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66635

--- Comment #2 from Michael Osipov  ---
Looks much better now:

> 2023-06-14T09:58:06.481 INFORMATION [main] 
> org.apache.tomcat.util.net.AbstractEndpoint.logCertificate Connector 
> [https-openssl-apr-8444], TLS virtual host [deblndw024v.ad001.siemens.net], 
> certificate type [RSA] configured from key 
> [/opt/openssl/deblndw024v.ad001.siemens.net/key.crt], certificate 
> [/opt/openssl/deblndw024v.ad001.siemens.net/cert.crt] and certificate chain 
> [null] with trust store [null]
> 2023-06-14T09:58:06.585 INFORMATION [main] 
> org.apache.tomcat.util.net.AbstractEndpoint.logCertificate Connector 
> [https-openssl-apr-18444], TLS virtual host [deblndw024v.ad001.siemens.net], 
> certificate type [RSA] configured from key 
> [/opt/openssl/deblndw024v.ad001.siemens.net/key.crt], certificate 
> [/opt/openssl/deblndw024v.ad001.siemens.net/cert.crt] and certificate chain 
> [null] with trust store [/opt/openssl/certs]

I wonder to what extend we need certificateChainFile these days because the
mod_ssl counterpart is deprecated for a long time:
https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatechainfile
as long as our code loads the file identially to mod_ssl.

Should I spawn a new issue for this?

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



[tomcat] branch 8.5.x updated: Use correct separator

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 6a539de959 Use correct separator
6a539de959 is described below

commit 6a539de959009115be3dff15d67bef8d87a4dc9a
Author: Mark Thomas 
AuthorDate: Wed Jun 14 08:55:23 2023 +0100

Use correct separator
---
 java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java 
b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
index 0ef6ca0a7d..fd92d147e6 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
@@ -16,6 +16,7 @@
  */
 package org.apache.tomcat.util.net;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.Serializable;
 import java.security.KeyStore;
@@ -42,7 +43,8 @@ public class SSLHostConfigCertificate implements Serializable 
{
 
 static final String DEFAULT_KEYSTORE_PROVIDER = 
System.getProperty("javax.net.ssl.keyStoreProvider");
 static final String DEFAULT_KEYSTORE_TYPE = 
System.getProperty("javax.net.ssl.keyStoreType", "JKS");
-private static final String DEFAULT_KEYSTORE_FILE = 
System.getProperty("user.home")+"/.keystore";
+private static final String DEFAULT_KEYSTORE_FILE =
+System.getProperty("user.home") + File.pathSeparator + ".keystore";
 private static final String DEFAULT_KEYSTORE_PASSWORD = "changeit";
 
 // Internal


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



[tomcat] 02/02: Use correct separator

2023-06-14 Thread markt
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 775e8c83cb390e8597b1d5f28ba3e3837f22855d
Author: Mark Thomas 
AuthorDate: Wed Jun 14 08:55:23 2023 +0100

Use correct separator
---
 java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java 
b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
index 0ef6ca0a7d..fd92d147e6 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
@@ -16,6 +16,7 @@
  */
 package org.apache.tomcat.util.net;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.Serializable;
 import java.security.KeyStore;
@@ -42,7 +43,8 @@ public class SSLHostConfigCertificate implements Serializable 
{
 
 static final String DEFAULT_KEYSTORE_PROVIDER = 
System.getProperty("javax.net.ssl.keyStoreProvider");
 static final String DEFAULT_KEYSTORE_TYPE = 
System.getProperty("javax.net.ssl.keyStoreType", "JKS");
-private static final String DEFAULT_KEYSTORE_FILE = 
System.getProperty("user.home")+"/.keystore";
+private static final String DEFAULT_KEYSTORE_FILE =
+System.getProperty("user.home") + File.pathSeparator + ".keystore";
 private static final String DEFAULT_KEYSTORE_PASSWORD = "changeit";
 
 // Internal


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



[tomcat] 01/02: Remove transport.bio from catalina-tribes.jar.tmp.bnd

2023-06-14 Thread markt
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 9f5309473476c78f9b4a2fc257a131fe585e484a
Author: Sokratis Zappis 
AuthorDate: Mon Jun 12 19:21:22 2023 +0300

Remove transport.bio from catalina-tribes.jar.tmp.bnd
---
 res/bnd/catalina-tribes.jar.tmp.bnd | 1 -
 1 file changed, 1 deletion(-)

diff --git a/res/bnd/catalina-tribes.jar.tmp.bnd 
b/res/bnd/catalina-tribes.jar.tmp.bnd
index 09c7f54394..5b45cd88d6 100644
--- a/res/bnd/catalina-tribes.jar.tmp.bnd
+++ b/res/bnd/catalina-tribes.jar.tmp.bnd
@@ -26,7 +26,6 @@ Export-Package: \
 org.apache.catalina.tribes.membership,\
 org.apache.catalina.tribes.tipis,\
 org.apache.catalina.tribes.transport,\
-org.apache.catalina.tribes.transport.bio,\
 org.apache.catalina.tribes.transport.nio,\
 org.apache.catalina.tribes.util
 


-
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 (46645ef4af -> 775e8c83cb)

2023-06-14 Thread markt
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 46645ef4af Fix BZ 66635 Correctly log PEM based keys/certificates
 new 9f53094734 Remove transport.bio from catalina-tribes.jar.tmp.bnd
 new 775e8c83cb Use correct separator

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


Summary of changes:
 java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java | 4 +++-
 res/bnd/catalina-tribes.jar.tmp.bnd   | 1 -
 2 files changed, 3 insertions(+), 2 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: Use correct separator

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

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new fcc7415396 Use correct separator
fcc7415396 is described below

commit fcc741539676571595e697c335e60b80e486d0a6
Author: Mark Thomas 
AuthorDate: Wed Jun 14 08:55:23 2023 +0100

Use correct separator
---
 java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java 
b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
index 0ef6ca0a7d..fd92d147e6 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
@@ -16,6 +16,7 @@
  */
 package org.apache.tomcat.util.net;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.Serializable;
 import java.security.KeyStore;
@@ -42,7 +43,8 @@ public class SSLHostConfigCertificate implements Serializable 
{
 
 static final String DEFAULT_KEYSTORE_PROVIDER = 
System.getProperty("javax.net.ssl.keyStoreProvider");
 static final String DEFAULT_KEYSTORE_TYPE = 
System.getProperty("javax.net.ssl.keyStoreType", "JKS");
-private static final String DEFAULT_KEYSTORE_FILE = 
System.getProperty("user.home")+"/.keystore";
+private static final String DEFAULT_KEYSTORE_FILE =
+System.getProperty("user.home") + File.pathSeparator + ".keystore";
 private static final String DEFAULT_KEYSTORE_PASSWORD = "changeit";
 
 // Internal


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



[tomcat] branch main updated: Use correct separator

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

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


The following commit(s) were added to refs/heads/main by this push:
 new 74335a4ffa Use correct separator
74335a4ffa is described below

commit 74335a4ffa2e54afdbe580e5b6ef1182475a8b29
Author: Mark Thomas 
AuthorDate: Wed Jun 14 08:55:23 2023 +0100

Use correct separator
---
 java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java 
b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
index 0ef6ca0a7d..fd92d147e6 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
@@ -16,6 +16,7 @@
  */
 package org.apache.tomcat.util.net;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.Serializable;
 import java.security.KeyStore;
@@ -42,7 +43,8 @@ public class SSLHostConfigCertificate implements Serializable 
{
 
 static final String DEFAULT_KEYSTORE_PROVIDER = 
System.getProperty("javax.net.ssl.keyStoreProvider");
 static final String DEFAULT_KEYSTORE_TYPE = 
System.getProperty("javax.net.ssl.keyStoreType", "JKS");
-private static final String DEFAULT_KEYSTORE_FILE = 
System.getProperty("user.home")+"/.keystore";
+private static final String DEFAULT_KEYSTORE_FILE =
+System.getProperty("user.home") + File.pathSeparator + ".keystore";
 private static final String DEFAULT_KEYSTORE_PASSWORD = "changeit";
 
 // Internal


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