Author: andrei_exadel
Date: 2008-05-13 07:53:08 -0400 (Tue, 13 May 2008)
New Revision: 8551
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java
Log:
RF-3372
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java 2008-05-13
11:51:58 UTC (rev 8550)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java 2008-05-13
11:53:08 UTC (rev 8551)
@@ -290,23 +290,27 @@
}
private String decodeFileName(String name) {
- String fileName = null;
- StringBuffer buffer = new StringBuffer();
- String[] codes = name.split(";");
- if (codes != null) {
- for (String code : codes) {
- if (code.startsWith("&")) {
- String sCode = code.replaceAll("[&#]*", "");
- Integer iCode = Integer.parseInt(sCode);
- buffer.append(Character.toChars(iCode));
- }else {
- buffer.append(code);
- }
+ String fileName = null;
+ try {
+ StringBuffer buffer = new StringBuffer();
+ String[] codes = name.split(";");
+ if (codes != null) {
+ for (String code : codes) {
+ if (code.startsWith("&")) {
+ String sCode = code.replaceAll("[&#]*", "");
+ Integer iCode = Integer.parseInt(sCode);
+ buffer.append(Character.toChars(iCode));
+ } else {
+ buffer.append(code);
+ }
+ }
+ fileName = buffer.toString();
+ }
+ } catch (Exception e) {
+ fileName = name;
}
- fileName = buffer.toString();
- }
- return fileName;
- }
+ return fileName;
+ }
public void cancel() {
if (parameters != null) {
Show replies by date