diff --git a/java/google/registry/tools/AppEngineConnection.java b/java/google/registry/tools/AppEngineConnection.java index 139a73dd5..d9dc72aa3 100644 --- a/java/google/registry/tools/AppEngineConnection.java +++ b/java/google/registry/tools/AppEngineConnection.java @@ -148,7 +148,7 @@ class AppEngineConnection implements Connection { } boolean isLocalhost() { - return flags.getServer().getHostText().equals("localhost"); + return flags.getServer().getHost().equals("localhost"); } private String getUserId() { diff --git a/java/google/registry/tools/DefaultRequestFactoryModule.java b/java/google/registry/tools/DefaultRequestFactoryModule.java index 31191d5b7..32f53257e 100644 --- a/java/google/registry/tools/DefaultRequestFactoryModule.java +++ b/java/google/registry/tools/DefaultRequestFactoryModule.java @@ -1,11 +1,11 @@ // Copyright 2017 The Nomulus Authors. All Rights Reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -43,7 +43,7 @@ class DefaultRequestFactoryModule { @Provides @Named("default") public HttpRequestFactory provideHttpRequestFactory(AppEngineConnectionFlags connectionFlags) { - if (connectionFlags.getServer().getHostText().equals("localhost")) { + if (connectionFlags.getServer().getHost().equals("localhost")) { return new NetHttpTransport() .createRequestFactory( new HttpRequestInitializer() { diff --git a/java/google/registry/tools/ExecuteEppCommand.java b/java/google/registry/tools/ExecuteEppCommand.java index e70bb7cec..52cf04fff 100644 --- a/java/google/registry/tools/ExecuteEppCommand.java +++ b/java/google/registry/tools/ExecuteEppCommand.java @@ -50,7 +50,7 @@ final class ExecuteEppCommand extends MutatingEppToolCommand { clientId, CharStreams.toString(new InputStreamReader(stdin, UTF_8))); } else { for (String command : mainParameters) { - addXmlCommand(clientId, Files.toString(new File(command), UTF_8)); + addXmlCommand(clientId, Files.asCharSource(new File(command), UTF_8).read()); } } } diff --git a/java/google/registry/tools/GetClaimsListCommand.java b/java/google/registry/tools/GetClaimsListCommand.java index 98ef7e2c8..0118bc49c 100644 --- a/java/google/registry/tools/GetClaimsListCommand.java +++ b/java/google/registry/tools/GetClaimsListCommand.java @@ -46,6 +46,6 @@ final class GetClaimsListCommand implements RemoteApiCommand { public void run() throws Exception { ClaimsListShard cl = checkNotNull(ClaimsListShard.get(), "Couldn't load ClaimsList"); String csv = Joiner.on('\n').withKeyValueSeparator(",").join(cl.getLabelsToKeys()) + "\n"; - Files.write(csv, output.toFile(), UTF_8); + Files.asCharSink(output.toFile(), UTF_8).write(csv); } } diff --git a/java/google/registry/tools/RegistryCli.java b/java/google/registry/tools/RegistryCli.java index 96281397a..7a1502b22 100644 --- a/java/google/registry/tools/RegistryCli.java +++ b/java/google/registry/tools/RegistryCli.java @@ -137,7 +137,7 @@ final class RegistryCli { // RemoteApiCommands need to have the remote api installed to work. RemoteApiInstaller installer = new RemoteApiInstaller(); RemoteApiOptions options = new RemoteApiOptions(); - options.server(connection.getServer().getHostText(), connection.getServer().getPort()); + options.server(connection.getServer().getHost(), connection.getServer().getPort()); if (connection.isLocalhost()) { // Use dev credentials for localhost. options.useDevelopmentServerCredential();