Fix ArrayIndexOutOfBoundsException exception in BarChartRenderer.java from bug #4984 #4985
Conversation
ArrayIndexOutOfBoundsException is thrown and whole app crashes if a a marked BarCharts get outside of the visible range.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ArrayIndexOutOfBoundsException is thrown and whole app crashes if a a marked BarCharts get outside of the visible range.
The exception can be caught and logged without a disadvantage.
PR Checklist:
PR Description
The "e.getRanges()[high.getStackIndex()]" gets surrounded with a try - catch. If an exception is thrown, the method returns without any change.
Catches exception if a marked BarChart gets outside of the visible chart area.
The whole app crashes if this exception is not caught.