From 7999167b155daa1e4218f64ceb12baecc28a8de0 Mon Sep 17 00:00:00 2001
From: bclayton-usgs <bclayton@usgs.gov>
Date: Mon, 23 Mar 2020 13:55:50 -0600
Subject: [PATCH] remove Tomcat

---
 build.gradle                                                | 4 ----
 .../usgs/earthquake/nshmp/www/DeaggEpsilonController.java   | 3 +--
 .../earthquake/nshmp/www/services/DeaggEpsilonService.java  | 6 ++----
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/build.gradle b/build.gradle
index c18eead82..4a89efb7c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -63,10 +63,6 @@ repositories {
 dependencies {
   implementation project(":nshmp-lib")
 
-  // Tomcat
-  implementation "org.apache.tomcat:tomcat-catalina:8.0.45"
-  implementation "javax.websocket:javax.websocket-api:1.1"
-
   // AWS
   implementation "com.amazonaws:aws-lambda-java-core:${awsLambdaCoreVersion}"
   implementation "com.amazonaws:aws-java-sdk-lambda:${awsLambdaVersion}"
diff --git a/src/main/java/gov/usgs/earthquake/nshmp/www/DeaggEpsilonController.java b/src/main/java/gov/usgs/earthquake/nshmp/www/DeaggEpsilonController.java
index 51c89e584..df7472f33 100644
--- a/src/main/java/gov/usgs/earthquake/nshmp/www/DeaggEpsilonController.java
+++ b/src/main/java/gov/usgs/earthquake/nshmp/www/DeaggEpsilonController.java
@@ -4,7 +4,6 @@ import java.util.EnumMap;
 
 import javax.annotation.Nullable;
 import javax.inject.Inject;
-import javax.servlet.ServletException;
 
 import gov.usgs.earthquake.nshmp.gmm.Imt;
 import gov.usgs.earthquake.nshmp.internal.www.NshmpMicronautServlet;
@@ -34,7 +33,7 @@ public class DeaggEpsilonController {
   private NshmpMicronautServlet servlet;
 
   @EventListener
-  public void init(StartupEvent event) throws ServletException {
+  public void init(StartupEvent event) {
     DeaggEpsilonService.init();
   }
 
diff --git a/src/main/java/gov/usgs/earthquake/nshmp/www/services/DeaggEpsilonService.java b/src/main/java/gov/usgs/earthquake/nshmp/www/services/DeaggEpsilonService.java
index 8bac539f3..1036e20e1 100644
--- a/src/main/java/gov/usgs/earthquake/nshmp/www/services/DeaggEpsilonService.java
+++ b/src/main/java/gov/usgs/earthquake/nshmp/www/services/DeaggEpsilonService.java
@@ -12,8 +12,6 @@ import java.util.concurrent.ExecutionException;
 import java.util.function.Function;
 import java.util.logging.Logger;
 
-import javax.servlet.ServletException;
-
 import com.google.common.collect.ImmutableList;
 import com.google.common.io.Resources;
 
@@ -50,7 +48,7 @@ public final class DeaggEpsilonService {
   private static final Logger LOGGER = Logger.getLogger(DeaggEpsilonService.class.getName());
   private static URL basinUrl;
 
-  public static void init() throws ServletException {
+  public static void init() {
     try (InputStream config = Resources.getResource("config.properties").openStream()) {
       checkNotNull(config, "Missing config.properties");
 
@@ -65,7 +63,7 @@ public final class DeaggEpsilonService {
         basinUrl = url;
       }
     } catch (IOException | NullPointerException e) {
-      throw new ServletException(e);
+      throw new RuntimeException(e);
     }
   }
 
-- 
GitLab