mirror of https://github.com/apache/jclouds.git
Issue 191: hid incidental constructors
This commit is contained in:
parent
a47a369d18
commit
c948e49183
|
@ -47,7 +47,6 @@ public class CookbookVersion {
|
|||
@SerializedName("root_files")
|
||||
private Set<Resource> rootFiles = Sets.newLinkedHashSet();
|
||||
|
||||
|
||||
// internal
|
||||
@SuppressWarnings("unused")
|
||||
@SerializedName("json_class")
|
||||
|
@ -81,7 +80,8 @@ public class CookbookVersion {
|
|||
Iterables.addAll(this.rootFiles, rootFiles);
|
||||
}
|
||||
|
||||
public CookbookVersion() {
|
||||
// hidden but needs to be here for json deserialization to work
|
||||
CookbookVersion() {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -34,11 +34,12 @@ public class Organization implements Comparable<Organization> {
|
|||
private String clientname;
|
||||
|
||||
public Organization(String name) {
|
||||
super();
|
||||
this();
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Organization() {
|
||||
// hidden but needs to be here for json deserialization to work
|
||||
Organization() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,8 @@ public class Resource {
|
|||
this.specificity = specificity;
|
||||
}
|
||||
|
||||
public Resource() {
|
||||
// hidden but needs to be here for json deserialization to work
|
||||
Resource() {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
|
|
@ -42,7 +42,8 @@ public class User implements Comparable<User> {
|
|||
this.username = username;
|
||||
}
|
||||
|
||||
public User() {
|
||||
// hidden but needs to be here for json deserialization to work
|
||||
User() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -111,14 +112,11 @@ public class User implements Comparable<User> {
|
|||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((displayName == null) ? 0 : displayName.hashCode());
|
||||
result = prime * result + ((displayName == null) ? 0 : displayName.hashCode());
|
||||
result = prime * result + ((email == null) ? 0 : email.hashCode());
|
||||
result = prime * result
|
||||
+ ((firstName == null) ? 0 : firstName.hashCode());
|
||||
result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
|
||||
result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
|
||||
result = prime * result
|
||||
+ ((middleName == null) ? 0 : middleName.hashCode());
|
||||
result = prime * result + ((middleName == null) ? 0 : middleName.hashCode());
|
||||
result = prime * result + ((password == null) ? 0 : password.hashCode());
|
||||
result = prime * result + ((username == null) ? 0 : username.hashCode());
|
||||
return result;
|
||||
|
@ -173,9 +171,8 @@ public class User implements Comparable<User> {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User [displayName=" + displayName + ", email=" + email
|
||||
+ ", firstName=" + firstName + ", lastName=" + lastName
|
||||
+ ", middleName=" + middleName + ", password=" + password
|
||||
return "User [displayName=" + displayName + ", email=" + email + ", firstName=" + firstName
|
||||
+ ", lastName=" + lastName + ", middleName=" + middleName + ", password=" + password
|
||||
+ ", username=" + username + "]";
|
||||
}
|
||||
|
||||
|
|
|
@ -50,8 +50,7 @@ public class ParseOrganizationFromJsonTest {
|
|||
|
||||
public void test() {
|
||||
|
||||
Organization org = new Organization();
|
||||
org.setName("opscode");
|
||||
Organization org = new Organization("opscode");
|
||||
org.setFullName("Opscode, Inc.");
|
||||
org.setOrgType("Business");
|
||||
org.setClientname("opscode-validator");
|
||||
|
|
|
@ -32,8 +32,7 @@ public class ParseUserFromJsonTest {
|
|||
|
||||
public void test() {
|
||||
|
||||
User user = new User();
|
||||
user.setUsername("bobo");
|
||||
User user = new User("bobo");
|
||||
user.setFirstName("Bobo");
|
||||
user.setMiddleName("Tiberion");
|
||||
user.setLastName("Clown");
|
||||
|
|
Loading…
Reference in New Issue