Why Eclipse generates two comment blocks in package-info.java

When I right-click in the package -> new -> package, check "create package-info.java", Eclipse 4.4.2 places the template for package-info.java in this directory. It's good. It looks like this:

/**
 * 
 */
/**
 * @author John Doe
 *
 */
package name.of.pkg;

As you can see, there are two comment blocks. My question is: what is the purpose of the top block?

I do not see this being displayed anywhere in the generated JavaDoc HTML. The output displays only the content in the lower comment block and above the author. Two lines that have only a star in their line are inviting, but will not be visible on the output. I have never seen two comment blocks on any blog or documentation on package-info.java.

+4
1

- . , , , , .

:

/**
 * LICENSE
 */

import java.util.*;

/**
 * JavaDoc about the class
 *
 * @author Your Name <yourname@yourdomain.com>
 */
public class ClassName {}
+4

Source: https://habr.com/ru/post/1613799/


All Articles