#vulnerable code 
                                public PdfObjectStream getObjectStream() throws IOException, PdfException {
        if (!fullCompression)
            return null;
        if (objectStream == null) {
            objectStream = new PdfObjectStream(pdfDocument);
        }
        if (objectStream.getSize() == PdfObjectStream.maxObjStreamSize) {
            PdfObjectStream oldObjStream = objectStream;
            objectStream.flush();
            objectStream = new PdfObjectStream(pdfDocument);
            objectStream.put(PdfName.Extends, oldObjStream);
        }
        return objectStream;
    } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public PdfObjectStream getObjectStream() throws IOException, PdfException {
        if (!fullCompression)
            return null;
        if (objectStream == null) {
            objectStream = new PdfObjectStream(pdfDocument);
        }
        if (objectStream.getSize() == PdfObjectStream.maxObjStreamSize) {
            objectStream.flush();
            objectStream = new PdfObjectStream(pdfDocument);
        }
        return objectStream;
    }