You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/08/26 20:02:53 UTC

[GitHub] [qpid-protonj2] jiridanek commented on a change in pull request #2: PROTON-2417 Add errorprone to the maven build

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



##########
File path: protonj2-client/src/test/java/org/apache/qpid/protonj2/client/util/ExternalMessage.java
##########
@@ -237,6 +237,7 @@ public String contentEncoding() {
     }
 
     @Override
+    @SuppressWarnings("NullTernary")
     public long absoluteExpiryTime() {
         return properties != null ? properties.getAbsoluteExpiryTime() : null;
     }

Review comment:
       This warning looks sensible to me. Returning `null` from a method with a primitive return type `long` is not possible.

##########
File path: protonj2/src/test/java/org/apache/qpid/protonj2/engine/impl/ProtonOutgoingDeliveryTest.java
##########
@@ -53,6 +54,7 @@ public void testSetGetMessageFormat() throws Exception {
         delivery.setMessageFormat(newFormat);
         assertEquals(newFormat, delivery.getMessageFormat(), "Unexpected message format");
 
+        // todo, that's 0, unlikely it is the highest value ;P
         // Highest value
         newFormat = (1 << 32) - 1;

Review comment:
       Also sensible, `(1 << 32) - 1` there evaluates to 0. That is not what was intended by the test.




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