CommonsMultipartResolver explicitly converts FileSizeLimitExceededException

Issue: SPR-14638
(cherry picked from commit 58ffca7)
This commit is contained in:
Juergen Hoeller 2016-08-30 12:57:46 +02:00
parent 8e98177fb3
commit 05f74b4218
2 changed files with 10 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -161,8 +161,11 @@ public class CommonsMultipartResolver extends CommonsFileUploadSupport
catch (FileUploadBase.SizeLimitExceededException ex) {
throw new MaxUploadSizeExceededException(fileUpload.getSizeMax(), ex);
}
catch (FileUploadBase.FileSizeLimitExceededException ex) {
throw new MaxUploadSizeExceededException(fileUpload.getFileSizeMax(), ex);
}
catch (FileUploadException ex) {
throw new MultipartException("Could not parse multipart servlet request", ex);
throw new MultipartException("Failed to parse multipart servlet request", ex);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -156,8 +156,11 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport
catch (FileUploadBase.SizeLimitExceededException ex) {
throw new MaxUploadSizeExceededException(fileUpload.getSizeMax(), ex);
}
catch (FileUploadBase.FileSizeLimitExceededException ex) {
throw new MaxUploadSizeExceededException(fileUpload.getFileSizeMax(), ex);
}
catch (FileUploadException ex) {
throw new MultipartException("Could not parse multipart portlet request", ex);
throw new MultipartException("Failed to parse multipart portlet request", ex);
}
}