From 674de6113031aec7fe16d75f86e48907581a0f62 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Mon, 2 Dec 2024 20:57:29 -0500 Subject: replica2: remove dead code --- src/main/java/derms/replica2/Hosts.java | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/main/java/derms/replica2/Hosts.java (limited to 'src/main') diff --git a/src/main/java/derms/replica2/Hosts.java b/src/main/java/derms/replica2/Hosts.java deleted file mode 100644 index 8df77c1..0000000 --- a/src/main/java/derms/replica2/Hosts.java +++ /dev/null @@ -1,28 +0,0 @@ -package derms.replica2; - -import derms.City; - -import java.net.UnknownHostException; -import java.util.HashMap; -import java.util.Map; - -class Hosts { - private static Map hosts = null; - - static String get(City city) throws UnknownHostException { - if (hosts == null) - init(); - - String host = hosts.get(city); - if (host == null) - throw new UnknownHostException("unknown host: "+city); - return host; - } - - private static void init() { - hosts = new HashMap(); - hosts.put(new City("MTL"), "alpine1"); - hosts.put(new City("QUE"), "alpine2"); - hosts.put(new City("SHE"), "alpine3"); - } -} -- cgit v1.2.3