googleapis / googleapis/google-cloud-java
[google-auth-library-java] ComputeEngineCredentials incorrectly throws RuntimeException
Offen
priority: p2
semver: major
type: feature request
- Vorherrschende Sprache
- Java
- Sterne
- 2.1k
- Forks
- 1.2k
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 154
Beschreibung
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;
}
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.