Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When comparing expression values, JUEL will attempt to compare the values as strings if either of the values are strings. If one of those values is a huge collection, it will try to convert that collection to an even larger string, leading to OOMs.
One way to solve this problem is to limit the size of these compared strings the same way that we limit the output. This will throw an
OutputTooBigException
which is not quite right since it's not output.I decided to not throw the exception but just limit the length of the string and allow the comparison to fail assuming the first 1M bytes of the string are not the same as the
toString()
value of the collection.This doesn't immediately solve the problem of a collection that has a huge collection nested inside it, but it should help in most cases.