File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 23
23
import org .apache .pdfbox .cos .COSNumber ;
24
24
import java .io .IOException ;
25
25
import java .util .Objects ;
26
+ import org .apache .pdfbox .cos .COSDictionary ;
26
27
27
28
/**
28
29
* This class represents a Type 2 (exponential interpolation) function in a PDF
@@ -55,13 +56,14 @@ public PDFunctionType2(COSBase function)
55
56
{
56
57
super (function );
57
58
58
- c0 = Objects .requireNonNullElseGet (getCOSObject ().getCOSArray (COSName .C0 ), COSArray ::new );
59
+ COSDictionary cosObject = getCOSObject ();
60
+ c0 = Objects .requireNonNullElseGet (cosObject .getCOSArray (COSName .C0 ), COSArray ::new );
59
61
if (c0 .isEmpty ())
60
62
{
61
63
c0 .add (COSFloat .ZERO );
62
64
}
63
65
64
- c1 = Objects .requireNonNullElseGet (getCOSObject () .getCOSArray (COSName .C1 ), COSArray ::new );
66
+ c1 = Objects .requireNonNullElseGet (cosObject .getCOSArray (COSName .C1 ), COSArray ::new );
65
67
if (c1 .isEmpty ())
66
68
{
67
69
c1 .add (COSFloat .ONE );
You can’t perform that action at this time.
0 commit comments