Skip to content
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

Merged
merged 2 commits into from
Nov 15, 2012
Merged

Allow the array returned by a @DataPoints-annotated method to contain null values #529

merged 2 commits into from
Nov 15, 2012

Conversation

Stephan202
Copy link
Contributor

A @DataPoints-annotated array field may contain null values. Currently, a similarly-annotated method may not: instead the method is silently ignored due to a swallowed NullPointerException (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.

@dsaff
Copy link
Member

dsaff commented Oct 16, 2012

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.)
@Stephan202
Copy link
Contributor Author

@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.

@marcphilipp
Copy link
Member

@dsaff Now that 4.11 is out, I think we can merge this pull request, can't we?

@dsaff
Copy link
Member

dsaff commented Nov 15, 2012

Indeed. Thanks, @Stephan202.

dsaff pushed a commit that referenced this pull request Nov 15, 2012
Allow the array returned by a @DataPoints-annotated method to contain null values
@dsaff dsaff merged commit 7ae6e67 into junit-team:master Nov 15, 2012
@dsaff
Copy link
Member

dsaff commented Nov 15, 2012

@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.

@Stephan202
Copy link
Contributor Author

@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.

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 15, 2012

@Stephan202
I think i discarded your last changes in wiki.
I will renew it. Pls check in 10 min.

@Stephan202
Copy link
Contributor Author

@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!

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 15, 2012

@Stephan202
no problem, i finihed editing.

@dsaff
Copy link
Member

dsaff commented Nov 16, 2012

@Stephan202, digging the new formatting. Thanks!

@Stephan202 Stephan202 deleted the null-datapoints branch July 10, 2014 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants