}\r
\r
public void setUploadedFile(UploadedFile uploadedFile) {\r
- logger.info(Utils.objectId(this) + " received an uploaded file [" + Utils.objectId(uploadedFile) + "]");\r
- this.uploadedFile = uploadedFile;\r
- try {\r
- logger.info("File length: " + this.uploadedFile.getBytes().length);\r
- } catch (IOException e) {\r
- // TODO Auto-generated catch block\r
- e.printStackTrace();\r
+ if (uploadedFile != null) {\r
+ logger.info(Utils.objectId(this) + " received an uploaded file [" + Utils.objectId(uploadedFile) + "]");\r
+ this.uploadedFile = uploadedFile;\r
+ try {\r
+ logger.info("File length: " + this.uploadedFile.getBytes().length);\r
+ } catch (IOException e) {\r
+ // TODO Auto-generated catch block\r
+ e.printStackTrace();\r
+ }\r
+ } else {\r
+ logger.info("Was asked to upload file, but no file specified");\r
}\r
}\r
\r