We solved this by creating a BeanProxy class that overrides setValue and getValue. There we return NaN to the flex side if the value is Number and null, and we return null to the Java side if it is Double and NaN. The task:
@Override
public void setValue (Object instance, String propertyName, Object value) {
if ((value instanceof Double)) {
Double doubleValue = (Double) value;
if (doubleValue! = null && doubleValue.isNaN ()) {
super.setValue (instance, propertyName, null);
}
} else {
super.setValue (instance, propertyName, value);
}
}
@Override
public Object getValue (Object obj, String propertyName) {
final Class classType = super.getType (obj, propertyName);
if (isNumber (classType) && super.getValue (obj, propertyName) == null) {
return Double.NaN;
}
return super.getValue (obj, propertyName);
}
chris source share