roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Johnson (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (ROL-1802) null pointer exception uploading files
Date Sun, 24 May 2009 18:47:45 GMT

     [ 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.


Mime
View raw message