| Summary: | [LTTng] maximize and restore Events view caused (java.lang.ArithmeticException: / by zero) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Yufen Kuo <ykuo> | ||||
| Component: | LinuxTools | Assignee: | Francois Chouinard <fchouinard> | ||||
| Status: | CLOSED FIXED | QA Contact: | Francois Chouinard <fchouinard> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Yufen Kuo
I'll take this one. Created attachment 203626 [details]
Fix
Couldn't reproduce the problem in my environment but there is definitely a possibility for div by 0.
The method had assert statements to cover for this case but, in Java, you have to provide a run-time switch (-ea) to enable them.
The patch does the following:
- Replace "assert" by an an AssertionError
- Ensure that the caller validates its data before calling this method
- Added a unit test
Comment on attachment 203626 [details]
Fix
Patch committed
Done. I have verified the fix with latest code in master and I am no longer getting the ArithmeticException. thanks for fixing it quickly! (In reply to comment #5) > I have verified the fix with latest code in master and I am no longer getting > the ArithmeticException. > thanks for fixing it quickly! You're welcome. Delivered in 0.9.0 |