Paul Austin created PDFBOX-4543:
-----------------------------------

             Summary: PDLineDashPattern fails as float[] is converted to 
List<float[]> instead of List<Float>
                 Key: PDFBOX-4543
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4543
             Project: PDFBox
          Issue Type: Bug
          Components: PDModel
    Affects Versions: 2.0.15
            Reporter: Paul Austin


 The following code fails in PDLineDashPattern as Arrays.asList doesn't work as 
expected with primitive arrays.
{code:java}
public COSBase getCOSObject()
{
  COSArray cos = new COSArray();
  cos.add(COSArrayList.converterToCOSArray(Arrays.asList(array)));
  cos.add(COSInteger.get(phase));
  return cos;
}{code}
The array should be converted using:
{code:java}
COSArray patternArray = new COSArray();
patternArray.setFloatArray(array);
cos.add(patternArray);{code}
 

 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to