[backport] SI-6478 Fixing JavaTokenParser ident

Backport of 256934160007079f473131469af2df4d023c2cfc from PR
https://github.com/scala/scala/pull/1466