Fix return type
AbstractConfiguredSecurityBuilder.objectPostProcessor() should cast to B, the type of SecurityBuilder, instead of O, the type of object being built. Without this change, calls like http.objectPostProcessor(...).getFilters() will fail with a ClassCastException.
This commit is contained in:
parent
f109388211
commit
b4619f31ee
|
@ -286,10 +286,10 @@ public abstract class AbstractConfiguredSecurityBuilder<O, B extends SecurityBui
|
|||
* @return the {@link SecurityBuilder} for further customizations
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public O objectPostProcessor(ObjectPostProcessor<Object> objectPostProcessor) {
|
||||
public B objectPostProcessor(ObjectPostProcessor<Object> objectPostProcessor) {
|
||||
Assert.notNull(objectPostProcessor, "objectPostProcessor cannot be null");
|
||||
this.objectPostProcessor = objectPostProcessor;
|
||||
return (O) this;
|
||||
return (B) this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue