You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2017/10/16 16:24:03 UTC

qpid-jms git commit: NO-JIRA: ensure tests use expected charset for encoding

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 <ro...@apache.org>
Authored: Mon Oct 16 17:20:27 2017 +0100
Committer: Robbie Gemmell <ro...@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