SPR-6464 Fix minor issue
This commit is contained in:
parent
6f1818a604
commit
c97257b16f
|
|
@ -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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue