docs: private CredentialEntry getCredentialEntry(CredentialProvider provider,
  	                                           String name) throws IOException {
  		CredentialEntry entry = provider.getCredentialEntry(name);
  		if (entry != null) {
  			return entry;
  		}
  
  		// The old name is stored in the credential provider.
  		String oldName = getDeprecatedKey(name);
  		if (oldName != null) {
  			entry = provider.getCredentialEntry(oldName);
  			if (entry != null) {
  				logDeprecationOnce(oldName, provider.toString());
  				return entry;
  			}
  		}
  
  		// The name is deprecated.
  		DeprecatedKeyInfo keyInfo = getDeprecatedKeyInfo(name);
  		if (keyInfo != null && keyInfo.newKeys != null) {
  			for (String newName : keyInfo.newKeys) {
  				entry = provider.getCredentialEntry(newName);
  				if (entry != null) {
  					logDeprecationOnce(name, null);
  					return entry;
  				}
  			}
  		}
  
  		return null;
  	}