googleapis / googleapis/google-cloud-java
[google-auth-library-java] ComputeEngineCredentials incorrectly throws RuntimeException
Open
priority: p2
semver: major
type: feature request
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 1.2k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 154
Description
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;
}
```
Contributor guide
Assessment
This issue has not been assessed yet.