Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-421

VFSFileChangedReloadingStrategy.init() uses configuration before checking it for null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 2.x
    • File reloading
    • None

    Description

      VFSFileChangedReloadingStrategy.init() uses configuration before checking it for null:

              if (configuration.getURL() == null && configuration.getFileName() == null)
              {
                  return;
              }
              if (this.configuration == null)
              {
                  throw new IllegalStateException("No configuration has been set for this strategy");
              }
      

      The if statements should be swapped.

      [Note found by Findbugs]

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: