[hornetq-commits] JBoss hornetq SVN: r9800 - trunk/src/main/org/hornetq/core/protocol/stomp.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Oct 20 07:26:32 EDT 2010


Author: timfox
Date: 2010-10-20 07:26:32 -0400 (Wed, 20 Oct 2010)
New Revision: 9800

Modified:
   trunk/src/main/org/hornetq/core/protocol/stomp/StompDecoder.java
Log:
better logging for invalid frames

Modified: trunk/src/main/org/hornetq/core/protocol/stomp/StompDecoder.java
===================================================================
--- trunk/src/main/org/hornetq/core/protocol/stomp/StompDecoder.java	2010-10-20 09:04:53 UTC (rev 9799)
+++ trunk/src/main/org/hornetq/core/protocol/stomp/StompDecoder.java	2010-10-20 11:26:32 UTC (rev 9800)
@@ -549,15 +549,13 @@
       for (int i = 0; i < data; i++)
       {
          char b = (char)bytes[i];
-
-         if (b == '\n')
+         
+         if (b < 33 || b > 136)
          {
-            str.append("\\n");
+            //Unreadable characters
+            
+            str.append(bytes[i]);
          }
-         else if (b == 0)
-         {
-            str.append("NUL");
-         }
          else
          {
             str.append(b);



More information about the hornetq-commits mailing list