qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [qpid-protonj2] jiridanek commented on a change in pull request #1: PROTON-2398 Fix typos in production and test code found by running a spellchecker
Date Tue, 24 Aug 2021 20:16:52 GMT

jiridanek commented on a change in pull request #1:
URL: https://github.com/apache/qpid-protonj2/pull/1#discussion_r695171323



##########
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:
       I've rebased out the comment; do you think the "condition is always false" is worth
addressing somehow? I would think so, given the if check directly before it...




-- 
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: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message