code: @SuppressWarnings("deprecation")
    public Credential loadCredential(String userId) throws IOException {
  
      // No requests need to be performed when userId is not specified.
      if (isNullOrEmpty(userId)) {
        return null;
      }
  
      if (credentialDataStore == null && credentialStore == null) {
        return null;
      }
      Credential credential = newCredential(userId);
      if (credentialDataStore != null) {
        StoredCredential stored = credentialDataStore.get(userId);
        if (stored == null) {
          return null;
        }
        credential.setAccessToken(stored.getAccessToken());
        credential.setRefreshToken(stored.getRefreshToken());
        credential.setExpirationTimeMilliseconds(stored.getExpirationTimeMilliseconds());
      } else if (!credentialStore.load(userId, credential)) {
        return null;
      }
      return credential;
    }
docs: Loads the credential of the given user ID from the credential store.
  
  @param userId user ID or {@code null} if not using a persisted credential store
  @return credential found in the credential store of the given user ID or {@code null} for none
  found