Were you able to resolve this issue?
Are you working in eclipse / IntelliJ (not PDE) and importing processing as a library to a Java sketch? I ask because ->
is not supported by Processing 3 syntax, as used in PDE.
If Java, what version of Java are you using?