Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixes additional checkstyle warnings
  • Loading branch information
dgruntz committed Nov 18, 2019
commit 1b13e139df29f4cd0195155c89c49c2a4d5bbd02
8 changes: 6 additions & 2 deletions prototype/src/main/java/com/iluwatar/prototype/Beast.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ public Beast(Beast source) { }

@Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (obj == null) { return false; }
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
return getClass() == obj.getClass();
}

Expand Down
16 changes: 12 additions & 4 deletions prototype/src/main/java/com/iluwatar/prototype/ElfBeast.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,20 @@ public String toString() {

@Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (!super.equals(obj)) { return false; }
if (getClass() != obj.getClass()) { return false; }
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
ElfBeast other = (ElfBeast) obj;
if (helpType == null) {
if (other.helpType != null) { return false; }
if (other.helpType != null) {
return false;
}
} else if (!helpType.equals(other.helpType)) {
return false;
}
Expand Down
16 changes: 12 additions & 4 deletions prototype/src/main/java/com/iluwatar/prototype/ElfMage.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,20 @@ public String toString() {

@Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (!super.equals(obj)) { return false; }
if (getClass() != obj.getClass()) { return false; }
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
ElfMage other = (ElfMage) obj;
if (helpType == null) {
if (other.helpType != null) { return false; }
if (other.helpType != null) {
return false;
}
} else if (!helpType.equals(other.helpType)) {
return false;
}
Expand Down
16 changes: 12 additions & 4 deletions prototype/src/main/java/com/iluwatar/prototype/ElfWarlord.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,20 @@ public String toString() {

@Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (!super.equals(obj)) { return false; }
if (getClass() != obj.getClass()) { return false; }
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
ElfWarlord other = (ElfWarlord) obj;
if (helpType == null) {
if (other.helpType != null) { return false; }
if (other.helpType != null) {
return false;
}
} else if (!helpType.equals(other.helpType)) {
return false;
}
Expand Down
8 changes: 6 additions & 2 deletions prototype/src/main/java/com/iluwatar/prototype/Mage.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ public Mage(Mage source) { }

@Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (obj == null) { return false; }
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
return getClass() == obj.getClass();
}

Expand Down
16 changes: 12 additions & 4 deletions prototype/src/main/java/com/iluwatar/prototype/OrcBeast.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,20 @@ public String toString() {

@Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (!super.equals(obj)) { return false; }
if (getClass() != obj.getClass()) { return false; }
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
OrcBeast other = (OrcBeast) obj;
if (weapon == null) {
if (other.weapon != null) { return false; }
if (other.weapon != null) {
return false;
}
} else if (!weapon.equals(other.weapon)) {
return false;
}
Expand Down
16 changes: 12 additions & 4 deletions prototype/src/main/java/com/iluwatar/prototype/OrcMage.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,20 @@ public String toString() {

@Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (!super.equals(obj)) { return false; }
if (getClass() != obj.getClass()) { return false; }
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
OrcMage other = (OrcMage) obj;
if (weapon == null) {
if (other.weapon != null) { return false; }
if (other.weapon != null) {
return false;
}
} else if (!weapon.equals(other.weapon)) {
return false;
}
Expand Down
16 changes: 12 additions & 4 deletions prototype/src/main/java/com/iluwatar/prototype/OrcWarlord.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,20 @@ public String toString() {

@Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (!super.equals(obj)) { return false; }
if (getClass() != obj.getClass()) { return false; }
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
OrcWarlord other = (OrcWarlord) obj;
if (weapon == null) {
if (other.weapon != null) { return false; }
if (other.weapon != null) {
return false;
}
} else if (!weapon.equals(other.weapon)) {
return false;
}
Expand Down
8 changes: 6 additions & 2 deletions prototype/src/main/java/com/iluwatar/prototype/Warlord.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ public Warlord(Warlord source) { }

@Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (obj == null) { return false; }
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
return getClass() == obj.getClass();
}

Expand Down