File tree Expand file tree Collapse file tree
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131import org .apache .pdfbox .cos .COSName ;
3232import org .apache .pdfbox .cos .COSNumber ;
3333import org .apache .pdfbox .cos .COSStream ;
34- import org .apache .pdfbox .io .IOUtils ;
3534import org .apache .pdfbox .pdmodel .common .COSObjectable ;
3635import org .apache .pdfbox .util .Vector ;
3736
@@ -425,9 +424,11 @@ final int[] readCIDToGIDMap() throws IOException
425424 COSStream stream = dict .getCOSStream (COSName .CID_TO_GID_MAP );
426425 if (stream != null )
427426 {
428- InputStream is = stream .createInputStream ();
429- byte [] mapAsBytes = is .readAllBytes ();
430- IOUtils .closeQuietly (is );
427+ byte [] mapAsBytes ;
428+ try (InputStream is = stream .createInputStream ())
429+ {
430+ mapAsBytes = is .readAllBytes ();
431+ }
431432 int numberOfInts = mapAsBytes .length / 2 ;
432433 cid2gid = new int [numberOfInts ];
433434 int offset = 0 ;
You can’t perform that action at this time.
0 commit comments