/** * Convert a string value to its Object value. * * @param value String value * @param prop PropertyDescriptor * @return The object set to {@code value} (i.e. Integer). Will return * a {@link java.lang.String} if no PropertyEditor is found. * @throws InstantiationException Thrown on error getting the property * editor from the property descriptor. * @throws IllegalAccessException Thrown on error getting the property * editor from the property descriptor. */ protected Object convertValue(String value, PropertyDescriptor prop) throws InstantiationException, IllegalAccessException { PropertyEditor editor = getPropertyEditor(prop); Object obj = value; if (null != editor) { synchronized (editor) { editor.setAsText(value); obj = editor.getValue(); } } return obj; }