diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-12-02 20:57:29 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-12-02 20:57:29 -0500 |
| commit | 674de6113031aec7fe16d75f86e48907581a0f62 (patch) | |
| tree | 5b8628ccf95c71d68b89adf6dd9cc254f982d8f2 | |
| parent | 57af33949782caffb4de26e36eb70fe4053e511b (diff) | |
| download | soen423-674de6113031aec7fe16d75f86e48907581a0f62.zip | |
replica2: remove dead code
| -rw-r--r-- | src/main/java/derms/replica2/Hosts.java | 28 |
1 files changed, 0 insertions, 28 deletions
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<City, String> 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<City, String>(); - hosts.put(new City("MTL"), "alpine1"); - hosts.put(new City("QUE"), "alpine2"); - hosts.put(new City("SHE"), "alpine3"); - } -} |