Adapt to new Java rules.