[jira] [Comment Edited] (OFBIZ-6944) streamDataResource do not manage OTHER_OBJECT dataResourceTypeId

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Comment Edited] (OFBIZ-6944) streamDataResource do not manage OTHER_OBJECT dataResourceTypeId

Nicolas Malin (Jira)

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

Gil Portenseigne edited comment on OFBIZ-6944 at 4/11/16 6:52 PM:
------------------------------------------------------------------

Actually, like TODO says, i replace a method updating an outpuStream, with another one returning ByteArrayInputStream, and used

{code} os.write(IOUtils.toByteArray((ByteArrayInputStream) resourceData.get("stream")));{code}

That make it works, but i find it a bit awkward. I guess commiting it won't harm...


was (Author: gil portenseigne):
Actually, like TODO says, i replace a method updating an outpuStream, with another one returning ByteArrayInputStream, and used

<code> os.write(IOUtils.toByteArray((ByteArrayInputStream) resourceData.get("stream")));<code>

That make it works, but i find it a bit awkward. I guess commiting it won't harm...

> streamDataResource do not manage OTHER_OBJECT dataResourceTypeId
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-6944
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6944
>             Project: OFBiz
>          Issue Type: Bug
>          Components: content
>    Affects Versions: Trunk
>            Reporter: Gil Portenseigne
>            Assignee: Gil Portenseigne
>         Attachments: OFBIZ-6944.patch
>
>
> When using request ViewBinaryDataResource?dataResourceId=10015 with a OTHER_OBJECT dataResourceTypeId, we meet the error :
> {quote}org.ofbiz.webapp.view.ViewHandlerException: The dataResourceTypeId [OTHER_OBJECT] is not supported in streamDataResource{quote}
> This is relative to an existing TODO in DataResourceWorker.java :
> {code}// TODO: remove this method in favor of getDataResourceStream {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)