[jira] Created: (CARGO-735) AbstractInstalledLocalContainer will cause a NullPointerException if a simple file name is used as the "output" file

View: New views
2 Messages — Rating Filter:   Alert me  

[jira] Created: (CARGO-735) AbstractInstalledLocalContainer will cause a NullPointerException if a simple file name is used as the "output" file

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

AbstractInstalledLocalContainer will cause a NullPointerException if a simple file name is used as the "output" file
--------------------------------------------------------------------------------------------------------------------

                 Key: CARGO-735
                 URL: http://jira.codehaus.org/browse/CARGO-735
             Project: Cargo
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0.1
            Reporter: Christopher Rued
            Priority: Minor
         Attachments: diff.txt

AbstractInstalledLocalContainer's createJavaTask method attempts to ensure that all the correct folders exist before creating the output file.  It does this by calling outputFile.getParentFile().mkdirs() without first ensuring that outputFile.getParentFile() is not null.

To work around this, the value of outputFile.getParentFile() should be checked, or outputFile.getAbsoluteFile().getParentFile().mkdirs() should be used (since the absolute file must have a parent).

Patch attached.

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Closed: (CARGO-735) AbstractInstalledLocalContainer will cause a NullPointerException if a simple file name is used as the "output" file

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/CARGO-735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Wringe closed CARGO-735.
-----------------------------

    Resolution: Fixed

Patch committed into svn head.

> AbstractInstalledLocalContainer will cause a NullPointerException if a simple file name is used as the "output" file
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: CARGO-735
>                 URL: http://jira.codehaus.org/browse/CARGO-735
>             Project: Cargo
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.1
>            Reporter: Christopher Rued
>            Priority: Minor
>         Attachments: diff.txt
>
>
> AbstractInstalledLocalContainer's createJavaTask method attempts to ensure that all the correct folders exist before creating the output file.  It does this by calling outputFile.getParentFile().mkdirs() without first ensuring that outputFile.getParentFile() is not null.
> To work around this, the value of outputFile.getParentFile() should be checked, or outputFile.getAbsoluteFile().getParentFile().mkdirs() should be used (since the absolute file must have a parent).
> Patch attached.

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email