}
private Object coerce(final String parameterName, Class parameterType,
String parameterValue, ValueEncoder valueEncoder)
{
Object value = valueEncoder.toValue(parameterValue);
if (parameterType.isPrimitive() && value == null)
throw new RuntimeException(
String.format(
"Query parameter '%s' evaluates to null, but the event method parameter is type %s, a primitive.",