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

Calling getValue() on an uninstantiated variable throws an IllegalStateException #957

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

cprudhom
Copy link
Member

Calling getValue() on a free variable returned its current lower bound.
However, even if an assertion was present, a value could be returned, which could be confusing.

I propose throwing an unchecked exception, namely IllegalStateException, when a call to getValue() is made on a free variable.
This is safer and may also have some an educational value for beginners.

@cprudhom cprudhom added this to the 4.10.11 milestone Oct 26, 2022
@sonatype-lift
Copy link

sonatype-lift bot commented Oct 26, 2022

⚠️ 87 God Classes were detected by Lift in this project. Visit the Lift web console for more details.

@cprudhom
Copy link
Member Author

Hmm. there is something wrong with the GH, all tests run on my machine

@cprudhom cprudhom merged commit d424fa6 into master Oct 26, 2022
@cprudhom cprudhom deleted the dev_get_value branch October 26, 2022 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants