On 01/08/2019 11:38, Michael Osipov wrote: > > >> Gesendet: Donnerstag, 01. August 2019 um 12:16 Uhr >> Von: ma...@apache.org >> An: "dev@tomcat.apache.org" <dev@tomcat.apache.org> >> Betreff: [tomcat] branch 7.0.x updated: Fix broken test >> >> This is an automated email from the ASF dual-hosted git repository. >> >> markt pushed a commit to branch 7.0.x >> in repository https://gitbox.apache.org/repos/asf/tomcat.git >> >> >> The following commit(s) were added to refs/heads/7.0.x by this push: >> new bb618dc Fix broken test >> bb618dc is described below >> >> commit bb618dceba4c37e167e12aef3e852fe571ff5190 >> Author: Mark Thomas <ma...@apache.org> >> AuthorDate: Thu Aug 1 11:16:33 2019 +0100 >> >> Fix broken test >> --- >> .../apache/catalina/authenticator/TestAuthInfoResponseHeaders.java | 4 >> ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git >> a/test/org/apache/catalina/authenticator/TestAuthInfoResponseHeaders.java >> b/test/org/apache/catalina/authenticator/TestAuthInfoResponseHeaders.java >> index 9004744..6ce7fd8 100644 >> --- a/test/org/apache/catalina/authenticator/TestAuthInfoResponseHeaders.java >> +++ b/test/org/apache/catalina/authenticator/TestAuthInfoResponseHeaders.java >> @@ -16,7 +16,6 @@ >> */ >> package org.apache.catalina.authenticator; >> >> -import java.nio.charset.StandardCharsets; >> import java.util.ArrayList; >> import java.util.HashMap; >> import java.util.List; >> @@ -36,6 +35,7 @@ import org.apache.catalina.startup.TesterServlet; >> import org.apache.catalina.startup.Tomcat; >> import org.apache.catalina.startup.TomcatBaseTest; >> import org.apache.catalina.valves.RemoteIpValve; >> +import org.apache.tomcat.util.buf.B2CConverter; >> import org.apache.tomcat.util.buf.ByteChunk; >> import org.apache.tomcat.util.codec.binary.Base64; >> >> @@ -67,7 +67,7 @@ public class TestAuthInfoResponseHeaders extends >> TomcatBaseTest { >> password = aPassword; >> String userCredentials = username + ":" + password; >> byte[] credentialsBytes = >> - userCredentials.getBytes(StandardCharsets.ISO_8859_1); >> + userCredentials.getBytes(B2CConverter.ISO_8859_1); >> String base64auth = Base64.encodeBase64String(credentialsBytes); >> credentials= method + " " + base64auth; >> } > > > Thanks for the fix, but I do not understand why this has happened. > I ran "ant clean" and "ant test". Why didn't it fail for me?
No problem. I break Tomcat 7 like this all the time. You need to build with Java 6 to see that problem. If you build with Java 7 or later you won't see it. Tomcat 7 has a spec mandated requirement to run on Java 6 or later so the CI system is configured to build with Java 6 as an easy way to catch issues like this. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org