QPathTest might fail to catch errors due to GC bug in test

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 10
    • Affects Version/s: 9, 10
    • Component/s: javafx

      QPathTest checks whether any exceptions are logged from the Marlin rasterizer as a result of running the test program. However, since it does not hold a strong reference to the logger, the logger is subject to garbage collection, which means that if an exception were to be logged by Marlin, the test would likely not catch it (depending on whether GC runs or not).

      I discovered this error while debugging the test programs for JDK-8177566, since I used the same approach for some of the unit tests for that bug.

      The fix is to declare the "log" variable, which is currently a local variable in the static block, as a private static class variable.

            Assignee:
            Laurent Bourgès
            Reporter:
            Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: