Merge branch 'SPR-10093' into 3.2.x
* SPR-10093: Polish changes from pull request #205
This commit is contained in:
@@ -54,7 +54,7 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB
|
|||||||
private final List<ResultMatcher> globalResultMatchers = new ArrayList<ResultMatcher>();
|
private final List<ResultMatcher> globalResultMatchers = new ArrayList<ResultMatcher>();
|
||||||
|
|
||||||
private final List<ResultHandler> globalResultHandlers = new ArrayList<ResultHandler>();
|
private final List<ResultHandler> globalResultHandlers = new ArrayList<ResultHandler>();
|
||||||
|
|
||||||
private Boolean dispatchOptions = Boolean.FALSE;
|
private Boolean dispatchOptions = Boolean.FALSE;
|
||||||
|
|
||||||
|
|
||||||
@@ -180,17 +180,17 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB
|
|||||||
this.globalResultHandlers.add(resultHandler);
|
this.globalResultHandlers.add(resultHandler);
|
||||||
return (T) this;
|
return (T) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should the {@link DispatcherServlet} dispatch OPTIONS request to controllers.
|
* Should the {@link DispatcherServlet} dispatch OPTIONS request to controllers.
|
||||||
* @param dispatchOptions
|
* @param dispatchOptions
|
||||||
* @see {@link DispatcherServlet#setDispatchOptionsRequest(boolean)}
|
* @see DispatcherServlet#setDispatchOptionsRequest(boolean)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public final <T extends Self> T dispatchOptions(boolean dispatchOptions) {
|
public final <T extends Self> T dispatchOptions(boolean dispatchOptions) {
|
||||||
this.dispatchOptions = dispatchOptions;
|
this.dispatchOptions = dispatchOptions;
|
||||||
return (T) this;
|
return (T) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a {@link MockMvc} instance.
|
* Build a {@link MockMvc} instance.
|
||||||
|
|||||||
Reference in New Issue
Block a user