cshannon commented on code in PR #2698:
URL: https://github.com/apache/activemq/pull/2698#discussion_r4493357077


##########
activemq-client/src/main/java/org/apache/activemq/util/MarshallingSupport.java:
##########
@@ -450,6 +450,23 @@ else if (((a = out[s]) & 0xe0) == 0xc0) {
                 if (((b & 0xC0) != 0x80) || ((c & 0xC0) != 0x80))
                     throw new UTFDataFormatException();
                 out[s++] = (char) (((a & 0x0F) << 12) | ((b & 0x3F) << 6) | (c 
& 0x3F));
+            } else if ((a & 0xf8) == 0xf0) {
+                // A standard UTF-8 four-byte sequence, U+10000 to U+10FFFF. 
Modified UTF-8 never
+                // contains one, since it writes such a character as a 
surrogate pair of three-byte
+                // sequences, but OpenWire clients that are not Java, such as 
ActiveMQ-CPP, send it as
+                // is. It decodes to the same surrogate pair, so nothing that 
decoded before changes.
+                if (count + 2 >= utfSize)

Review Comment:
   small nit, I know the rest of the method doesn't do it either but we should 
really be using braces even for one line statements. it could be changed now or 
i suppose we could just do a cleaup PR as a follow on for the whole method



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