Use local variable type inference (#995)
* "visitor" pattern: Use local variable type inference Update "visitor" pattern with local variable type inference. * "value-object" pattern: Use local variable type inference Update "value-object" pattern with local variable type inference. * "unit-of-work" pattern: Use local variable type inference Update "value-object" pattern with local variable type inference. * "typeobjectpattern" pattern: Use local variable type inference Update "value-object" pattern with local variable type inference.
This commit is contained in:
committed by
Ilkka Seppälä
parent
5fc03ee9f8
commit
c81c3ff1c7
@@ -76,8 +76,8 @@ public class HeroStat {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
final var prime = 31;
|
||||
var result = 1;
|
||||
result = prime * result + intelligence;
|
||||
result = prime * result + luck;
|
||||
result = prime * result + strength;
|
||||
@@ -95,7 +95,7 @@ public class HeroStat {
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
HeroStat other = (HeroStat) obj;
|
||||
var other = (HeroStat) obj;
|
||||
if (intelligence != other.intelligence) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user