case LONG:
if(LongUtil.isValidShort(longValue)) {
return (short) longValue;
}
else {
throw new MessageIntegerOverflowException(longValue);
}
case BIG_INTEGER:
if(LongUtil.isValidShort(biValue)) {
return biValue.shortValue();
}
else {
throw new MessageIntegerOverflowException(biValue);
}
default:
throw failure();
}
}