Renamed getMasterBranch to getDefaultBranch

The new set method can be simply renamed without the backward
compatibility version since it's new
This commit is contained in:
Kohsuke Kawaguchi
2015-07-17 13:42:20 +03:00
parent e4de09c55b
commit eb9551d81b

View File

@@ -364,6 +364,14 @@ public class GHRepository extends GHObject {
* @return
* This field is null until the user explicitly configures the master branch.
*/
public String getDefaultBranch() {
return default_branch;
}
/**
* @deprecated
* Renamed to {@link #getDefaultBranch()}
*/
public String getMasterBranch() {
return default_branch;
}
@@ -494,9 +502,7 @@ public class GHRepository extends GHObject {
edit("homepage",value);
}
public void setMasterBranch(String value) throws IOException {
// This method might be more aptly named setDefaultBranch,
// but we'll use setMasterBranch for consistency with the existing getMasterBranch.
public void setDefaultBranch(String value) throws IOException {
edit("default_branch", value);
}