Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7012

Change Lucene/Solr IDE configs to place new Java files' license header before the package declaration

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.5, 6.0
    • None
    • None
    • New, Patch Available

    Description

      Today the license header is placed after the package declaration. This results in inconsistency in our files. In some the license is put after the package and before the imports, in others it appears after the imports but before class declaration and in others it appears in the middle of the imports.

      Also, when you e.g. "Organize Imports" in eclipse, if the header is located in the middle of imports, it's sometimes completely removed from the file.

      This issue is about changing the "New Java Files" template in eclipse so that the license header is placed before the package declaration. This ensures that "Organize Imports" doesn't mess with it, as well for new files (created in eclipse), we will start getting some consistency.

      If we also want to handle all current files by moving the license header before the package, we can do so (I volunteer), but since it's a big change, will likely do it over multiple commits and no need for an issue. BTW, if anyone knows of a tool that can automate that, great. I found that Apache has a perl script but it seems to only fix the header to the new format, yet not moving it in the file.

      Attachments

        1. LUCENE-7012-intellij.patch
          0.6 kB
          Steven Rowe
        2. LUCENE-7012.patch
          12 kB
          Shai Erera

        Activity

          People

            shaie Shai Erera
            shaie Shai Erera
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: