cshannon commented on code in PR #2165:
URL: https://github.com/apache/activemq/pull/2165#discussion_r3509811980
##########
activemq-broker/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java:
##########
@@ -516,12 +561,44 @@ public PList getDiskList() {
return diskList;
}
+ private void discardMessage(MessageReference reference, DiscardType
discardType) {
+ if (discardType == DiscardType.EXPIRED) {
Review Comment:
This is actually not recommended.
== is generally recommended for enum values for 2 reasons:
1. You get null check safety
2. The code won't compile if you screw up and mix enum types, where as
.equals() takes an object and will compile even if you used the wrong type that
will never be equals.
--
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