Disposer.pollRemove may fail to dispose

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: client-libs
    • None
    • 2d
    • b76

        In ./jdk/src/java.desktop/share/classes/sun/java2d/Disposer.java, in the function pollRemove, there is a loop with the following test:

                   while ((obj = queue.poll()) != null
                          && freed < 10000 && deferred < 100) {

        If obj != null but freed or deferred exceed the indicated bounds, obj just gets dropped, without having its dispose function called.

        The bound checks for freed and deferred should be performed *before* polling the queue.

              Assignee:
              Prasanta Sadhukhan
              Reporter:
              Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: