googleapis / googleapis/google-cloud-java

[google-auth-library-java] ComputeEngineCredentials incorrectly throws RuntimeException

未关闭
#12,616 11 条评论 0 个 reaction 已指派 1 人 已被 @silvolu 认领 在 GitHub 查看
priority: p2 semver: major type: feature request
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
157

描述

Unless we really think getDefaultServiceAccount can't fail here, we should not convert the IOException to a RuntimeException.

```
@Override
public String getAccount() {
if (serviceAccountEmail == null) {
try {
serviceAccountEmail = getDefaultServiceAccount();
} catch (IOException ex) {
throw new RuntimeException("Failed to to get service account", ex);
}
}
return serviceAccountEmail;
}
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。