HandlerExecutionChain prevents re-adding the interceptors array to the list (and declares varargs now)

Issue: SPR-12566
This commit is contained in:
Juergen Hoeller
2014-12-23 18:27:49 +01:00
parent d55af2b445
commit 6b3023c2aa
3 changed files with 69 additions and 59 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 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.
@@ -46,6 +46,7 @@ public class HandlerExecutionChainTests {
private AsyncHandlerInterceptor interceptor3;
@Before
public void setup() {
this.request = new MockHttpServletRequest();
@@ -60,9 +61,12 @@ public class HandlerExecutionChainTests {
this.chain.addInterceptor(this.interceptor1);
this.chain.addInterceptor(this.interceptor2);
assertEquals(2, this.chain.getInterceptors().length);
this.chain.addInterceptor(this.interceptor3);
assertEquals(3, this.chain.getInterceptors().length);
}
@Test
public void successScenario() throws Exception {
ModelAndView mav = new ModelAndView();