[java] Fix Std.instance - because of constraints, the type was being cast to the expected type in the argument call