googleapis / googleapis/google-cloud-java

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

Aperta
#12,616 11 commenti 0 reazioni 1 assegnatario Rivendicata da @silvolu Vedi su GitHub
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.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.