if (value == null) {
Object currentValue;
try {
currentValue = get(dst);
} catch (Exception ex) {
throw new CodecExceptionLineNumber(ex, dstInfo);
}
if (isRequired() && currentValue == null) {
Exception ex = new RequiredFieldException("missing required field '" +
this.getName() + "' for " + dst, getName());
throw new CodecExceptionLineNumber(ex, dstInfo);
}
return;
}
if (!validate(value)) {
Exception ex = new ValidationException("invalid field value '" + value +
"' for " + this.getName() + " in " + dst, getName());
throw new CodecExceptionLineNumber(ex, valInfo);
}
try {
if (value.getClass() == String.class && isInterned()) {
value = ((String) value).intern();
}
field.set(dst, value);
} catch (Exception ex) {
throw new CodecExceptionLineNumber(ex.getMessage(), valInfo);
}
}