code: @VisibleForTesting
    Set<String> retrieveWhitelist(FileSystem fs, Path path) {
      try {
        Preconditions.checkArgument(
            fs.exists(path), "File does not exist at " + path
        );
        Preconditions.checkArgument(
            fs.isFile(path), "Whitelist path is not a file. " + path
        );
  
        Set<String> result = Sets.newHashSet();
        try (BufferedReader br = new BufferedReader(new InputStreamReader(fs.open(path),
            StandardCharsets.UTF_8))) {
          String s = null;
          while (!StringUtils.isEmpty((s = br.readLine()))) {
            result.add(s);
          }
        }
        return result;
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
    }
docs: Updates whitelist if there's any change. If it needs to update whitelist, it enforces writelock
  to make sure
  there's an exclusive access on shared variables.