Changes between Version 173 and Version 174 of j2p


Ignore:
Timestamp:
11/25/24 15:23:45 (4 hours ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v173 v174  
    207207
    208208{{{#!td style="background: #fee"
    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.
     209Note 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"
     213If 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)}}}
    210214}}}
    211215