tabish121 commented on code in PR #2088:
URL: https://github.com/apache/activemq/pull/2088#discussion_r3375071734


##########
activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionMetaData.java:
##########
@@ -175,8 +179,10 @@ private static String getPlatformDetails() {
             platformInfo.append(", ");
             platformInfo.append(System.getProperty("os.arch"));
 
-            details = platformInfo.toString();
-        } catch (Throwable e) {
+            // truncate to the max allowed length if too long
+            details = platformInfo.length() > PLATFORM_DETAILS_MAX_LENGTH ?

Review Comment:
   This cuts off the details without any indication they were cut off, which is 
probably fine. I have seen some implementation do this by inserting an ellipsis 
after a given point and then appending a small bit trailing value such that you 
get a sort of visual indication that it was clipped.  Probably not needed here 
so just making sure you thought about that.



-- 
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.

To unsubscribe, e-mail: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to