Skip to content

Commit

Permalink
Merge pull request #17 from jenkinsci/master
Browse files Browse the repository at this point in the history
Fork Sync: Update from parent repository
  • Loading branch information
ppiorunski authored Oct 15, 2024
2 parents 5f25618 + 4461d31 commit a4b9358
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class ConnectionConfig implements Serializable {
private final String trust;
private final int timeout;
private final String p4host;
private final String userName;

public ConnectionConfig(P4BaseCredentials credential) {
this.p4port = credential.getFullP4port();
Expand All @@ -22,6 +23,7 @@ public ConnectionConfig(P4BaseCredentials credential) {
this.serverUri = credential.getP4JavaUri();
this.timeout = credential.getTimeout();
this.p4host = credential.getP4host();
this.userName = credential.getUsername();
}

public String getPort() {
Expand All @@ -48,6 +50,10 @@ public String getP4Host() {
return p4host;
}

public String getUserName() {
return userName;
}

public String toString() {
return serverUri;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ private static IOptionsServer getRawConnection(ConnectionConfig config)

// Get a server connection
String serverUri = config.getServerUri();
IOptionsServer iserver;
iserver = ServerFactory.getOptionsServer(serverUri, props, opts);
return iserver;
IOptionsServer iServer = ServerFactory.getOptionsServer(serverUri, props, opts);
iServer.setUserName(config.getUserName());
return iServer;
}
}

0 comments on commit a4b9358

Please sign in to comment.