android retrolambda, statement lambda can be replaced with expression lambda
Asked Answered
A

1

10

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.

Ats answered 3/3, 2016 at 2:8 Comment(0)
F
15

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);

Francescafrancesco answered 3/3, 2016 at 2:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.