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: [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]