code: @Override
    public List<String> listObjectNames(
        String bucketName, String objectNamePrefix, String delimiter, long maxResults)
        throws IOException {
      logger.atFine().log(
          "listObjectNames(%s, %s, %s, %s)", bucketName, objectNamePrefix, delimiter, maxResults);
  
      // Helper will handle going through pages of list results and accumulating them.
      List<StorageObject> listedObjects = new ArrayList<>();
      List<String> listedPrefixes = new ArrayList<>();
      listStorageObjectsAndPrefixes(
          bucketName,
          objectNamePrefix,
          delimiter,
          /* includeTrailingDelimiter= */ false,
          maxResults,
          listedObjects,
          listedPrefixes);
  
      // Just use the prefix list as a starting point, and extract all the names from the
      // StorageObjects, adding them to the list.
      // TODO(user): Maybe de-dupe if it's possible for GCS to return duplicates.
      List<String> objectNames = listedPrefixes;
      for (StorageObject obj : listedObjects) {
        objectNames.add(obj.getName());
      }
      return objectNames;
    }
docs: See {@link GoogleCloudStorage#listObjectNames(String, String, String, long)} for details about
  expected behavior.