commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Glassmyer (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CONFIGURATION-421) VFSFileChangedReloadingStrategy.init() uses configuration before checking it for null
Date Sat, 08 Oct 2011 05:55:29 GMT

     [ 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

        

Mime
View raw message