You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2021/05/13 14:10:44 UTC

svn commit: r1889846 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/GroupGraphics.java

Author: tilman
Date: Thu May 13 14:10:44 2021
New Revision: 1889846

URL: http://svn.apache.org/viewvc?rev=1889846&view=rev
Log:
PDFBOX-4892: dispose unused, as suggested by valerybokov; add exception text

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/GroupGraphics.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/GroupGraphics.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/GroupGraphics.java?rev=1889846&r1=1889845&r2=1889846&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/GroupGraphics.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/GroupGraphics.java Thu May 13 14:10:44 2021
@@ -117,7 +117,9 @@ class GroupGraphics extends Graphics2D
         {
             return new GroupGraphics(groupImage, (Graphics2D)g, groupAlphaImage, (Graphics2D)a);
         }
-        throw new UnsupportedOperationException();
+        g.dispose();
+        a.dispose();
+        throw new UnsupportedOperationException("Only Graphics2D supported by this method");
     }
 
     @Override