no more warnings cause we don't clone()
This commit is contained in:
parent
b7a83e1c29
commit
2d3e98560f
@ -74,7 +74,7 @@ public class DiscoParty {
|
|||||||
this.period = DiscoParty.defaultPeriod;
|
this.period = DiscoParty.defaultPeriod;
|
||||||
this.radius = DiscoParty.defaultRadius;
|
this.radius = DiscoParty.defaultRadius;
|
||||||
this.sheep = DiscoParty.defaultSheep;
|
this.sheep = DiscoParty.defaultSheep;
|
||||||
this.guestNumbers = (HashMap) DiscoParty.getDefaultGuestNumbers().clone();
|
this.guestNumbers = new HashMap<String, Integer>(DiscoParty.defaultGuestNumbers);
|
||||||
r = new Random();
|
r = new Random();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ public class DiscoParty {
|
|||||||
this.period = DiscoParty.defaultPeriod;
|
this.period = DiscoParty.defaultPeriod;
|
||||||
this.radius = DiscoParty.defaultRadius;
|
this.radius = DiscoParty.defaultRadius;
|
||||||
this.sheep = DiscoParty.defaultSheep;
|
this.sheep = DiscoParty.defaultSheep;
|
||||||
this.guestNumbers = (HashMap) DiscoParty.getDefaultGuestNumbers().clone();
|
this.guestNumbers = new HashMap<String, Integer>(DiscoParty.defaultGuestNumbers);
|
||||||
r = new Random();
|
r = new Random();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ public class DiscoParty {
|
|||||||
DiscoParty.defaultPeriod = this.period;
|
DiscoParty.defaultPeriod = this.period;
|
||||||
DiscoParty.defaultRadius = this.radius;
|
DiscoParty.defaultRadius = this.radius;
|
||||||
DiscoParty.defaultSheep = this.sheep;
|
DiscoParty.defaultSheep = this.sheep;
|
||||||
DiscoParty.defaultGuestNumbers = (HashMap) this.getGuestNumbers().clone();
|
DiscoParty.defaultGuestNumbers = new HashMap<String, Integer>(this.getGuestNumbers());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user