Skip to content

Commit

Permalink
[JENKINS-31316] fix remaining serverName usage (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Casz committed Oct 4, 2016
1 parent 43d98a9 commit a3d11a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/hudson/plugins/accurev/AccurevSCM.java
Expand Up @@ -168,8 +168,12 @@ public void setServerUUID(String uuid) {
serverUUID = uuid;
}

/**
* Getter for Accurev server
* @return AccurevServer based on serverUUID
*/
public AccurevServer getServer() {
return ((AccurevSCMDescriptor) getDescriptor()).getServer(serverName);
return DESCRIPTOR.getServer(serverUUID);
}

/**
Expand Down Expand Up @@ -405,7 +409,7 @@ public boolean requiresWorkspaceForPolling() {
* @return See above.
*/
public Lock getOptionalLock() {
final AccurevServer server = DESCRIPTOR.getServer(serverName);
final AccurevServer server = getServer();
final boolean shouldLock = server.isSyncOperations();
if (shouldLock) {
return getMandatoryLock();
Expand Down

0 comments on commit a3d11a0

Please sign in to comment.