add AutoCloseable interface to Graphics class

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P3
    • tbd
    • Affects Version/s: 7u45
    • Component/s: client-libs
    • 2d
    • linux_ubuntu

      A DESCRIPTION OF THE REQUEST :
      would be nice if Graphics.dispose() would be called from try-with-resources

      JUSTIFICATION :
      simplify coding

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      try (Graphics g2 = g.create()) {
           g.paintOval(r0;
      }

      would call g2.dispose() automagically
      ACTUAL -
      you need to manually add a finally block to dispose()

            Assignee:
            Philip Race
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: