null pointer exception uploading files
--------------------------------------
Key: ROL-1802
URL: https://issues.apache.org/roller/browse/ROL-1802
Project: Roller
Issue Type: Bug
Components: Import / Export
Affects Versions: 5.0
Reporter: Greg Huber
Assignee: Roller Unassigned
Hello,
When uploading a file, FileManager.canSave() uses
errors.addError("error.upload.badPath"). In Resources #253 there is a check
for any errors:
for (Iterator it = errors.getErrors(); it.hasNext();) {
RollerMessage msg = (RollerMessage)it.next();
addError(msg.getKey(), Arrays.asList(msg.getArgs()));
}
but msg.getArgs() would be null, as errors.addError("error.upload.badPath")
needs to be errors.addError("error.upload.badPath","SomeText").
need:
for (Iterator it = errors.getErrors(); it.hasNext();) {
RollerMessage msg = (RollerMessage)it.next();
if (msg.getArgs() != null) {
addError(msg.getKey(), Arrays.asList(msg.getArgs()));
} else {
addError(msg.getKey());
}
}
also error.upload.badPath needs to be added the
ApplicationResources.properties.
Cheers Greg
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.