-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce Throwable to Exception in JavaSnippet #1208
Conversation
Tests are allowed to fail by throwing an(y) exception. As such #318 added `throws Throwable` to the JavaSnippet. Aside from being a bad practice this results in unnecessary checkstyle warnings. As such the generated snippet should not explicitly declare `Throwable`. Reducing `Throwable` to `Exception` should be sufficient. Fixes #1207
@@ -2,6 +2,7 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO | |||
|
|||
## [2.0.0-SNAPSHOT](https://github.com/cucumber/cucumber-jvm/compare/v1.2.5...master) (In Git) | |||
|
|||
* [Java] Reduce Throwable to Exception in JavaSnippet ([#1207](https://github.com/cucumber/cucumber-jvm/issues/1207), [#1208](https://github.com/cucumber/cucumber-jvm/pull/1208) M.P. Korstanje) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, we discourage updating the Changelog in PR:s, and instead put that task on the person merging the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Planned on doing that myself. Then realized @mlvandijk could do it as a practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I was too slow ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, the same day I was up to release Cucumber-JVM 2.0.0 was the wrong day for such practice ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such is life. :D
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Tests are allowed to fail by throwing an(y) exception. As such #318
added
throws Throwable
to the JavaSnippet. Aside from being a badpractice this results in unnecessary checkstyle warnings. As such the
generated snippet should not explicitly declare
Throwable
.Reducing
Throwable
toException
should be sufficient.Fixes #1207
How Has This Been Tested?
Updated the Unit Tests.
Types of changes
Checklist: