Replace runnable wrappers by lambda expressions/method references#1380
Replace runnable wrappers by lambda expressions/method references#1380ViToni wants to merge 2 commits intozsmartsystems:masterfrom
Conversation
|
TODO:
|
acf69e2 to
ce3dc37
Compare
|
@cdjackson Would you mind taking a look at this one? |
|
@ViToni my concern here is that on some Android versions I understand that lambda expressions are not available, so we have for that reason avoided them. Now that concern is possibly no longer an issue - I'm not sure, but I'm just a bit wary to make this change and find it breaks compatibility. |
|
@cdjackson Thanks for the feedback. Didn't know about restrictions regarding Android / Lambda expressions (but I have to admit I'm not deep into Android regarding development). Regarding the first Android version supporting Java 8, from what I found, it seems to be Android Nougat from August 2016 or respective Android Studio 3.0.0 from October 2017. The final release of Nougat was October 2019. Don't know if this information helps on the decision though... |
|
I found that animal sniffer throws an error with your recent addition of a lambda in the queue management PR, so i guess that answers the compatibility question ;) |
By switching to Java8 (#408)
Runnablewrappers can be replaced be Lambda expression or even method references as done in this PR.