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

Ron Sigal (JIRA) jira-events at lists.jboss.org
Wed Apr 8 03:40:46 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBREM-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12461169#action_12461169 ] 

Ron Sigal commented on JBREM-1109:
----------------------------------

Fix applied to 2.2 and 2.x branches.

Unit test: org.jboss.test.remoting.datatype.DataTypeRaceTestCase.

Waiting for results in hudson.

> 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
>            Assignee: Ron Sigal
>             Fix For: 2.5.0.SP3 (Flounder), 2.2.2.SP12
>
>         Attachments: jboss-remoting.jar
>
>
> 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