tabish121 commented on a change in pull request #1:
URL: https://github.com/apache/qpid-protonj2/pull/1#discussion_r695177534
##########
File path:
protonj2/src/main/java/org/apache/qpid/protonj2/codec/encoders/AbstractDescribedMapTypeEncoder.java
##########
@@ -156,8 +156,8 @@ public void writeArray(ProtonBuffer buffer, EncoderState
state, Object[] values)
// Move back and write the size
final int writeSize = buffer.getWriteIndex() - startIndex -
Integer.BYTES;
- if (writeSize > Integer.MAX_VALUE) {
- throw new IllegalArgumentException("Cannot encode given array,
encoded size to large: " + writeSize);
+ if (writeSize > Integer.MAX_VALUE) { // same, always false
Review comment:
There is no breakage caused by it and a future change to buffer API
might allow for long values to allow for very large composite buffers at which
point this would be valid so not sure I would address it here.
--
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]