mirror of
https://github.com/google/nomulus
synced 2026-09-20 06:54:43 +00: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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user