Consistent not-null assertions for configured interceptors
Closes gh-25089
This commit is contained in:
committed by
Juergen Hoeller
parent
4798da05ae
commit
f4d33a6dfe
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -76,11 +76,13 @@ public abstract class AbstractMessageChannel implements MessageChannel, Intercep
|
||||
|
||||
@Override
|
||||
public void addInterceptor(ChannelInterceptor interceptor) {
|
||||
Assert.notNull(interceptor, "ChannelInterceptor must not be null");
|
||||
this.interceptors.add(interceptor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInterceptor(int index, ChannelInterceptor interceptor) {
|
||||
Assert.notNull(interceptor, "ChannelInterceptor must not be null");
|
||||
this.interceptors.add(index, interceptor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user