You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/04/24 23:56:24 UTC

[GitHub] [activemq] thodimi1 opened a new pull request #523: AMQ-7467

thodimi1 opened a new pull request #523:
URL: https://github.com/apache/activemq/pull/523


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [activemq] jbonofre merged pull request #523: AMQ-7467 - A new XStream serializer is created on every message that flows through the broker causing high CPU utilization under load

Posted by GitBox <gi...@apache.org>.
jbonofre merged pull request #523:
URL: https://github.com/apache/activemq/pull/523


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [activemq] jbonofre commented on a change in pull request #523: AMQ-7467 - A new XStream serializer is created on every message that flows through the broker causing high CPU utilization under load

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [activemq] thodimi1 commented on a change in pull request #523: AMQ-7467 - A new XStream serializer is created on every message that flows through the broker causing high CPU utilization under load

Posted by GitBox <gi...@apache.org>.
thodimi1 commented on a change in pull request #523:
URL: https://github.com/apache/activemq/pull/523#discussion_r426158501



##########
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:
       Corrected




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [activemq] thodimi1 commented on a change in pull request #523: AMQ-7467 - A new XStream serializer is created on every message that flows through the broker causing high CPU utilization under load

Posted by GitBox <gi...@apache.org>.
thodimi1 commented on a change in pull request #523:
URL: https://github.com/apache/activemq/pull/523#discussion_r426158516



##########
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:
       Corrected
   




----------------------------------------------------------------
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:
users@infra.apache.org