mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 15:50:52 +00:00
More meaningful toString() method
Produce toString without dilligently adding it to every single class. Rely on heuristics to cut down the number of fields to show.
This commit is contained in:
@@ -77,6 +77,7 @@ public class GHRepository extends GHObject {
|
||||
private String default_branch,language;
|
||||
private Map<String,GHCommit> commits = new HashMap<String, GHCommit>();
|
||||
|
||||
@SkipFromToString
|
||||
private GHRepoPermission permissions;
|
||||
|
||||
private GHRepository source, parent;
|
||||
@@ -1350,14 +1351,9 @@ public class GHRepository extends GHObject {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Repository:"+owner.login+":"+name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return toString().hashCode();
|
||||
return ("Repository:"+owner.login+":"+name).hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user