You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "David Johnson (JIRA)" <ji...@apache.org> on 2009/05/24 20:47:45 UTC

[jira] Resolved: (ROL-1802) null pointer exception uploading files

     [ https://issues.apache.org/jira/browse/ROL-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Johnson resolved ROL-1802.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0
         Assignee: David Johnson  (was: Roller Unassigned)

Fixed in trunk for 5.0
    http://svn.apache.org/viewvc?rev=778209&view=rev

Thanks Greg!

> null pointer exception uploading files
> --------------------------------------
>
>                 Key: ROL-1802
>                 URL: https://issues.apache.org/jira/browse/ROL-1802
>             Project: Roller
>          Issue Type: Bug
>          Components: Import / Export
>    Affects Versions: 5.0
>            Reporter: Greg Huber
>            Assignee: David Johnson
>             Fix For: 5.0
>
>
> 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.