Log4j 2
  1. Log4j 2
  2. LOG4J2-221

Log4j 2 has several hundred compiler warnings

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta5
    • Fix Version/s: 2.0-beta6
    • Component/s: None
    • Labels:
      None

      Description

      The entire Log4j 2 project has several hundred compiler warnings. Took me a total of about a day to clean up. Patch soon to follow.

      1. fix-warnings.diff
        219 kB
        Nick Williams

        Activity

        Hide
        Nick Williams added a comment -

        This patch addresses the following:

        • Several hundred compiler warnings
        • Even though the Maven POM files and some documentation said the required Java version was Java 6, bug analysis was being performed for Java 5, several other pieces of documentation said Java 5, and the Ant build script was set to Java 5. All of these have been updated to Java 6 (1.6).
        • In files that I otherwise touched to fix compiler warnings, I also cleaned up any other problems that my IDE pointed out (like possible NPEs, unnecessary casts, unused local variables, etc.

        Project compiles and all unit tests still pass.

        Show
        Nick Williams added a comment - This patch addresses the following: Several hundred compiler warnings Even though the Maven POM files and some documentation said the required Java version was Java 6, bug analysis was being performed for Java 5, several other pieces of documentation said Java 5, and the Ant build script was set to Java 5. All of these have been updated to Java 6 (1.6). In files that I otherwise touched to fix compiler warnings, I also cleaned up any other problems that my IDE pointed out (like possible NPEs, unnecessary casts, unused local variables, etc. Project compiles and all unit tests still pass.
        Hide
        Scott Deboy added a comment -

        Thanks for taking the time to do this!

        Show
        Scott Deboy added a comment - Thanks for taking the time to do this!
        Hide
        Ralph Goers added a comment -

        Patch applied - please verify and close.

        Show
        Ralph Goers added a comment - Patch applied - please verify and close.
        Hide
        Nick Williams added a comment -

        Verified. This is a huge improvement. Now, people need to be careful and stop creating compiler warnings!

        By the way, if we added <Werror /> to the compiler arguments for the maven-compiler-plugin in the parent POM, it would cause the build to fail whenever someone introduced a new compiler warning. Just something to think about.

        Show
        Nick Williams added a comment - Verified. This is a huge improvement. Now, people need to be careful and stop creating compiler warnings! By the way, if we added <Werror /> to the compiler arguments for the maven-compiler-plugin in the parent POM, it would cause the build to fail whenever someone introduced a new compiler warning. Just something to think about.

          People

          • Assignee:
            Ralph Goers
            Reporter:
            Nick Williams
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 24h
              24h
              Remaining:
              Remaining Estimate - 24h
              24h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development