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

Fix endless loop if index set is nil #2778

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

xFAR
Copy link

@xFAR xFAR commented Jul 20, 2017

Raises an invalid arg exception per Apple implementation and docs.


This change is Reviewable

Copy link

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @xFAR! Thanks for the contribution.

I'd like to accept this pull request, but I've got a couple minor issues:

  • Our coding convention requires four spaces be used per indentation level than one tab
  • We have a macro (admittedly difficult to discover!) called NS_COLLECTION_THROW_IF_NULL_REASON; you can place it at the top of this function and keep the rest of the code the same.
NS_COLLECTION_THROW_IF_NULL_REASON(indexes, @"indexes must not be nil");

Would you mind writing tests (in NSArrayTests.mm) for this method (with a nil index set) as well? You can use the other tests as a template.

@xFAR
Copy link
Author

xFAR commented Jul 21, 2017 via email

@microsoft microsoft deleted a comment from msftclas Sep 26, 2017
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