try {
int intValue = Integer.parseInt(value);
if((intValue < 0) || (intValue > Integer.MAX_VALUE)){
String failureMessage = formatFailureMessage(toString(),
value, name);
failed_constrained_list.add(new ConstraintFailure(toString(),
value, name, failureMessage, BundleReader.getValue(
"MSG_ZeroToMaxIntegerConstraint_Failure"))); //NOI18N
}
return failed_constrained_list;
} catch(NumberFormatException e) {
String failureMessage = formatFailureMessage(toString(), value,
name);
failed_constrained_list.add(new ConstraintFailure(toString(),
value, name, failureMessage, BundleReader.getValue(
"MSG_NumberConstraint_Failure"))); //NOI18N
}
}
return failed_constrained_list;