Mercurial > projects > dwt2
comparison org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/conversion/IntegerToStringConverter.d @ 89:0ca1aee7decf
Reverting to Class, final check against eclipse sources.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 19 Apr 2009 11:33:03 +0200 |
parents | 9e0ab372d5d8 |
children |
comparison
equal
deleted
inserted
replaced
88:9e0ab372d5d8 | 89:0ca1aee7decf |
---|---|
54 // Null is allowed when the type is not primitve. | 54 // Null is allowed when the type is not primitve. |
55 if (fromObject is null && !primitive) { | 55 if (fromObject is null && !primitive) { |
56 return stringcast(""); //$NON-NLS-1$ | 56 return stringcast(""); //$NON-NLS-1$ |
57 } | 57 } |
58 | 58 |
59 //FIXME check with org | 59 if (!boxedType.isInstance(fromObject)) { |
60 if (!Class.fromObject(boxedType).isAssignableFrom(Class.fromObject(fromObject))) { | |
61 throw new IllegalArgumentException( | 60 throw new IllegalArgumentException( |
62 Format("'fromObject' is not of type [{}].", boxedType)); //$NON-NLS-1$//$NON-NLS-2$ | 61 Format("'fromObject' is not of type [{}].", boxedType)); //$NON-NLS-1$//$NON-NLS-2$ |
63 } | 62 } |
64 | 63 |
65 return stringcast(numberFormat.format((cast(Number) fromObject).longValue())); | 64 return stringcast(numberFormat.format((cast(Number) fromObject).longValue())); |