Tapestry will crash on startup if tapestry-upload is on the classpath.
----------------------------------------------------------------------
Key: TAP5-1504
URL: https://issues.apache.org/jira/browse/TAP5-1504
Project: Tapestry 5
Issue Type: Bug
Components: tapestry-upload
Affects Versions: 5.2.5
Reporter: Alejandro Scandroli
I'm trying to deploy a tapestry project to GAE. Everything seems to work fine
except for tapestry-upload. In fact the application will crash on startup if
the tapestry-upload library is on the classpath, even when I contribute my own
GAE compatible FileItemFactory.
After a little bit of digging I found the offending line in UploadModule:
configuration.add(UploadSymbols.REPOSITORY_LOCATION,
System.getProperty("java.io.tmpdir"));
This line will throw a NPE when System.getProperty("java.io.tmpdir") returns
NULL. I couldn't find any quick workarounds without having to touch the
UploadModule code, that's why I'm filing this issue.
My naïve attempt to fix this is to use:
String tmpdir = System.getProperty("java.io.tmpdir");
if (tmpdir != null) configuration.add(UploadSymbols.REPOSITORY_LOCATION,
tmpdir);
But I don't know If I should consider other scenarios.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira