[jboss-jira] [JBoss JIRA] Commented: (JBESB-335) File.getParent can return null

Esteban Schifman (JIRA) jira-events at jboss.com
Sun Jan 7 08:39:26 EST 2007


    [ http://jira.jboss.com/jira/browse/JBESB-335?page=comments#action_12349679 ] 
            
Esteban Schifman commented on JBESB-335:
----------------------------------------

Fixes have been introduced assuming a null getParent() is equivalent to "" (zero length string) and a null getParentFile() can be fixed using new File("").


> File.getParent can return null
> ------------------------------
>
>                 Key: JBESB-335
>                 URL: http://jira.jboss.com/jira/browse/JBESB-335
>             Project: JBoss ESB
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Rosetta
>    Affects Versions: 4.0 CR2
>            Reporter: Mark Little
>         Assigned To: Esteban Schifman
>            Priority: Blocker
>             Fix For: 4.0 CR2
>
>
> FileCourier.postFile relies on getParent never returning null so it can get the post directory if one is not specified in the EPR. It even does a comparison later on without checking for null. Unfortunately it is legal for getParent to return null. However, in that situation we should throw an exception at the very least. The signature doesn't allow for it and I'm not changing it yet. If a post directory is not specified we will assume a relative default directory of 'post'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list