File tree Expand file tree Collapse file tree
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323import org .apache .pdfbox .cos .COSNumber ;
2424import java .io .IOException ;
2525import java .util .Objects ;
26+ import org .apache .pdfbox .cos .COSDictionary ;
2627
2728/**
2829 * This class represents a Type 2 (exponential interpolation) function in a PDF
@@ -55,13 +56,14 @@ public PDFunctionType2(COSBase function)
5556 {
5657 super (function );
5758
58- c0 = Objects .requireNonNullElseGet (getCOSObject ().getCOSArray (COSName .C0 ), COSArray ::new );
59+ COSDictionary cosObject = getCOSObject ();
60+ c0 = Objects .requireNonNullElseGet (cosObject .getCOSArray (COSName .C0 ), COSArray ::new );
5961 if (c0 .isEmpty ())
6062 {
6163 c0 .add (COSFloat .ZERO );
6264 }
6365
64- c1 = Objects .requireNonNullElseGet (getCOSObject () .getCOSArray (COSName .C1 ), COSArray ::new );
66+ c1 = Objects .requireNonNullElseGet (cosObject .getCOSArray (COSName .C1 ), COSArray ::new );
6567 if (c1 .isEmpty ())
6668 {
6769 c1 .add (COSFloat .ONE );
You can’t perform that action at this time.
0 commit comments