Skip to content

Commit

Permalink
Avoid ArrayIndexOutOfBoundsException on Android cpu data collection (#…
Browse files Browse the repository at this point in the history
…3598)

* added ArrayIndexOutOfBoundsException to try catch block in AndroidCpuCollector
  • Loading branch information
stefanosiano authored Aug 1, 2024
1 parent 7c34b37 commit 09dab51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Fixes

- Avoid ArrayIndexOutOfBoundsException on Android cpu data collection ([#3598](https://github.com/getsentry/sentry-java/pull/3598))
- Fix lazy select queries instrumentation ([#3604](https://github.com/getsentry/sentry-java/pull/3604))

## 7.13.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private long readTotalCpuNanos() {
// Amount of clock ticks this process' waited-for children has been scheduled in kernel mode
long csTime = Long.parseLong(stats[16]);
return (long) ((uTime + sTime + cuTime + csTime) * nanosecondsPerClockTick);
} catch (NumberFormatException e) {
} catch (NumberFormatException | ArrayIndexOutOfBoundsException e) {
logger.log(SentryLevel.ERROR, "Error parsing /proc/self/stat file.", e);
return 0;
}
Expand Down

0 comments on commit 09dab51

Please sign in to comment.