diff --git a/java/com/google/domain/registry/model/registrar/Registrar.java b/java/com/google/domain/registry/model/registrar/Registrar.java index 8809c2191..c912fed8f 100644 --- a/java/com/google/domain/registry/model/registrar/Registrar.java +++ b/java/com/google/domain/registry/model/registrar/Registrar.java @@ -37,7 +37,6 @@ import static java.nio.charset.StandardCharsets.UTF_8; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.base.Supplier; -import com.google.common.base.Throwables; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; @@ -554,7 +553,7 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable (password + salt).getBytes(UTF_8))); } catch (NoSuchAlgorithmException e) { // All implementations of MessageDigest are required to support SHA-256. - throw Throwables.propagate(e); + throw new RuntimeException(e); } } diff --git a/java/com/google/domain/registry/util/TypeUtils.java b/java/com/google/domain/registry/util/TypeUtils.java index 4d9fe7ce0..01a05fa82 100644 --- a/java/com/google/domain/registry/util/TypeUtils.java +++ b/java/com/google/domain/registry/util/TypeUtils.java @@ -19,7 +19,6 @@ import static java.lang.reflect.Modifier.isFinal; import static java.lang.reflect.Modifier.isStatic; import com.google.common.base.Predicate; -import com.google.common.base.Throwables; import com.google.common.collect.ImmutableMap; import com.google.common.reflect.TypeToken; @@ -53,7 +52,7 @@ public class TypeUtils { try { return (T) clazz.newInstance(); } catch (InstantiationException | IllegalAccessException e) { - throw Throwables.propagate(e); + throw new RuntimeException(e); } } diff --git a/java/com/google/domain/registry/util/XmlEnumUtils.java b/java/com/google/domain/registry/util/XmlEnumUtils.java index b601fd5ec..183def36e 100644 --- a/java/com/google/domain/registry/util/XmlEnumUtils.java +++ b/java/com/google/domain/registry/util/XmlEnumUtils.java @@ -14,8 +14,6 @@ package com.google.domain.registry.util; -import com.google.common.base.Throwables; - import javax.xml.bind.annotation.XmlEnumValue; /** Utility methods related to xml enums. */ @@ -25,7 +23,7 @@ public class XmlEnumUtils { try { return input.getClass().getField(input.name()).getAnnotation(XmlEnumValue.class).value(); } catch (NoSuchFieldException e) { - throw Throwables.propagate(e); + throw new RuntimeException(e); } } } diff --git a/java/com/google/domain/registry/xml/XmlTransformer.java b/java/com/google/domain/registry/xml/XmlTransformer.java index 1a6f187f6..9ba50616c 100644 --- a/java/com/google/domain/registry/xml/XmlTransformer.java +++ b/java/com/google/domain/registry/xml/XmlTransformer.java @@ -20,7 +20,6 @@ import static com.google.domain.registry.xml.ValidationMode.STRICT; import static java.nio.charset.StandardCharsets.UTF_8; import com.google.common.base.Joiner; -import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.io.Closer; @@ -91,7 +90,7 @@ public class XmlTransformer { this.jaxbContext = JAXBContext.newInstance(recognizedClasses); this.schema = loadXmlSchemas(schemaFilenames); } catch (JAXBException e) { - throw Throwables.propagate(e); + throw new RuntimeException(e); } } @@ -108,7 +107,7 @@ public class XmlTransformer { this.jaxbContext = initJaxbContext(pakkage, schemaNamesToFilenames.keySet()); this.schema = loadXmlSchemas(ImmutableList.copyOf(schemaNamesToFilenames.values())); } catch (JAXBException e) { - throw Throwables.propagate(e); + throw new RuntimeException(e); } }