itemis / xtext-testing

Automatically exported from code.google.com/p/xtext-utils.unittesting
Other
8 stars 4 forks source link

If validation throws, getIssueSummary() throws NPE #7

Open fabtagon opened 5 years ago

fabtagon commented 5 years ago

If a validations throws an exceptions, it is caught and, if other than GuardException or NPE, added to a FluentIssueCollection which in turn is evaluated.

As such an exception doesn't posses a URI, getIssueSummary() fails with an NPE in here. Note that the exception thrown by getIssueSummary() is not the exception that the validation has thrown before.

In the best of all worlds, validations do of course not throw, but in reality this might happen (in the best of all worlds where no mistakes occour, validations probably won't be needed at all) - and Xtend seems prepared to deal with exceptions, at least with those other than NPE.

fabtagon commented 5 years ago

How things do (not) fit together:

Later on,

Suggestion how to resolve:

kthoms commented 5 years ago

NPE confirmed.