You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/11/20 16:09:54 UTC
[GitHub] [activemq-artemis] gtully commented on a change in pull request #3352: ARTEMIS-2990 - alway be getBiased and only publish complete records a…
gtully commented on a change in pull request #3352:
URL: https://github.com/apache/activemq-artemis/pull/3352#discussion_r527795581
##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java
##########
@@ -84,6 +84,7 @@ public void addLinkedAddress(final Address address) {
if (linkedAddresses == null) {
linkedAddresses = PlatformDependent.hasUnsafe() ? new NonBlockingHashSet<>() : new ConcurrentHashSet<>();
}
+ assert !linkedAddresses.contains(address);
Review comment:
I am not a fan of asserts generally, but in this case, if I added that assert with my original change, this PR would not be necessary. I think it serves a purpose. It forces a test failure on bad usage.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org