209 | | There is a [https://github.com/javaparser/javaparser/issues/4503 persistent bug in the javaparser] related to parsing MethodReferenceExpressions like {{{Object::func}}}. You may have to introduce an extra variable containing the Method reference expression to work around this issue. |
| 209 | Note that the notation {{{MObject::func}}} is an alternative notation for the lambda notation {{{(...)->func(...)}}}. However, there is a [https://github.com/javaparser/javaparser/issues/4503 persistent bug in the javaparser] related to parsing MethodReferenceExpressions like {{{Object::func}}}. Generally the javaparser is more reliable in handling the lambda notation. |
| 210 | }}} |
| 211 | |
| 212 | {{{#!td style="background: #efe" |
| 213 | If the lambda notation gives a UnsupportedOperationException from the javaparser, you can try adding explicit types to the input arguments of the lambda, eg {{{(int x)->f(x)}}} instead of {{{(x)->f(x)}}} |