mirror of
https://github.com/google/nomulus.git
synced 2025-07-02 01:03:33 +02:00
Fix new checkstyle violations (#1626)
* Fix new checkstyle violations * Restore naming in javadocs
This commit is contained in:
parent
60b80121d0
commit
d0ebbde9ad
2 changed files with 8 additions and 8 deletions
|
@ -42,17 +42,17 @@ import java.io.IOException;
|
||||||
*/
|
*/
|
||||||
final class ForwardingServerReceiver implements VerificationCodeReceiver {
|
final class ForwardingServerReceiver implements VerificationCodeReceiver {
|
||||||
|
|
||||||
private final int forwarding_port;
|
private final int forwardingPort;
|
||||||
private final LocalServerReceiver localServerReceiver = new LocalServerReceiver();
|
private final LocalServerReceiver localServerReceiver = new LocalServerReceiver();
|
||||||
|
|
||||||
ForwardingServerReceiver(int forwarding_port) {
|
ForwardingServerReceiver(int forwardingPort) {
|
||||||
this.forwarding_port = forwarding_port;
|
this.forwardingPort = forwardingPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRedirectUri() throws IOException {
|
public String getRedirectUri() throws IOException {
|
||||||
String redirect_uri = localServerReceiver.getRedirectUri();
|
String redirectUri = localServerReceiver.getRedirectUri();
|
||||||
return redirect_uri.replace("localhost:" + getRemotePort(), "localhost:" + forwarding_port);
|
return redirectUri.replace("localhost:" + getRemotePort(), "localhost:" + forwardingPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -43,18 +43,18 @@ final class LoginCommand implements Command {
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
AuthorizationCodeInstalledApp app;
|
AuthorizationCodeInstalledApp app;
|
||||||
if (port != 0) {
|
if (port != 0) {
|
||||||
String remote_host = InetAddress.getLocalHost().getHostName();
|
String remoteHost = InetAddress.getLocalHost().getHostName();
|
||||||
ForwardingServerReceiver forwardingServerReceiver = new ForwardingServerReceiver(port);
|
ForwardingServerReceiver forwardingServerReceiver = new ForwardingServerReceiver(port);
|
||||||
app =
|
app =
|
||||||
new AuthorizationCodeInstalledApp(
|
new AuthorizationCodeInstalledApp(
|
||||||
flow,
|
flow,
|
||||||
forwardingServerReceiver,
|
forwardingServerReceiver,
|
||||||
url -> {
|
url -> {
|
||||||
int remote_port = forwardingServerReceiver.getRemotePort();
|
int remotePort = forwardingServerReceiver.getRemotePort();
|
||||||
System.out.printf(
|
System.out.printf(
|
||||||
"Please first run the following command in a separate terminal on your local "
|
"Please first run the following command in a separate terminal on your local "
|
||||||
+ "host:\n\n ssh -L %s:localhost:%s %s\n\n",
|
+ "host:\n\n ssh -L %s:localhost:%s %s\n\n",
|
||||||
port, remote_port, remote_host);
|
port, remotePort, remoteHost);
|
||||||
System.out.printf(
|
System.out.printf(
|
||||||
"Please then open the following URL in your local browser and follow the"
|
"Please then open the following URL in your local browser and follow the"
|
||||||
+ " instructions:\n\n %s\n\n",
|
+ " instructions:\n\n %s\n\n",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue