[jboss-remoting-issues] [JBoss JIRA] Created: (JBREM-1253) Problems in PrimaryExternalizerFactory$ObjectSourceExternalizer and PrimaryExternalizerFactory$ObjectSinkExternalizer

Ron Sigal (JIRA) jira-events at lists.jboss.org
Wed Oct 20 17:10:54 EDT 2010


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
             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.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-remoting-issues mailing list