-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve error message when working on instrumented classes #703
Conversation
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.
Just a few little things to address.
<h3>Non-functional Changes</h3> | ||
<ul> | ||
<li>Improved error message when already instrumented classes are used for | ||
instrumentation or analysis. |
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.
Existing items consisting of one sentence use only one dot after link to GitHub.
InstrSupport.assertNotInstrumented("run", "Foo"); | ||
} | ||
|
||
@Test(expected = IllegalStateException.class) | ||
public void testAssertNotIntrumentedField() { | ||
public void assertNotIntrumented_should_throw_exception_when_jacoco_data_field_is_present() { | ||
InstrSupport.assertNotInstrumented("$jacocoData", "Foo"); |
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.
I think it worth to add assertion for message especially since its change originates from a user needs. In past we have examples of catching regressions thanks to assertions for error messages.
<ul> | ||
<li>Improved error message when already instrumented classes are used for | ||
instrumentation or analysis. | ||
(GitHub <a href="https://github.com/jacoco/jacoco/issues/700">#700</a>).</li> |
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.
As we discussed in #668 (comment) - existing links point to PRs, not on original issue.
@Godin Thanks for the review. I hope I addressed your issues. |
@marchof Perfect! Thank you! 👍 |
The instrumentation and analysis process expects original, uninstrumented classes. This seems to be a common configuration issue - see #700. Therefore the error message should be improved to be more helpful:
Cannot process instrumented class X. Please supply original non-instrumented classes.