googleapis / googleapis/google-cloud-java
[google-auth-library-java] ComputeEngineCredentials incorrectly throws RuntimeException
Ouverte
priority: p2
semver: major
type: feature request
- Langage dominant
- Java
- Étoiles
- 2.1k
- Forks
- 1.2k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 157
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;
}
```
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.