Android retrolambda, lambda expression can be replaced with lambda expression

I use retrolambda in my project, it works great. but today, when I used it, Android Studio gives me a hint:

enter image description here

I have not seen this before, how do I need to change the code to satisfy this question.

+7
android lambda android-studio retrolambda
source share
1 answer

The return not needed for single-line expressions, so it tells you that it is safe to delete (hence why the return is inactive). For example, you can reorganize this:

player.setOnErrorListner((mp, what, extra) -> true);

+13
source share

All Articles