mirror of
https://github.com/google/nomulus.git
synced 2025-05-29 17:00:11 +02:00
Fix two Gauava 20 deprecations across the tools package
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146162927
This commit is contained in:
parent
0a2622c6ab
commit
468f1fb0f8
5 changed files with 8 additions and 8 deletions
|
@ -148,7 +148,7 @@ class AppEngineConnection implements Connection {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isLocalhost() {
|
boolean isLocalhost() {
|
||||||
return flags.getServer().getHostText().equals("localhost");
|
return flags.getServer().getHost().equals("localhost");
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getUserId() {
|
private String getUserId() {
|
||||||
|
|
|
@ -43,7 +43,7 @@ class DefaultRequestFactoryModule {
|
||||||
@Provides
|
@Provides
|
||||||
@Named("default")
|
@Named("default")
|
||||||
public HttpRequestFactory provideHttpRequestFactory(AppEngineConnectionFlags connectionFlags) {
|
public HttpRequestFactory provideHttpRequestFactory(AppEngineConnectionFlags connectionFlags) {
|
||||||
if (connectionFlags.getServer().getHostText().equals("localhost")) {
|
if (connectionFlags.getServer().getHost().equals("localhost")) {
|
||||||
return new NetHttpTransport()
|
return new NetHttpTransport()
|
||||||
.createRequestFactory(
|
.createRequestFactory(
|
||||||
new HttpRequestInitializer() {
|
new HttpRequestInitializer() {
|
||||||
|
|
|
@ -50,7 +50,7 @@ final class ExecuteEppCommand extends MutatingEppToolCommand {
|
||||||
clientId, CharStreams.toString(new InputStreamReader(stdin, UTF_8)));
|
clientId, CharStreams.toString(new InputStreamReader(stdin, UTF_8)));
|
||||||
} else {
|
} else {
|
||||||
for (String command : mainParameters) {
|
for (String command : mainParameters) {
|
||||||
addXmlCommand(clientId, Files.toString(new File(command), UTF_8));
|
addXmlCommand(clientId, Files.asCharSource(new File(command), UTF_8).read());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,6 @@ final class GetClaimsListCommand implements RemoteApiCommand {
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
ClaimsListShard cl = checkNotNull(ClaimsListShard.get(), "Couldn't load ClaimsList");
|
ClaimsListShard cl = checkNotNull(ClaimsListShard.get(), "Couldn't load ClaimsList");
|
||||||
String csv = Joiner.on('\n').withKeyValueSeparator(",").join(cl.getLabelsToKeys()) + "\n";
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ final class RegistryCli {
|
||||||
// RemoteApiCommands need to have the remote api installed to work.
|
// RemoteApiCommands need to have the remote api installed to work.
|
||||||
RemoteApiInstaller installer = new RemoteApiInstaller();
|
RemoteApiInstaller installer = new RemoteApiInstaller();
|
||||||
RemoteApiOptions options = new RemoteApiOptions();
|
RemoteApiOptions options = new RemoteApiOptions();
|
||||||
options.server(connection.getServer().getHostText(), connection.getServer().getPort());
|
options.server(connection.getServer().getHost(), connection.getServer().getPort());
|
||||||
if (connection.isLocalhost()) {
|
if (connection.isLocalhost()) {
|
||||||
// Use dev credentials for localhost.
|
// Use dev credentials for localhost.
|
||||||
options.useDevelopmentServerCredential();
|
options.useDevelopmentServerCredential();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue