jbonofre commented on a change in pull request #523:
URL: https://github.com/apache/activemq/pull/523#discussion_r424884119



##########
File path: 
activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
##########
@@ -558,10 +568,6 @@ protected void onStompSubscribe(StompFrame command) throws 
ProtocolException {
             throw new ProtocolException("SUBSCRIBE received without a 
subscription id!");
         }
 
-        if (destination == null || "".equals(destination)) {
-            throw new ProtocolException("Invalid empty or 'null' Destination 
header");
-        }
-
         final ActiveMQDestination actualDest = 
translator.convertDestination(this, destination, true);

Review comment:
       Why don't we have the ProtocolException if destination is not defined ?

##########
File path: 
activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
##########
@@ -280,11 +294,7 @@ protected void handleException(Throwable exception, 
StompFrame command) throws I
         // Let the stomp client know about any protocol errors.
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         PrintWriter stream = new PrintWriter(new OutputStreamWriter(baos, 
"UTF-8"));
-        if (exception instanceof SecurityException || exception.getCause() 
instanceof SecurityException) {
-            stream.write(exception.getLocalizedMessage());
-        } else {
-            exception.printStackTrace(stream);
-        }
+        exception.printStackTrace(stream);

Review comment:
       Why not keeping the original code here writing SecurityException to the 
stream ?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to