-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
GSoC Sprint 3: Kafka 3
In /unifiedpush/message/sender/MPNSPushNotificationSender.java, you can find checks like
if (images.size() >= 1) { //DO sth }
or
if (textFields.size() >= 1) { // DO sth }
They can be changed by using isEmpty method.
Using Collection.size() to test for emptiness works, but using Collection.isEmpty() makes the code more readable and can be more performant. The time complexity of any isEmpty() method implementation should be O(1) whereas some implementations of size() can be O