Uploaded image for project: 'Apache Rat'
  1. Apache Rat
  2. RAT-34

No license header added for java files that do not contain project line

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.6, 0.7
    • 0.8
    • None
    • None

    Description

      When using the a cmd line switch to automatically add license headers to java files, no license headers will be added unless the java file contains the 'package' line. This is currently by design. Ideas for change include :

      1. Do nothing (almost) - Document that a package line must exist and that the license will be appended after that line. Therefore you are actively forcing this limitation as an intentional design feature.

      If this route is chosen then you should bail out without writing a .new file if there is no package line, perhaps with a WARNING message appended to the output. A .new file is currently written anyway because the file has already been opened and written ("\n") to before that 'package' check above.

      2. If no package line exists then put the license in anyway at the very top.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gmcdonald Gavin McDonald
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: