activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r931089 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java
Date Tue, 06 Apr 2010 11:04:13 GMT
Author: dejanb
Date: Tue Apr  6 11:04:12 2010
New Revision: 931089

URL: http://svn.apache.org/viewvc?rev=931089&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2684 - encoding for web sockets and stomp

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java?rev=931089&r1=931088&r2=931089&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java
Tue Apr  6 11:04:12 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.transport.stomp;
 
+import java.io.UnsupportedEncodingException;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
@@ -72,7 +73,11 @@ public class StompFrame implements Comma
     }
     
     public String getBody() {
-    	return new String(content);
+    	try {
+    		return new String(content, "UTF-8");
+    	} catch (UnsupportedEncodingException e) {
+    		return new String(content);
+    	}
     }
 
     public void setContent(byte[] data) {



Mime
View raw message