code: public static TypedProperties load(String file, FileLocation[] locations)
      {
          // If file is null.
          if (file == null)
          {
              // file must be specified.
              throw new IllegalArgumentException("file is null.");
          }
  
          // If locations is null.
          if (locations == null)
          {
              // locations must be specified.
              throw new IllegalArgumentException("locations is null.");
          }
  
          TypedProperties properties = null;
  
          // For each file location.
          for (FileLocation location : locations)
          {
              // If location is null.
              if (location == null)
              {
                  // Just ignore.
                  continue;
              }
  
              // Load the file from the location.
              properties = load(file, location);
  
              // If loaded successfully.
              if (properties != null)
              {
                  break;
              }
          }
  
          return properties;
      }
docs: Load properties from a file.
  
  <p>
  This method tries to load the file from the given locations
  in the order by calling {@link #load(String, FileLocation)}.
  The content of the first successfully-loaded file is returned.
  </p>
  
  @param file
  File name.
  
  @param locations
  Locations from which the file is loaded.
  
  @return
  {@link Properties Properties} loaded from the file.
  {@code null} is returned on failure.
  
  @throws IllegalArgumentException
  {@code file} is {@code null}, or {@code locations} is {@code null}.