Skip to content

Fix ArrayIndexOutOfBoundsException exception in BarChartRenderer.java from bug #4984 - #4985

Open
Athameon wants to merge 1 commit into
PhilJay:masterfrom
Athameon:patch-2
Open

Athameon wants to merge 1 commit into
PhilJay:masterfrom
Athameon:patch-2

Conversation

@Athameon

Copy link
Copy Markdown

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.

ArrayIndexOutOfBoundsException is thrown and whole app crashes if a a marked BarCharts get outside of the visible range.
@Athameon Athameon changed the title Update BarChartRenderer.java Fixe bug https://github.com/PhilJay/MPAndroidChart/issues/4984 in BarChartRenderer.java Aug 30, 2020
@Athameon Athameon changed the title Fixe bug https://github.com/PhilJay/MPAndroidChart/issues/4984 in BarChartRenderer.java Fixe bug ArrayIndexOutOfBoundsException exception in BarChartRenderer.java from bug #4984 Aug 30, 2020
@Athameon Athameon changed the title Fixe bug ArrayIndexOutOfBoundsException exception in BarChartRenderer.java from bug #4984 Fix ArrayIndexOutOfBoundsException exception in BarChartRenderer.java from bug #4984 Aug 30, 2020
@Athameon Athameon closed this Nov 14, 2020
@Athameon Athameon reopened this Nov 14, 2020
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.

1 participant