From 00c88ca2d376709554069beb7a189e70564c260d Mon Sep 17 00:00:00 2001 From: fros4943 Date: Wed, 18 Feb 2009 10:40:25 +0000 Subject: [PATCH] removed creating unnecessary random generator --- tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java b/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java index ca3dcf06c..fe288037a 100644 --- a/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java +++ b/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: UDGM.java,v 1.19 2009/02/18 10:11:32 fros4943 Exp $ + * $Id: UDGM.java,v 1.20 2009/02/18 10:40:25 fros4943 Exp $ */ package se.sics.cooja.radiomediums; @@ -92,7 +92,7 @@ public class UDGM extends AbstractRadioMedium { private Simulation mySimulation; - private Random random = new Random(); + private Random random = null; /** * Visualizes radio traffic in the UDGM. Allows a user to @@ -601,8 +601,7 @@ public class UDGM extends AbstractRadioMedium { return config; } - public boolean setConfigXML(Collection configXML, - boolean visAvailable) { + public boolean setConfigXML(Collection configXML, boolean visAvailable) { for (Element element : configXML) { if (element.getName().equals("transmitting_range")) { TRANSMITTING_RANGE = Double.parseDouble(element.getText()); @@ -626,7 +625,6 @@ public class UDGM extends AbstractRadioMedium { SUCCESS_RATIO_RX = Double.parseDouble(element.getText()); } } - random = mySimulation.getRandomGenerator(); return true; }