Check if a field name is of an acceptable value (start with a lowercase
letter)
if (fieldName == null || fieldName.length()==0) {
throw new IllegalArgumentException("cmp-field or cmr-field name cannot be empty strings");
}
char firstChar = fieldName.charAt(0);
if (!Character.isLetter(firstChar)) {
throw new IllegalArgumentException("cmp-field or cmr-field name " + fieldName + " must begin with a letter ");
}
if (!Character.isLowerCase(firstChar)) {
throw new IllegalArgumentException("cmp-field or cmr-field name " + fieldName + " must begin with a lowercase letter");
}