SPR-6464 Fix minor issue

This commit is contained in:
Rossen Stoyanchev 2011-08-11 10:25:16 +00:00
parent 6f1818a604
commit c97257b16f
4 changed files with 6 additions and 3 deletions

View File

@ -62,7 +62,7 @@ import org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMeth
* @see #handleTypeMismatch
* @see #handleHttpMessageNotReadable
* @see #handleHttpMessageNotWritable
* @see #handleRequestBodyNotValidException
* @see #handleMethodArgumentNotValidException
*/
public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionResolver {

View File

@ -121,7 +121,9 @@ public class DefaultFlashMapManager implements FlashMapManager {
if (!matches.isEmpty()) {
Collections.sort(matches);
return matches.remove(0);
FlashMap match = matches.remove(0);
allMaps.remove(match);
return match;
}
return null;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.web.servlet.support;
package org.springframework.web.servlet;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

View File

@ -71,6 +71,7 @@ public class DefaultFlashMapManagerTests {
this.flashMapManager.requestStarted(this.request);
assertSame(flashMap, request.getAttribute(DefaultFlashMapManager.PREVIOUS_FLASH_MAP_ATTRIBUTE));
assertEquals("Previous FlashMap should have been removed", 0, allMaps.size());
}
@Test