OptionGroup and setRequired

So my code for an OptionGroup follows.

		OptionGroup og = new OptionGroup();
		og.setMultiSelect(false);
		og.setRequired(true);
		og.setRequiredError(getRequiredErrorMessage(prop));
		og.setNullSelectionAllowed(false);

And in my save handler I have

				try {
					field.validate();
				} catch (InvalidValueException e) {
					isValid = false;
					if (field instanceof AbstractComponent) {
						String valMsg = e.getMessage();
						System.out.println(valMsg);

						((AbstractComponent) field)
								.setComponentError(new UserError(valMsg));
					}
				}

The OptionGroup required validation never gets triggered and the red exclamation point does not appear.

One other related problem is that, with the above code in the try catch, my error tooltips are showing the required error messages twice. The catch block is only being hit once per field however, so I’m not sure where the duplicate messages are coming from.

*** Update ***

Turns out the isEmpty() method is checking for null by default, whereas the OptionGroup default “empty” value is zero. So I overrode the isEmpty() method to check zero and all is well. Seems that perhaps OptionGroup should override the isEmpty method and check it’s default empty value of zero by default?

Thanks for the update. Using Vaadin 7.7 this still seems to be the case.
The validation of a required field only works when overwriting isEmpty.

    final OptionGroup optionGroup = new OptionGroup(caption, options) {
        public boolean isEmpty() {
            return (getValue() == null || StringUtils.isEmpty(Objects.toString(getValue(),"")));
            // otherwhise isRequired is not working see https://vaadin.com/forum/#!/thread/96763/96762
        }; 
    };