mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Clean up some code quality issues in GCP proxy
All changes are suggested by IntelliJ code inspection. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=189586104
This commit is contained in:
parent
22b575b17d
commit
c72e01f75e
13 changed files with 27 additions and 32 deletions
|
@ -78,7 +78,7 @@ public class MetricParameters {
|
|||
this(ImmutableMap.copyOf(System.getenv()), MetricParameters::gceConnectionFactory);
|
||||
}
|
||||
|
||||
private static final HttpURLConnection gceConnectionFactory(String path) {
|
||||
private static HttpURLConnection gceConnectionFactory(String path) {
|
||||
String url = GCE_METADATA_URL_BASE + path;
|
||||
try {
|
||||
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
||||
|
@ -91,7 +91,7 @@ public class MetricParameters {
|
|||
logger.warningfmt(e, "Incorrect GCE metadata server URL: %s", url);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private String readEnvVar(String envVar) {
|
||||
return envVarMap.getOrDefault(envVar, "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue