Spotless can help here. Javadoc formatting also includes ensuring that it is A) valid javadoc (html) and B) references are valid.