Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
check for negative length in CigarElement ctor #839
Conversation
SHuang-Broad
added some commits
Apr 3, 2017
SHuang-Broad
changed the title from
Sh cigar ele arg check to check for negative length in CigarElement actor
Apr 3, 2017
SHuang-Broad
changed the title from
check for negative length in CigarElement actor to check for negative length in CigarElement ctor
Apr 3, 2017
codecov-io
commented
Apr 3, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #839 +/- ##
===============================================
- Coverage 64.863% 64.857% -0.005%
+ Complexity 7197 7195 -2
===============================================
Files 527 527
Lines 31781 31782 +1
Branches 5424 5425 +1
===============================================
- Hits 20614 20613 -1
+ Misses 9021 9020 -1
- Partials 2146 2149 +3
Continue to review full report at Codecov.
|
lbergelson
reviewed
Apr 4, 2017
One minor comment to include a bit more information in the error message.
| @@ -36,6 +36,7 @@ | ||
| private final CigarOperator operator; | ||
| public CigarElement(final int length, final CigarOperator operator) { | ||
| + if (length < 0) throw new IllegalArgumentException("Cigar element being constructed with negative length: " + length); |
SHuang-Broad
was assigned
by lbergelson
Apr 4, 2017
SHuang-Broad
added some commits
Apr 4, 2017
|
Made the change, back to you @lbergelson |
|
Sorry for forgetting to mention this, @lbergelson . I don't have write access to this repo. So if you approve the changes and feel like it, please help me squash and merge. |
yfarjoun
dismissed
lbergelson’s
review
Apr 16, 2017
requested changes were made.
|
|
SHuang-Broad commentedApr 3, 2017
Description
Class
CigarElementcurrently doesn't check for the length provided in its ctor. This PR adds that check.Checklist