Skip to content
New issue

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

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

Already on GitHub? # to your account

avoid thousands of MissingPropertyExceptions #1039

Merged
merged 1 commit into from
Dec 21, 2016

Conversation

angryziber
Copy link
Contributor

Binding can only contain variables (basically, a Map), not properties.

If groovy doesn't find a variable, it throws a MissingPropertyException populating the stacktrace.

GroovyTemplate.getProperty() first calls the getVariable(), if it throws (happens very often if you have optional bindings), then it catches and delegates to getProperty(), that does some slow work itself again.

This small change avoids these excessive exceptions with stacktraces on every missing variable access.

@xael-fry
Copy link
Member

We revert this PR for now as I found some problems, I created #1067 and will add some tests before review this PR again

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants