add missing javadoc and fix checkstyle errors.