Address static analyzer warning in OCPartialMockObject (Issue #543)#544
Address static analyzer warning in OCPartialMockObject (Issue #543)#544LowAmmo wants to merge 2 commits intoerikdoe:masterfrom
Conversation
* Issue erikdoe#543 about potential nil passed to class_addMethod() OCPartialMockObject#setupForwarderForSelector * Modified to just return if there is no existing implementation for the method
|
@erikdoe - Any chance this could be merged so it's in any future OCMock releases? -Thanks! |
|
To be honest, it's a long time since I wrote that code, but returning early from the method if A less risky/invasive change would be to skip only the call to I think my assumption was that it was okay to set |
|
@erikdoe - You've got a much better understanding of the innerworkings of all of this than I do, so I will gladly defer to your gut instincts! 😄 I do suspect you're right, that there is enough other "safety" checks that just skipping the call to "class_addMethod" is likely okay in this erroneous instance of a consumer trying to mock a method that doesn't exist (or can't be found) via ObjC. Especially since it doesn't seem to be causing problems, today - other than the warning message I'm trying to clean up. 😄 |
…if original implementation couldn't be found
|
@erikdoe - Just hoping to get this approved & pulled in & released to cocoapods sometime soon? -Thanks! |
|
@erikdoe - Just pinging you to hopefully get this PR on your radar to pull in sometime soon... 😄 |
|
@erikdoe - just pinging to see about getting this pulled in? |
|
@erikdoe - checking in again about getting this pulled in? (as an additional option - if you are finding yourself without enough time to keep maintaining this library...I'd be willing to be made a github & cocoapod admin to help out) |
OCPartialMockObject#setupForwarderForSelector