removes unchecked exceptions declared in 'throws' clause
This commit is contained in:
parent
8e8b8e05e4
commit
e767af7e7e
|
@ -85,7 +85,7 @@ public class ArchUtils {
|
|||
* @param processor The {@link Processor} to add.
|
||||
* @throws IllegalStateException If the key already exists.
|
||||
*/
|
||||
private static void addProcessor(final String key, final Processor processor) throws IllegalStateException {
|
||||
private static void addProcessor(final String key, final Processor processor) {
|
||||
if (!ARCH_TO_PROCESSOR.containsKey(key)) {
|
||||
ARCH_TO_PROCESSOR.put(key, processor);
|
||||
} else {
|
||||
|
@ -101,7 +101,7 @@ public class ArchUtils {
|
|||
* @param processor The {@link Processor} to add.
|
||||
* @throws IllegalStateException If the key already exists.
|
||||
*/
|
||||
private static void addProcessors(final Processor processor, final String... keys) throws IllegalStateException {
|
||||
private static void addProcessors(final Processor processor, final String... keys) {
|
||||
for (final String key : keys) {
|
||||
addProcessor(key, processor);
|
||||
}
|
||||
|
|
|
@ -1084,7 +1084,7 @@ public class ClassUtils {
|
|||
* or if the method doesn't conform with the requirements
|
||||
*/
|
||||
public static Method getPublicMethod(final Class<?> cls, final String methodName, final Class<?>... parameterTypes)
|
||||
throws SecurityException, NoSuchMethodException {
|
||||
throws NoSuchMethodException {
|
||||
|
||||
final Method declaredMethod = cls.getMethod(methodName, parameterTypes);
|
||||
if (Modifier.isPublic(declaredMethod.getDeclaringClass().getModifiers())) {
|
||||
|
|
|
@ -867,7 +867,7 @@ public class ObjectUtils {
|
|||
* @return the byte v, unchanged
|
||||
* @since 3.2
|
||||
*/
|
||||
public static byte CONST_BYTE(final int v) throws IllegalArgumentException {
|
||||
public static byte CONST_BYTE(final int v) {
|
||||
if (v < Byte.MIN_VALUE || v > Byte.MAX_VALUE) {
|
||||
throw new IllegalArgumentException("Supplied value must be a valid byte literal between -128 and 127: [" + v + "]");
|
||||
}
|
||||
|
@ -936,7 +936,7 @@ public class ObjectUtils {
|
|||
* @return the byte v, unchanged
|
||||
* @since 3.2
|
||||
*/
|
||||
public static short CONST_SHORT(final int v) throws IllegalArgumentException {
|
||||
public static short CONST_SHORT(final int v) {
|
||||
if (v < Short.MIN_VALUE || v > Short.MAX_VALUE) {
|
||||
throw new IllegalArgumentException("Supplied value must be a valid byte literal between -32768 and 32767: [" + v + "]");
|
||||
}
|
||||
|
|
|
@ -696,7 +696,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder {
|
|||
*
|
||||
* @see java.lang.reflect.Field#get(Object)
|
||||
*/
|
||||
protected Object getValue(final Field field) throws IllegalArgumentException, IllegalAccessException {
|
||||
protected Object getValue(final Field field) throws IllegalAccessException {
|
||||
return field.get(this.getObject());
|
||||
}
|
||||
|
||||
|
|
|
@ -269,8 +269,7 @@ public class EventCountCircuitBreaker extends AbstractCircuitBreaker<Integer> {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public boolean incrementAndCheckState(final Integer increment)
|
||||
throws CircuitBreakingException {
|
||||
public boolean incrementAndCheckState(final Integer increment) {
|
||||
return performStateCheck(increment);
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ public class ThresholdCircuitBreaker extends AbstractCircuitBreaker<Long> {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public boolean checkState() throws CircuitBreakingException {
|
||||
public boolean checkState() {
|
||||
return isOpen();
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class ThresholdCircuitBreaker extends AbstractCircuitBreaker<Long> {
|
|||
* <p>If the threshold is zero, the circuit breaker will be in a permanent <em>open</em> state.</p>
|
||||
*/
|
||||
@Override
|
||||
public boolean incrementAndCheckState(final Long increment) throws CircuitBreakingException {
|
||||
public boolean incrementAndCheckState(final Long increment) {
|
||||
if (threshold == 0) {
|
||||
open();
|
||||
}
|
||||
|
|
|
@ -447,7 +447,7 @@ public class NumberUtils {
|
|||
* @return Number created from the string (or null if the input is null)
|
||||
* @throws NumberFormatException if the value cannot be converted
|
||||
*/
|
||||
public static Number createNumber(final String str) throws NumberFormatException {
|
||||
public static Number createNumber(final String str) {
|
||||
if (str == null) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
|
|||
* @throws NumberFormatException if the string cannot be parsed into a byte
|
||||
* @since 2.5
|
||||
*/
|
||||
public MutableByte(final String value) throws NumberFormatException {
|
||||
public MutableByte(final String value) {
|
||||
super();
|
||||
this.value = Byte.parseByte(value);
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
|
|||
* @throws NumberFormatException if the string cannot be parsed into a double
|
||||
* @since 2.5
|
||||
*/
|
||||
public MutableDouble(final String value) throws NumberFormatException {
|
||||
public MutableDouble(final String value) {
|
||||
super();
|
||||
this.value = Double.parseDouble(value);
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
|
|||
* @throws NumberFormatException if the string cannot be parsed into a float
|
||||
* @since 2.5
|
||||
*/
|
||||
public MutableFloat(final String value) throws NumberFormatException {
|
||||
public MutableFloat(final String value) {
|
||||
super();
|
||||
this.value = Float.parseFloat(value);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
|
|||
* @throws NumberFormatException if the string cannot be parsed into an int
|
||||
* @since 2.5
|
||||
*/
|
||||
public MutableInt(final String value) throws NumberFormatException {
|
||||
public MutableInt(final String value) {
|
||||
super();
|
||||
this.value = Integer.parseInt(value);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
|
|||
* @throws NumberFormatException if the string cannot be parsed into a long
|
||||
* @since 2.5
|
||||
*/
|
||||
public MutableLong(final String value) throws NumberFormatException {
|
||||
public MutableLong(final String value) {
|
||||
super();
|
||||
this.value = Long.parseLong(value);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
|
|||
* @throws NumberFormatException if the string cannot be parsed into a short
|
||||
* @since 2.5
|
||||
*/
|
||||
public MutableShort(final String value) throws NumberFormatException {
|
||||
public MutableShort(final String value) {
|
||||
super();
|
||||
this.value = Short.parseShort(value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue