[
https://issues.jboss.org/browse/JBRULES-2976?page=com.atlassian.jira.plug...
]
Laird Nelson commented on JBRULES-2976:
---------------------------------------
I submitted a pull request to fix this bug:
https://github.com/droolsjbpm/drools/pull/7
I am a newbie to git and github, so my apologies if I did not follow the correct
procedure.
DefaultMarshaller does not use supplied ObjectMarshallingStrategies
-------------------------------------------------------------------
Key: JBRULES-2976
URL:
https://issues.jboss.org/browse/JBRULES-2976
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.2.0.M1, 5.2.0.M2, 5.2.0.CR1
Reporter: Laird Nelson
Assignee: Mark Proctor
DefaultMarshaller.java does not use the supplied ObjectMarshallingStrategy as far as I
can tell.
When you create a Marshaller like this:
{code}
final Marshaller marshaller = MarshallerFactory.newMarshaller(knowledgeBase, new
ObjectMarshallingStrategy[] { myStrategy });
assert marshaller != null;
{code}
And then use it like this (or similar):
{code}
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final ObjectOutputStream oos = new ObjectOutputStream(baos);
final DroolsObjectOutputStream doos = new DroolsObjectOutputStream(oos);
marshaller.marshall(doos, this.droolsSession);
{code}
...the supplied strategy's read() and write() methods are never called.
This is because DefaultMarshaller.java line 132 does not use the DefaultMarshaller's
strategy, but the strategy of the incoming StatefulKnowledgeSession instead.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira