You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "John Glassmyer (Updated) (JIRA)" <ji...@apache.org> on 2011/10/08 07:55:29 UTC

[jira] [Updated] (CONFIGURATION-421) VFSFileChangedReloadingStrategy.init() uses configuration before checking it for null

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

John Glassmyer updated CONFIGURATION-421:
-----------------------------------------

    Attachment: VFSFCRS.init - check for null before using configuration.diff

patch: fix and test
                
> VFSFileChangedReloadingStrategy.init() uses configuration before checking it for null
> -------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-421
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-421
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: File reloading
>            Reporter: Sebb
>         Attachments: VFSFCRS.init - check for null before using configuration.diff
>
>
> VFSFileChangedReloadingStrategy.init() uses configuration before checking it for null:
> {noformat}
>         if (configuration.getURL() == null && configuration.getFileName() == null)
>         {
>             return;
>         }
>         if (this.configuration == null)
>         {
>             throw new IllegalStateException("No configuration has been set for this strategy");
>         }
> {noformat}
> The if statements should be swapped.
> [Note found by Findbugs]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira