Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-959

Tighten javac compilerArgs, turn more warnings into errors (and fix related problems)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0
    • None

    Description

      In the context of FINERACT-828, I just noticed that org.apache.fineract.notification.domain.Notification.setActor(Long) has an obvious bug (which I'm fixing in a PR related to FINERACT-828).

      Eclipse pointed out that particular problem - as 1 out of 888 Warnings!

      One thing that IMHO would be interesting and valuable in overall context of our ongoing code quality efforts under the umbrella of FINERACT-712 would be to not only (also!) increasingly engage 3rd-party Java code quality tools (as we already are, very much ongoing... Manthan GSOC), but also leverage what javac can do for us!

      Something neat ptuomola did in FINERACT-846 as part of our switch to Java 11 was to enable '-Xlint:unchecked' and deprecation warnings (search for this in our build.gradle). Can we turn more javac warnings into errors - and fix respective problems?

      natashan (Outreachy, like GSOC) perhaps this is something you'd like to dig into?

      PS: There is also the theoretical possibility to run Eclipse's Java Compiler (JDT) headlessly on the build - JUST because it sometimes has more feedback about code than javac. http://www.lastnpe.org does this for null analysis. (This is much more involved than just standard javac, so we should start there.)

      Attachments

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              natashan Natasha Natarajan
              vorburger Michael Vorburger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: