qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject qpid-jms git commit: NO-JIRA: ensure tests use expected charset for encoding
Date Mon, 16 Oct 2017 16:24:03 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 1f9bf005f -> f665c63f2


NO-JIRA: ensure tests use expected charset for encoding


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/f665c63f
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/f665c63f
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/f665c63f

Branch: refs/heads/master
Commit: f665c63f25d53df51a7026eb4c76c2eaa4b90231
Parents: 1f9bf00
Author: Robbie Gemmell <robbie@apache.org>
Authored: Mon Oct 16 17:20:27 2017 +0100
Committer: Robbie Gemmell <robbie@apache.org>
Committed: Mon Oct 16 17:20:27 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/f665c63f/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
index 89c78d9..8e362b6 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
@@ -37,6 +37,7 @@ import static org.hamcrest.Matchers.nullValue;
 
 import java.io.IOException;
 import java.net.Socket;
+import java.nio.charset.StandardCharsets;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
@@ -701,8 +702,8 @@ public class TestAmqpPeer implements AutoCloseable
 
     public void expectSaslPlain(String username, String password)
     {
-        byte[] usernameBytes = username.getBytes();
-        byte[] passwordBytes = password.getBytes();
+        byte[] usernameBytes = username.getBytes(StandardCharsets.UTF_8);
+        byte[] passwordBytes = password.getBytes(StandardCharsets.UTF_8);
         byte[] data = new byte[usernameBytes.length+passwordBytes.length+2];
         System.arraycopy(usernameBytes, 0, data, 1, usernameBytes.length);
         System.arraycopy(passwordBytes, 0, data, 2 + usernameBytes.length, passwordBytes.length);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message