Bug 126839 [DataBinding] IObservable refactoring
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/provisional/databinding/converterfunctions/ConvertString2Character.java
/* (non-Javadoc)
	 * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
	 */
	public Object convert(Object source) {
        String s = (String) source;
        Character result;
        
        if (s.length() > 1) {
			throw new IllegalArgumentException("String2Character: string too long: " + s); 
		}
        
        try {
            result = new Character(s.charAt(0));
        } catch (Exception e) {
            throw new IllegalArgumentException("String2Character: " + e.getMessage() + ": " + s); 
        }
        
		return result;
	}
}