This repository was archived by the owner on May 28, 2025. It is now read-only.
Fix endless loop if index set is nil#2778
Open
xFAR wants to merge 2 commits intomicrosoft:developfrom
Open
Conversation
DHowett-MSFT
suggested changes
Jul 20, 2017
There was a problem hiding this comment.
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.
Author
|
Dustin,
My responses inline.
On Jul 21, 2017, at 1:08 AM, Dustin L. Howett (MSFT) ***@***.***> wrote:
@DHowett-MSFT requested changes on this pull request.
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
I will update the style. I use tabs equal to four spaces so I did not notice.
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”);
Ok.
Would you mind writing tests (in NSArrayTests.mm) for this behaviour as well? You can use the other tests as a template.
Hopefully, I can get to this later in the week.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Regards,
Felipe A. Rodriguez
illumenos LLC
…________________________
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raises an invalid arg exception per Apple implementation and docs.
This change is