[jboss-remoting-issues] [JBoss JIRA] Created: (JBREM-1109) Eliminate race in MicroRemoteClientInvoker.getDataType()

Ron Sigal (JIRA) jira-events at lists.jboss.org
Fri Mar 13 22:56:22 EDT 2009


Eliminate race in MicroRemoteClientInvoker.getDataType()
--------------------------------------------------------

                 Key: JBREM-1109
                 URL: https://jira.jboss.org/jira/browse/JBREM-1109
             Project: JBoss Remoting
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 2.5.0.SP2 (Flounder) , 2.2.2.SP11
            Reporter: Ron Sigal
             Fix For: 2.2.2.SP12, 2.5.0.SP3 (Flounder)


In org.jboss.remoting.MicroRemoteClientInvoker.getDataType():

   private String getDataType()
   {
      if (dataType == null)
      {
         dataType = getDataType(getLocator());
         if (dataType == null)
         {
            dataType = getDefaultDataType();
         }
      }
      return dataType;
   }

the line

           dataType = getDataType(getLocator());

would temporarily set dataType to null if, as is usually the case, the InvokerLocator has no datatype parameter.  A second thread might see dataType != null and then return null.

A  solution is to use a local variable while checking InvokerLocator for a datatype value.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-remoting-issues mailing list