SI-7364 Allow raw types in parent position in Java parser

As we already do for in other places types are allowed.