[ 
https://issues.apache.org/jira/browse/PDFBOX-4543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837482#comment-16837482
 ] 

ASF subversion and git services commented on PDFBOX-4543:
---------------------------------------------------------

Commit 1859097 from Tilman Hausherr in branch 'pdfbox/branches/issue45'
[ https://svn.apache.org/r1859097 ]

PDFBOX-4543: correctly convert array to COSArray (Arrays.asList(array) doesn't 
convert that array to a collection), as suggested by Paul Austin; add 
toString(); add "previously failing" test

> 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
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 2.0.16, 3.0.0 PDFBox
>
>
>  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