Skip to content

Commit

Permalink
Merge branch '3.0.x' into 3.1.x
Browse files Browse the repository at this point in the history
Closes gh-37553
  • Loading branch information
wilkinsona committed Sep 22, 2023
2 parents 3803bd9 + e2982a3 commit c838c70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -146,7 +146,8 @@ public static class Listener {
private AcknowledgeMode acknowledgeMode;

/**
* Minimum number of concurrent consumers.
* Minimum number of concurrent consumers. When max-concurrency is not specified
* the minimum will also be used as the maximum.
*/
private Integer concurrency;

Expand Down Expand Up @@ -198,8 +199,7 @@ public String formatConcurrency() {
if (this.concurrency == null) {
return (this.maxConcurrency != null) ? "1-" + this.maxConcurrency : null;
}
return ((this.maxConcurrency != null) ? this.concurrency + "-" + this.maxConcurrency
: String.valueOf(this.concurrency));
return this.concurrency + "-" + ((this.maxConcurrency != null) ? this.maxConcurrency : this.concurrency);
}

public Duration getReceiveTimeout() {
Expand Down
Expand Up @@ -41,7 +41,7 @@ void formatConcurrencyNull() {
void formatConcurrencyOnlyLowerBound() {
JmsProperties properties = new JmsProperties();
properties.getListener().setConcurrency(2);
assertThat(properties.getListener().formatConcurrency()).isEqualTo("2");
assertThat(properties.getListener().formatConcurrency()).isEqualTo("2-2");
}

@Test
Expand Down

0 comments on commit c838c70

Please sign in to comment.