mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Replace Throwables.propagate with equivalent "throw e" or "throw new RuntimeException(e)."
We are removing all calls in preparation for deleting the method. More information: [] Tested: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=117628955
This commit is contained in:
parent
980625f901
commit
0db3e13ef3
4 changed files with 5 additions and 10 deletions
|
@ -37,7 +37,6 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
import com.google.common.base.Supplier;
|
import com.google.common.base.Supplier;
|
||||||
import com.google.common.base.Throwables;
|
|
||||||
import com.google.common.collect.FluentIterable;
|
import com.google.common.collect.FluentIterable;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
@ -554,7 +553,7 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
||||||
(password + salt).getBytes(UTF_8)));
|
(password + salt).getBytes(UTF_8)));
|
||||||
} catch (NoSuchAlgorithmException e) {
|
} catch (NoSuchAlgorithmException e) {
|
||||||
// All implementations of MessageDigest are required to support SHA-256.
|
// All implementations of MessageDigest are required to support SHA-256.
|
||||||
throw Throwables.propagate(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ import static java.lang.reflect.Modifier.isFinal;
|
||||||
import static java.lang.reflect.Modifier.isStatic;
|
import static java.lang.reflect.Modifier.isStatic;
|
||||||
|
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.base.Throwables;
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.google.common.reflect.TypeToken;
|
import com.google.common.reflect.TypeToken;
|
||||||
|
|
||||||
|
@ -53,7 +52,7 @@ public class TypeUtils {
|
||||||
try {
|
try {
|
||||||
return (T) clazz.newInstance();
|
return (T) clazz.newInstance();
|
||||||
} catch (InstantiationException | IllegalAccessException e) {
|
} catch (InstantiationException | IllegalAccessException e) {
|
||||||
throw Throwables.propagate(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
|
|
||||||
package com.google.domain.registry.util;
|
package com.google.domain.registry.util;
|
||||||
|
|
||||||
import com.google.common.base.Throwables;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlEnumValue;
|
import javax.xml.bind.annotation.XmlEnumValue;
|
||||||
|
|
||||||
/** Utility methods related to xml enums. */
|
/** Utility methods related to xml enums. */
|
||||||
|
@ -25,7 +23,7 @@ public class XmlEnumUtils {
|
||||||
try {
|
try {
|
||||||
return input.getClass().getField(input.name()).getAnnotation(XmlEnumValue.class).value();
|
return input.getClass().getField(input.name()).getAnnotation(XmlEnumValue.class).value();
|
||||||
} catch (NoSuchFieldException e) {
|
} catch (NoSuchFieldException e) {
|
||||||
throw Throwables.propagate(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ import static com.google.domain.registry.xml.ValidationMode.STRICT;
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import com.google.common.base.Throwables;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.google.common.io.Closer;
|
import com.google.common.io.Closer;
|
||||||
|
@ -91,7 +90,7 @@ public class XmlTransformer {
|
||||||
this.jaxbContext = JAXBContext.newInstance(recognizedClasses);
|
this.jaxbContext = JAXBContext.newInstance(recognizedClasses);
|
||||||
this.schema = loadXmlSchemas(schemaFilenames);
|
this.schema = loadXmlSchemas(schemaFilenames);
|
||||||
} catch (JAXBException e) {
|
} 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.jaxbContext = initJaxbContext(pakkage, schemaNamesToFilenames.keySet());
|
||||||
this.schema = loadXmlSchemas(ImmutableList.copyOf(schemaNamesToFilenames.values()));
|
this.schema = loadXmlSchemas(ImmutableList.copyOf(schemaNamesToFilenames.values()));
|
||||||
} catch (JAXBException e) {
|
} catch (JAXBException e) {
|
||||||
throw Throwables.propagate(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue