cshannon commented on code in PR #2080:
URL: https://github.com/apache/activemq/pull/2080#discussion_r3365192557
##########
activemq-client/src/main/java/org/apache/activemq/util/MarshallingSupport.java:
##########
@@ -350,7 +358,11 @@ public static int writeUTFBytesToBuffer(String str, long
count,
}
public static String readUTF8(DataInput dataIn) throws IOException {
- int utflen = dataIn.readInt();
+ return readUTF8(dataIn, Integer.MAX_VALUE);
Review Comment:
That is a good point, I agree this could be looked into for improvement as
well. This is a utility class and method so I would need to look where else it
could be used.
This particular method wasn't touched and is used at all by WireFormatInfo
so I don't think it needs to be changed now. It could be used in the future by
various use cases, also there's a chance (and likely) the stream could be a
compressed stream which would impact the available() call as well. So I can
look into it as a separate follow on.
--
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