diff --git a/src/main/java/gov/usgs/earthquake/nshmp/internal/AppVersion.java b/src/main/java/gov/usgs/earthquake/nshmp/internal/AppVersion.java index 3302f1987165ae077304b6fe91913f12d1e2f9d5..d25662ad36c4b654ed1bd265fbbf88660bf39ad9 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/internal/AppVersion.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/internal/AppVersion.java @@ -1,10 +1,8 @@ package gov.usgs.earthquake.nshmp.internal; -import java.io.IOException; - public interface AppVersion { - public VersionInfo getVersionInfo() throws IllegalArgumentException, IOException; + public VersionInfo getVersionInfo(); public static class VersionInfo { public String branchName; diff --git a/src/main/java/gov/usgs/earthquake/nshmp/internal/LibVersion.java b/src/main/java/gov/usgs/earthquake/nshmp/internal/LibVersion.java index 26fc790b06045c66d77b7f2d83901e385afe2f75..6fcd6f8d70aa7b0bcb3cbd3534c8d556d15896c0 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/internal/LibVersion.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/internal/LibVersion.java @@ -1,17 +1,19 @@ package gov.usgs.earthquake.nshmp.internal; -import java.io.IOException; - import com.google.common.base.Charsets; import com.google.common.io.Resources; import com.google.gson.Gson; public class LibVersion implements AppVersion { - public VersionInfo getVersionInfo() throws IllegalArgumentException, IOException { - var resource = Resources.getResource("version.json"); - return new Gson().fromJson( - Resources.toString(resource, Charsets.UTF_8), - VersionInfo.class); + public VersionInfo getVersionInfo() { + try { + var resource = Resources.getResource("version.json"); + return new Gson().fromJson( + Resources.toString(resource, Charsets.UTF_8), + VersionInfo.class); + } catch (Exception e) { + throw new RuntimeException(e.getMessage()); + } } }