[tomcat] branch 8.5.x updated: Polish. Align with master.

2019-07-24 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 e8ab3a2  Polish. Align with master.
e8ab3a2 is described below

commit e8ab3a28b2b176c85a696a02e50d741172bfc6b4
Author: Mark Thomas 
AuthorDate: Wed Jul 24 10:19:37 2019 +0100

Polish. Align with master.
---
 test/org/apache/catalina/startup/SimpleHttpClient.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/startup/SimpleHttpClient.java 
b/test/org/apache/catalina/startup/SimpleHttpClient.java
index 1d6e81e..1020985 100644
--- a/test/org/apache/catalina/startup/SimpleHttpClient.java
+++ b/test/org/apache/catalina/startup/SimpleHttpClient.java
@@ -34,6 +34,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
 
+import org.junit.Assert;
+
 /**
  * Simple client for unit testing. It isn't robust, it isn't secure and
  * should not be used as the basis for production code. Its only purpose
@@ -302,7 +304,8 @@ public abstract class SimpleHttpClient {
 if (wantBody) {
 if (useContentLength && (contentLength > -1)) {
 char[] body = new char[contentLength];
-reader.read(body);
+int read = reader.read(body);
+Assert.assertEquals(contentLength, read);
 builder.append(body);
 }
 else {


-
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: Polish. Align with master. Clean-up and additional i18n strings.

2019-07-24 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 22e708d  Polish. Align with master. Clean-up and additional i18n 
strings.
22e708d is described below

commit 22e708dc5731c4b9c8f2d370bddfe60a61bb9306
Author: Mark Thomas 
AuthorDate: Wed Jul 24 10:04:37 2019 +0100

Polish. Align with master. Clean-up and additional i18n strings.
---
 .../apache/catalina/connector/CoyoteAdapter.java   | 12 ++--
 .../catalina/connector/LocalStrings.properties |  1 +
 .../catalina/connector/LocalStrings_es.properties  | 16 +++--
 .../catalina/connector/LocalStrings_fr.properties  | 68 +++---
 .../catalina/connector/LocalStrings_ja.properties  | 53 +
 .../catalina/connector/LocalStrings_ru.properties  | 17 ++
 6 files changed, 148 insertions(+), 19 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 5274eee..8ad166f 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -133,7 +133,7 @@ public class CoyoteAdapter implements Adapter {
 Response response = (Response) res.getNote(ADAPTER_NOTES);
 
 if (request == null) {
-throw new IllegalStateException("Dispatch may only happen on an 
existing request.");
+throw new 
IllegalStateException(sm.getString("coyoteAdapter.nullRequest"));
 }
 
 boolean success = true;
@@ -882,9 +882,9 @@ public class CoyoteAdapter implements Adapter {
 }
 
 // Set the authorization type
-String authtype = req.getAuthType().toString();
-if (authtype != null) {
-request.setAuthType(authtype);
+String authType = req.getAuthType().toString();
+if (authType != null) {
+request.setAuthType(authType);
 }
 }
 
@@ -1314,8 +1314,6 @@ public class CoyoteAdapter implements Adapter {
  * @param len Length
  */
 protected static void copyBytes(byte[] b, int dest, int src, int len) {
-for (int pos = 0; pos < len; pos++) {
-b[pos + dest] = b[pos + src];
-}
+System.arraycopy(b, src, b, dest, len);
 }
 }
diff --git a/java/org/apache/catalina/connector/LocalStrings.properties 
b/java/org/apache/catalina/connector/LocalStrings.properties
index a494015..c6ea9a4 100644
--- a/java/org/apache/catalina/connector/LocalStrings.properties
+++ b/java/org/apache/catalina/connector/LocalStrings.properties
@@ -20,6 +20,7 @@ coyoteAdapter.authorize=Authorizing user [{0}] using 
Tomcat''s Realm
 coyoteAdapter.checkRecycled.request=Encountered a non-recycled request and 
recycled it forcedly.
 coyoteAdapter.checkRecycled.response=Encountered a non-recycled response and 
recycled it forcedly.
 coyoteAdapter.debug=The variable [{0}] has value [{1}]
+coyoteAdapter.nullRequest=An asynchronous dispatch may only happen on an 
existing request
 coyoteAdapter.parsePathParam=Unable to parse the path parameters using 
encoding [{0}]. The path parameters in the URL will be ignored.
 
 coyoteConnector.invalidEncoding=The encoding [{0}] is not recognised by the 
JRE. The Connector will continue to use [{1}]
diff --git a/java/org/apache/catalina/connector/LocalStrings_es.properties 
b/java/org/apache/catalina/connector/LocalStrings_es.properties
index 877c92e..f0dca0b 100644
--- a/java/org/apache/catalina/connector/LocalStrings_es.properties
+++ b/java/org/apache/catalina/connector/LocalStrings_es.properties
@@ -14,9 +14,12 @@
 # limitations under the License.
 
 coyoteAdapter.accesslogFail=Excepción al intentar añadir una entrada al 
historial de acceso
+coyoteAdapter.checkRecycled.response=Se encontró una respuesta no reciclable y 
se crecicló a la fuerza
 coyoteAdapter.debug=La variable [{0}] tiene el valor [{1}]
 coyoteAdapter.parsePathParam=No puedo analizar los parámetros de ruta mediante 
la codificación [{0}]. Se ignoran los parámetros de la URL.
 
+coyoteConnector.invalidEncoding=La codificación  [{0}]  no esta reconocida por 
 JRE. El conector continuará usando [{1}]\n
+coyoteConnector.invalidPort=El conector no puede inciar debido a que el valor 
del puerto especificado [{0}] no es válido
 coyoteConnector.parseBodyMethodNoTrace=El método TRACE NO DEBE DE incluir una 
entidad (vea RFC 2616 Sección 9.6)
 coyoteConnector.protocolHandlerDestroyFailed=Falló la destrucción del 
manejador de protocolo
 coyoteConnector.protocolHandlerInitializationFailed=Falló la inicialización 
del manejador de protocolo
@@ -24,16 +27,23 @@ coyoteConnector.protocolHandlerInstantiationFailed=Falló la 
instanciación del
 coyoteConnector.protocolHandlerPauseFailed=Ha fallado la pausa del manejador 
de protocolo
 coyoteConnector.protocolHandlerResumeFailed=Ha fallado el 

[tomcat] branch 8.5.x updated: Polish. Align with master.

2019-07-22 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 c1102da  Polish. Align with master.
c1102da is described below

commit c1102da7c632112472feebd3c3f50f704d5f40bd
Author: Mark Thomas 
AuthorDate: Mon Jul 22 12:12:07 2019 +0100

Polish. Align with master.

Primarily to trigger CI
---
 java/javax/servlet/Filter.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/javax/servlet/Filter.java b/java/javax/servlet/Filter.java
index 8fd90b0..fec7e0a 100644
--- a/java/javax/servlet/Filter.java
+++ b/java/javax/servlet/Filter.java
@@ -114,5 +114,4 @@ public interface Filter {
  * state in memory.
  */
 public void destroy();
-
 }


-
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: Polish. Align with master.

2019-07-10 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 916c128  Polish. Align with master.
916c128 is described below

commit 916c128fe82a5b10456bf3d7bff8d282266c1e51
Author: Mark Thomas 
AuthorDate: Wed Jul 10 16:10:23 2019 +0100

Polish. Align with master.
---
 java/org/apache/coyote/Response.java | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/coyote/Response.java 
b/java/org/apache/coyote/Response.java
index c3ee057..536f50f 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -456,13 +456,12 @@ public final class Response {
 return contentLanguage;
 }
 
+
 /**
- * Overrides the name of the character encoding used in the body
- * of the response. This method must be called prior to writing output
- * using getWriter().
+ * Overrides the character encoding used in the body of the response. This
+ * method must be called prior to writing output using getWriter().
  *
- * @param characterEncoding String containing the name of the character
- *  encoding.
+ * @param characterEncoding The name of character encoding.
  */
 public void setCharacterEncoding(String characterEncoding) {
 if (isCommitted()) {
@@ -547,8 +546,7 @@ public final class Response {
 
 String ret = contentType;
 
-if (ret != null
-&& charset != null) {
+if (ret != null && charset != null) {
 ret = ret + ";charset=" + characterEncoding;
 }
 


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