You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Paul Austin (JIRA)" <ji...@apache.org> on 2019/05/10 16:09:00 UTC

[jira] [Created] (PDFBOX-4543) PDLineDashPattern fails as float[] is converted to List instead of List

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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org