Skip to content

Commit 3a50c92

Browse files
man-moonsjohnr
authored andcommitted
Replace wildcard type ? with * in Kotlin and fix typo
1 parent 91a8ed1 commit 3a50c92

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/modules/ROOT/pages/servlet/integrations/websocket.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Kotlin::
5858
@EnableWebSocketSecurity // <1> <2>
5959
open class WebSocketSecurityConfig { // <1> <2>
6060
@Bean
61-
fun messageAuthorizationManager(messages: MessageMatcherDelegatingAuthorizationManager.Builder): AuthorizationManager<Message<?>> {
61+
fun messageAuthorizationManager(messages: MessageMatcherDelegatingAuthorizationManager.Builder): AuthorizationManager<Message<*>> {
6262
messages.simpDestMatchers("/user/**").hasRole("USER") // <3>
6363
return messages.build()
6464
}
@@ -108,7 +108,7 @@ Kotlin::
108108
@EnableWebSocketSecurity // <1> <2>
109109
open class WebSocketSecurityConfig {
110110
@Bean
111-
fun messageAuthorizationManager(messages: MessageMatcherDelegatingAuthorizationManager.Builder): AuthorizationManager<Message<?>> {
111+
fun messageAuthorizationManager(messages: MessageMatcherDelegatingAuthorizationManager.Builder): AuthorizationManager<Message<*>> {
112112
return AuthorityAuthorizationManager.hasRole("USER") // <3>
113113
}
114114
}
@@ -156,7 +156,7 @@ Kotlin::
156156
----
157157
@Configuration
158158
open class WebSocketSecurityConfig {
159-
fun messageAuthorizationManager(messages: MessageMatcherDelegatingAuthorizationManager.Builder): AuthorizationManager<Message<?> {
159+
fun messageAuthorizationManager(messages: MessageMatcherDelegatingAuthorizationManager.Builder): AuthorizationManager<Message<*>> {
160160
messages
161161
.nullDestMatcher().authenticated() // <1>
162162
.simpSubscribeDestMatchers("/user/queue/errors").permitAll() // <2>
@@ -394,7 +394,7 @@ open class WebSocketSecurityConfig : WebSocketMessageBrokerConfigurer {
394394
395395
@Override
396396
override fun configureClientInboundChannel(registration: ChannelRegistration) {
397-
var myAuthorizationRules: AuthorizationManager<Message<?>> = AuthenticatedAuthorizationManager.authenticated()
397+
var myAuthorizationRules: AuthorizationManager<Message<*>> = AuthenticatedAuthorizationManager.authenticated()
398398
var authz: AuthorizationChannelInterceptor = AuthorizationChannelInterceptor(myAuthorizationRules)
399399
var publisher: AuthorizationEventPublisher = SpringAuthorizationEventPublisher(this.context)
400400
authz.setAuthorizationEventPublisher(publisher)

0 commit comments

Comments
 (0)