googleapis / googleapis/google-cloud-java
[google-auth-library-java] ComputeEngineCredentials incorrectly throws RuntimeException
Aperta
priority: p2
semver: major
type: feature request
- Lingua principale
- Java
- Stelle
- 2.1k
- Fork
- 1.2k
- Merge medio
- 1g 23h
- PR unite (30g)
- 154
Descrizione
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;
}
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.