Ignore redundant null check error from Spotbugs

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 4.0.0
    • Affects Version/s: 4.0.0, 4.1.0
    • Component/s: Build
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      See https://github.com/spotbugs/spotbugs/issues/756 for details.

      Essentially, Java 11 has changed the bytecode generation for try-with-resources, and it triggers this Spotbugs error wherever it's used:

      Bug type RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE
      

      Since this is a relatively harmless mistake in handwritten code, and try-with-resources is quite nice syntactically, let's disable the check.

              Assignee:
              Jeffrey Yemin
              Reporter:
              Jeffrey Yemin
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: