Community
Participate
Working Groups
The current implementation for ordinal numbers relies on java.lang.Long. Even though Ecore offers an unbound integer type EBigInteger and the expression engine works quite well with this to some degree (e.g. printing in Xpand) there a some pitfalls, though. Arithmetic operations lead to overflows and comparisons are simply wrong. I will attach a patch that changes the internal representation of expression.Integer to java.math.BigInteger and do some further improvements to comparisons between expresssion.Real and expression.Integer. Since this change would cause incompatibilities with existing java extensions that expect parameters to be of the type java.lang.Long I will also introduce an automatic type conversion for these cases. This will not only work for this specific case but leverages the expression's convert method to be more general. Therefore, it is suitable to pass an Int to a java method that accepts only bytes or to pass a string of length 1 to a java method that accepts only characters.
Created attachment 125427 [details] Long->BigInteger, Implicit type conversion for java extensions, minor fixes
patch applied.
Bug resolved before Xpand 1.2 release date => Closing