]
Ron Sigal resolved JBREM-1253.
------------------------------
Assignee: Ron Sigal
Resolution: Done
Problems in PrimaryExternalizerFactory$ObjectSourceExternalizer and
PrimaryExternalizerFactory$ObjectSinkExternalizer
---------------------------------------------------------------------------------------------------------------------
Key: JBREM-1253
URL:
https://jira.jboss.org/browse/JBREM-1253
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: stream
Affects Versions: 3.1.0.Beta2
Reporter: Ron Sigal
Assignee: Ron Sigal
Fix For: 3.1.0.Beta3
1. In
org.jboss.remoting3.remote.PrimaryExternalizerFactory$ObjectSourceExternalizer.createExternal(),
the variable ok never gets set to true. createExternal() should be changed to
public ObjectSource createExternal(final Class<?> subjectType, final
ObjectInput input, final Creator defaultCreator) throws IOException,
ClassNotFoundException {
boolean ok = false;
final Unmarshaller unmarshaller =
connectionHandler.getMarshallerFactory().createUnmarshaller(connectionHandler.getMarshallingConfiguration());
try {
unmarshaller.start(readInboundStream(input.readInt()));
ok = true; // <== ADD THIS
return new UnmarshallerObjectSource(unmarshaller);
} finally {
if (! ok) {
IoUtils.safeClose(unmarshaller);
}
}
}
2. In PrimaryExternalizerFactory$ObjectSinkExternalizer.createExternal(), the variable ok
never gets set to true. createExternal() should be changed to
public ObjectSink createExternal(final Class<?> subjectType, final
ObjectInput input, final Creator defaultCreator) throws IOException,
ClassNotFoundException {
boolean ok = false;
final Marshaller marshaller =
connectionHandler.getMarshallerFactory().createMarshaller(connectionHandler.getMarshallingConfiguration());
try {
marshaller.start(readOutboundStream(input.readInt()));
ok = true; // <== ADD THIS
return new MarshallerObjectSink(marshaller);
} finally {
if (! ok) {
IoUtils.safeClose(marshaller);
}
}
}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: