You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2016/04/07 16:29:06 UTC

qpid-jms git commit: QPIDJMS-169 Use the StandardCharsets value for UTF8

Repository: qpid-jms
Updated Branches:
  refs/heads/master 52f5d9f76 -> 3c19c6af3


QPIDJMS-169 Use the StandardCharsets value for UTF8

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

Branch: refs/heads/master
Commit: 3c19c6af36c0fd8a07f0245148bcd136021a590a
Parents: 52f5d9f
Author: Timothy Bish <ta...@gmail.com>
Authored: Thu Apr 7 10:28:45 2016 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Thu Apr 7 10:28:45 2016 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/qpid/jms/sasl/PlainMechanism.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/3c19c6af/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/PlainMechanism.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/PlainMechanism.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/PlainMechanism.java
index 4d4e94d..c01f028 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/PlainMechanism.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/PlainMechanism.java
@@ -16,7 +16,7 @@
  */
 package org.apache.qpid.jms.sasl;
 
-import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 import java.security.Principal;
 
 /**
@@ -50,8 +50,8 @@ public class PlainMechanism extends AbstractMechanism {
             password = "";
         }
 
-        byte[] usernameBytes = username.getBytes(Charset.forName("UTF-8"));
-        byte[] passwordBytes = password.getBytes(Charset.forName("UTF-8"));
+        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