Fixed the javadoc of publish().