Skip to content

Commit 60c551a

Browse files
committed
Correct clientInboundChannel assertion (includes constructor javadoc)
Closes gh-26896
1 parent 4164fc6 commit 60c551a

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractBrokerRegistration.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,10 +42,16 @@ public abstract class AbstractBrokerRegistration {
4242
private final List<String> destinationPrefixes;
4343

4444

45+
/**
46+
* Create a new broker registration.
47+
* @param clientInboundChannel the inbound channel
48+
* @param clientOutboundChannel the outbound channel
49+
* @param destinationPrefixes the destination prefixes
50+
*/
4551
public AbstractBrokerRegistration(SubscribableChannel clientInboundChannel,
4652
MessageChannel clientOutboundChannel, @Nullable String[] destinationPrefixes) {
4753

48-
Assert.notNull(clientOutboundChannel, "'clientInboundChannel' must not be null");
54+
Assert.notNull(clientInboundChannel, "'clientInboundChannel' must not be null");
4955
Assert.notNull(clientOutboundChannel, "'clientOutboundChannel' must not be null");
5056

5157
this.clientInboundChannel = clientInboundChannel;

spring-messaging/src/main/java/org/springframework/messaging/simp/config/SimpleBrokerRegistration.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,8 +40,16 @@ public class SimpleBrokerRegistration extends AbstractBrokerRegistration {
4040
private String selectorHeaderName = "selector";
4141

4242

43-
public SimpleBrokerRegistration(SubscribableChannel inChannel, MessageChannel outChannel, String[] prefixes) {
44-
super(inChannel, outChannel, prefixes);
43+
/**
44+
* Create a new {@code SimpleBrokerRegistration}.
45+
* @param clientInboundChannel the inbound channel
46+
* @param clientOutboundChannel the outbound channel
47+
* @param destinationPrefixes the destination prefixes
48+
*/
49+
public SimpleBrokerRegistration(SubscribableChannel clientInboundChannel,
50+
MessageChannel clientOutboundChannel, String[] destinationPrefixes) {
51+
52+
super(clientInboundChannel, clientOutboundChannel, destinationPrefixes);
4553
}
4654

4755

spring-messaging/src/main/java/org/springframework/messaging/simp/config/StompBrokerRelayRegistration.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -68,6 +68,12 @@ public class StompBrokerRelayRegistration extends AbstractBrokerRegistration {
6868
private String userRegistryBroadcast;
6969

7070

71+
/**
72+
* Create a new {@code StompBrokerRelayRegistration}.
73+
* @param clientInboundChannel the inbound channel
74+
* @param clientOutboundChannel the outbound channel
75+
* @param destinationPrefixes the destination prefixes
76+
*/
7177
public StompBrokerRelayRegistration(SubscribableChannel clientInboundChannel,
7278
MessageChannel clientOutboundChannel, String[] destinationPrefixes) {
7379

0 commit comments

Comments
 (0)