#444 Header should ignore package-info.java [patch attached]

Check (274)
Sebastian Davids


  • fix

  • Logged In: YES
    Originator: YES

    File Added: patch1628143.txt

  • Lars Kühne
    Lars Kühne

    Logged In: YES
    Originator: NO

    First of all, thanks for sending a patch along with the RFE, this is very much appreciated.

    However, I'm not sure that this is really something you really want: Most users use the header checks to verify that all files include some legal blurb, like copyright notices and stuff. The package-info.java is not a regular java source file, but it would typically contain non-trivial information that is copyrighted: The package documentation.

    // Copyright 2007 lkuehne

    * This is a really complicated package doc.
    * Pages and pages.
    * Someone spent many hours writing it.
    package example;

    Hence I think most users would want to check the package-info.java file for a header as well.

    Maybe I missed something, can you explain why you need this functionality?

  • Logged In: YES
    Originator: YES

    Hmm, appearently I found a bug in the old version of javadoc I was using ... the new one doesn't have it anymore.

    It choked on:

    * Header

    * Package comment.
    package example;


    The new version doesn't choke on it anymore.

    So I do not need to exclude package-info.java anymore.

  • Toby Byron
    Toby Byron

    lkuehne: I think that you are missing something: the problem with non-java files is that the format for comments usually differs from java source files.

    So, even if the legal boilerplate content is the same, you may use / ... / to demark the comment in java source files but in html files (e.g. package.html).

    Thus, you DO sometimes need to suppress the check in certain files.

    This is just one use case, and I bet there are others.