Null pointer exception in compiler debugging of Multiplicity #907

TimLethbridge opened this Issue Oct 28, 2016 · 0 comments


None yet

1 participant


When debugging the compiler class Multiiplicity's generated toString is generating a null pointer exception, which can happen if it isn't initialized. This is because the parserable derived attribute does not check that the lazy attributes have been populated.

The fix is to change cruise.umple/src/Umple.ump line 940

parserable = { getMinimum() == null ? "?" : (getBound() != null ? getBound() : (getMinimum().equals("0") && getMaximum().equals("*") ? "*" : getMinimum() + ".." + getMaximum())) }

However, this makes the following tests fail, that also need fixing:

[junit] TEST cruise.umple.implementation.alloy.AlloyTemplateTest FAILED
[junit] TEST cruise.umple.implementation.umpleself.UmpleSelfGeneratorTest FAILED
[junit] Tests FAILED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment