You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2007/11/29 10:20:55 UTC
svn commit: r599352 -
/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java
Author: mmarinschek
Date: Thu Nov 29 01:20:55 2007
New Revision: 599352
URL: http://svn.apache.org/viewvc?rev=599352&view=rev
Log:
fix for https://issues.apache.org/jira/browse/TOMAHAWK-6 (TOMAHAWK-6): adapted fix, thanks to Alexander Jesse
Modified:
myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java
Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java?rev=599352&r1=599351&r2=599352&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java Thu Nov 29 01:20:55 2007
@@ -127,17 +127,18 @@
String exception =
(String) context.getExternalContext().getRequestMap().get(FILEUPLOAD_EXCEPTION);
- if(exception != null && exception.equals(SIZE_LIMIT_EXCEEDED)) {
- Integer maxSize =
- (Integer) context.getExternalContext().getRequestMap().get(FILEUPLOAD_MAX_SIZE);
- MessageUtils.addMessage(FacesMessage.SEVERITY_ERROR,
- SIZE_LIMIT_MESSAGE_ID, new Object[] { getId(),
- maxSize},
- getClientId(context), context);
- setValid(false);
- }
- else {
- throw new IllegalStateException("other exceptions not handled yet.");
+ if(exception != null ) {
+ if(exception.equals(SIZE_LIMIT_EXCEEDED)) {
+ Integer maxSize =
+ (Integer) context.getExternalContext().getRequestMap().get(FILEUPLOAD_MAX_SIZE);
+ MessageUtils.addMessage(FacesMessage.SEVERITY_ERROR,
+ SIZE_LIMIT_MESSAGE_ID, new Object[] { getId(),
+ maxSize},
+ getClientId(context), context);
+ setValid(false);
+ }else {
+ throw new IllegalStateException("other exceptions not handled yet, exception : "+exception);
+ }
}
}
}