#vulnerable code 
                                @Override
    protected byte[] doDecompress(byte[] compressed) throws IOException {
        byte[] buffer = new byte[512];

        ByteArrayOutputStream outputStream = null;
        GZIPInputStream gzipInputStream = null;
        ByteArrayInputStream inputStream = null;

        try {
            inputStream = new ByteArrayInputStream(compressed);
            gzipInputStream = new GZIPInputStream(inputStream);
            outputStream = new ByteArrayOutputStream();
            int read = gzipInputStream.read(buffer);
            while (read != -1) {
                outputStream.write(buffer, 0, read);
                read = gzipInputStream.read(buffer);
            }
            return outputStream.toByteArray();
        } finally {
            Objects.nullSafeClose(inputStream, gzipInputStream, outputStream);
        }
    } 
                            #location 20 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Override
    protected byte[] doDecompress(byte[] compressed) throws IOException {
        return readAndClose(new GZIPInputStream(new ByteArrayInputStream(compressed)));
    }