-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Allow the array returned by a @DataPoints-annotated method to contain null values #529
Conversation
This is a good fix. However, I'm considering letting the current 4.11 beta soak without change, so this may go to a (hopefully swift) 4.11.1 maintenance release. |
(Forgot to modify the class after copying, yielding essentially identical tests.)
@dsaff: Sure, no problem. The reason I asked is that this is the only issue that prevents me from dropping a (company internal) fork of JUnit in favor of 4.11-beta-1. Anyway, I noticed that I was a bit careless when writing the unit tests for this fix. Should be resolved now. |
@dsaff Now that 4.11 is out, I think we can merge this pull request, can't we? |
Indeed. Thanks, @Stephan202. |
Allow the array returned by a @DataPoints-annotated method to contain null values
@Stephan202, if you get a chance, can add a couple lines about the fix to https://github.com/KentBeck/junit/wiki/4.12-release-notes? Thanks. |
@dsaff: Sure, I tried to add a terse description just now. While at it, I couldn't resist rewording some of the existing text in an attempt to settle on some standard format for summarizing the changes. I hope the changes are agreeable. |
@Stephan202 |
@Tibor17: yeah, I noticed that, but didn't attempt to fix it because I suspected you were still editing (which turned out to be correct :) ). Odd that Github doesn't warn about this kind of editing conflict. Oh well, at least there's a revision history. Thanks for taking care of it! |
@Stephan202 |
@Stephan202, digging the new formatting. Thanks! |
A
@DataPoints
-annotated array field may containnull
values. Currently, a similarly-annotated method may not: instead the method is silently ignored due to a swallowedNullPointerException
(see also #449).This pull request aims to bring support for
@DataPoints
-methods to the same level as@DataPoints
-fields. If accepted, it would be highly appreciated if it can be merged in time for the final release of JUnit 4.11.