Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[Android] Fix issue with the use of null propagation operator #567
Description of Change
When propagating null checks using
or use old-school null checks. I chose the second option because ReSharper isn't smart enough to remove the squiggly line under
@StephaneDelcroix If you look at the bug description and repro, the user is using a custom view cell renderer and overriding
After thinking about this, I believe my fix is not the right one (although it could perhaps be nice to throw an argument null exception if renderer is null for visual guidance). It appears to me the proper fix might be invoking the base method with the new native cell instead of returning the new native cell.
That said, I will let you guys decide how to proceed. The changes in this PR are not applying touch listeners if the renderer is null. Should we throw an exception instead?
I agree that the original submitter's custom renderer might have issues and might not work they way they expect. Regardless,
I whipped up an alternate PR which tests this specific scenario and does the null checking in a more concise manner: #587