Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android retrolambda, statement lambda can be replaced with expression lambda

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

enter image description here

I haven't seen this before, how I need to modify the code in order to meet this tip.

like image 314
L. Swifter Avatar asked Mar 03 '16 02:03

L. Swifter


1 Answers

The return statement is not needed for single-line expressions, so it's telling you that it's safe to delete (hence why return is grayed out). For example, you can refactor that to:

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

like image 102
telkins Avatar answered Sep 19 '22 18:09

telkins