Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve unknown annotation trait errors #644

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

mtdowling
Copy link
Member

When an annotation trait isn't defined in the model but SPI can be found
for it, the error message is about providing a null value for an
AnnotationTrait when an object is expected, and that's confusing. This
change addresses this by assuming that an unknown annotation trait is an
object since that is the most common case (and because annotation traits can
never be null). This doesn't end up resulting in a clean model validation
result, but it gives better error messages about the trait not being defined.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

When an annotation trait isn't defined in the model but SPI can be found
for it, the error message is about providing a null value for an
AnnotationTrait when an object is expected, and that's confusing. This
change addresses this by assuming that an unknown annotation trait is an
object since that is the most common case (and because annotation traits can
never be null). This doesn't end up resulting in a clean model validation
result, but it gives better error messages about the trait not being defined.
@mtdowling mtdowling merged commit 6d60e86 into master Dec 1, 2020
@mtdowling mtdowling deleted the improve-unknown-annotation-trait-errors branch December 11, 2020 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants