Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.6, 0.7
-
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.