Skip to content

Remove 'throws Exception' from JavaSnippet method signature #1308

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

Merged
merged 1 commit into from
Jan 4, 2018
Merged

Remove 'throws Exception' from JavaSnippet method signature #1308

merged 1 commit into from
Jan 4, 2018

Conversation

mlvandijk
Copy link
Member

Summary

Remove 'throws Exception' from JavaSnippet method signature's throws clause.

Details

Remove 'throws Exception' from JavaSnippet method signature's throws clause.
Update corresponding Unit Tests.

Motivation and Context

As discussed on Slack #help-cucumber-jvm channel Nov 8th, 2017 (summarized):
Autogenerated step definition snippets usually contain “throws Throwable”, although in most cases IDEA shows them as unused (exception is never thrown by this method). They were added to avoid people to add try catch like wrap their stepdef bodies in try-catch, which is why it was made to throw liberally.

How Has This Been Tested?

By running 'mvn clean install' and verifying that the build is successful.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've -added- updated tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 81.473% when pulling dd11267 on mlvandijk:snippets into 5a6c5ef on cucumber:master.

@mpkorstanje mpkorstanje merged commit 5772e64 into cucumber:master Jan 4, 2018
@mlvandijk mlvandijk deleted the snippets branch January 6, 2018 19:30
@lock
Copy link

lock bot commented Jan 6, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants