Hello,

I was looking over the filters while trying to hack in some feature that I
need, and I came across something that to me seems like a bug.
Looking at JBIG2Filter, in lines 73-74 you have:

        DecodeResult result = new DecodeResult(new COSDictionary());
        result.getParameters().addAll(parameters);

The only other reference to `result` is towards the end of the `decode`
method (lines 136-139):

        if (!parameters.containsKey(COSName.COLORSPACE))
        {
            result.getParameters().setName(COSName.COLORSPACE,
COSName.DEVICEGRAY.getName());
        }

However, the actual return statement is (line 141):

    return new DecodeResult(parameters);

So it seems that `result` isn't actually used or needed.
Is this a bug, and the return statement should return `result`? or is there
some way in which `result` does influence `parameters`, and thus is not
unnecessary?

Thanks,
Itai.

Reply via email to