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/16 11:25:24 UTC
[GitHub] [activemq-artemis] gtully opened a new pull request #3344: ARTEMIS-2990 - update wildcard address map on creation only, avoid du…
gtully opened a new pull request #3344:
URL: https://github.com/apache/activemq-artemis/pull/3344
…plicates and duplicate checks
----------------------------------------------------------------
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
[GitHub] [activemq-artemis] franz1981 commented on a change in pull request #3344: ARTEMIS-2990 - update wildcard address map on creation only, avoid du…
Posted by GitBox <gi...@apache.org>.
franz1981 commented on a change in pull request #3344:
URL: https://github.com/apache/activemq-artemis/pull/3344#discussion_r524344331
##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java
##########
@@ -69,24 +68,16 @@ public boolean containsWildCard() {
@Override
public List<Address> getLinkedAddresses() {
- return linkedAddresses == null ? Collections.emptyList() : linkedAddresses;
+ return linkedAddresses;
}
@Override
public void addLinkedAddress(final Address address) {
- if (linkedAddresses == null) {
- linkedAddresses = new ArrayList<>(1);
- }
- if (!linkedAddresses.contains(address)) {
- linkedAddresses.add(address);
- }
+ linkedAddresses.add(address);
Review comment:
I would add an `assert !linkedAddress,contains(address)` here as an invariant on the tests
----------------------------------------------------------------
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
[GitHub] [activemq-artemis] michaelandrepearce commented on pull request #3344: ARTEMIS-2990 - update wildcard address map on creation only, avoid du…
Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on pull request #3344:
URL: https://github.com/apache/activemq-artemis/pull/3344#issuecomment-728247742
@gtully polite ask. Can you please let prs open for at least a day or two for people to have time to review before merging. This pr was raised and merged in only a few ours not allowing anyone time to review
----------------------------------------------------------------
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
[GitHub] [activemq-artemis] michaelandrepearce commented on a change in pull request #3344: ARTEMIS-2990 - update wildcard address map on creation only, avoid du…
Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #3344:
URL: https://github.com/apache/activemq-artemis/pull/3344#discussion_r527812714
##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java
##########
@@ -69,24 +68,16 @@ public boolean containsWildCard() {
@Override
public List<Address> getLinkedAddresses() {
- return linkedAddresses == null ? Collections.emptyList() : linkedAddresses;
+ return linkedAddresses;
}
@Override
public void addLinkedAddress(final Address address) {
- if (linkedAddresses == null) {
- linkedAddresses = new ArrayList<>(1);
- }
- if (!linkedAddresses.contains(address)) {
- linkedAddresses.add(address);
- }
+ linkedAddresses.add(address);
Review comment:
It is better to follow the pattern from set interface and return true / false if operation actually actioned
----------------------------------------------------------------
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
[GitHub] [activemq-artemis] gtully commented on pull request #3344: ARTEMIS-2990 - update wildcard address map on creation only, avoid du…
Posted by GitBox <gi...@apache.org>.
gtully commented on pull request #3344:
URL: https://github.com/apache/activemq-artemis/pull/3344#issuecomment-728266654
@michaelandrepearce polite ack.
----------------------------------------------------------------
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
[GitHub] [activemq-artemis] michaelandrepearce edited a comment on pull request #3344: ARTEMIS-2990 - update wildcard address map on creation only, avoid du…
Posted by GitBox <gi...@apache.org>.
michaelandrepearce edited a comment on pull request #3344:
URL: https://github.com/apache/activemq-artemis/pull/3344#issuecomment-728247742
@gtully polite ask. Can you please let prs open for at least a day or two for people to have time to review before merging. This pr was raised and merged in only a few hours not allowing anyone time to review
----------------------------------------------------------------
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
[GitHub] [activemq-artemis] gtully merged pull request #3344: ARTEMIS-2990 - update wildcard address map on creation only, avoid du…
Posted by GitBox <gi...@apache.org>.
gtully merged pull request #3344:
URL: https://github.com/apache/activemq-artemis/pull/3344
----------------------------------------------------------------
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
[GitHub] [activemq-artemis] michaelandrepearce commented on a change in pull request #3344: ARTEMIS-2990 - update wildcard address map on creation only, avoid du…
Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #3344:
URL: https://github.com/apache/activemq-artemis/pull/3344#discussion_r524488821
##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java
##########
@@ -37,7 +36,7 @@
private final boolean containsWildCard;
- private List<Address> linkedAddresses = null;
+ private final List<Address> linkedAddresses = new ArrayList<>();
Review comment:
Whats the impact here for those not using wildcards
----------------------------------------------------------------
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
[GitHub] [activemq-artemis] gtully commented on a change in pull request #3344: ARTEMIS-2990 - update wildcard address map on creation only, avoid du…
Posted by GitBox <gi...@apache.org>.
gtully commented on a change in pull request #3344:
URL: https://github.com/apache/activemq-artemis/pull/3344#discussion_r524509090
##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java
##########
@@ -37,7 +36,7 @@
private final boolean containsWildCard;
- private List<Address> linkedAddresses = null;
+ private final List<Address> linkedAddresses = new ArrayList<>();
Review comment:
there is an impact, it is reverted to lazy init via https://github.com/apache/activemq-artemis/pull/3343 where a set works better for deletions.
----------------------------------------------------------------
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
[GitHub] [activemq-artemis] michaelandrepearce commented on a change in pull request #3344: ARTEMIS-2990 - update wildcard address map on creation only, avoid du…
Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #3344:
URL: https://github.com/apache/activemq-artemis/pull/3344#discussion_r527812250
##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java
##########
@@ -69,24 +68,16 @@ public boolean containsWildCard() {
@Override
public List<Address> getLinkedAddresses() {
- return linkedAddresses == null ? Collections.emptyList() : linkedAddresses;
+ return linkedAddresses;
}
@Override
public void addLinkedAddress(final Address address) {
- if (linkedAddresses == null) {
- linkedAddresses = new ArrayList<>(1);
- }
- if (!linkedAddresses.contains(address)) {
- linkedAddresses.add(address);
- }
+ linkedAddresses.add(address);
Review comment:
Dont add assert into runtime code.
----------------------------------------------------------------
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