From 2d3e98560f8eeaa93f04cc071e7ae5bf000e1081 Mon Sep 17 00:00:00 2001 From: Gibstick Date: Sun, 28 Jul 2013 17:29:22 -0400 Subject: [PATCH] no more warnings cause we don't clone() --- src/ca/gibstick/discosheep/DiscoParty.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ca/gibstick/discosheep/DiscoParty.java b/src/ca/gibstick/discosheep/DiscoParty.java index b1b5427..3d47ed2 100644 --- a/src/ca/gibstick/discosheep/DiscoParty.java +++ b/src/ca/gibstick/discosheep/DiscoParty.java @@ -74,7 +74,7 @@ public class DiscoParty { this.period = DiscoParty.defaultPeriod; this.radius = DiscoParty.defaultRadius; this.sheep = DiscoParty.defaultSheep; - this.guestNumbers = (HashMap) DiscoParty.getDefaultGuestNumbers().clone(); + this.guestNumbers = new HashMap(DiscoParty.defaultGuestNumbers); r = new Random(); } @@ -84,7 +84,7 @@ public class DiscoParty { this.period = DiscoParty.defaultPeriod; this.radius = DiscoParty.defaultRadius; this.sheep = DiscoParty.defaultSheep; - this.guestNumbers = (HashMap) DiscoParty.getDefaultGuestNumbers().clone(); + this.guestNumbers = new HashMap(DiscoParty.defaultGuestNumbers); r = new Random(); } @@ -207,7 +207,7 @@ public class DiscoParty { DiscoParty.defaultPeriod = this.period; DiscoParty.defaultRadius = this.radius; DiscoParty.defaultSheep = this.sheep; - DiscoParty.defaultGuestNumbers = (HashMap) this.getGuestNumbers().clone(); + DiscoParty.defaultGuestNumbers = new HashMap(this.getGuestNumbers()); return this; }