You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "Greg Huber (JIRA)" <ji...@apache.org> on 2009/03/27 15:31:08 UTC
[jira] Created: (ROL-1802) null pointer exception uploading files
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.
[jira] Commented: (ROL-1802) null pointer exception uploading files
Posted by "Greg Huber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/roller/browse/ROL-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14557#action_14557 ]
Greg Huber commented on ROL-1802:
---------------------------------
Sorry need to be minor!
> 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.