[jbossts-issues] [JBoss JIRA] (JBTM-2201) Bug in STM example

Tom Jenkinson (JIRA) issues at jboss.org
Fri Jul 4 10:05:24 EDT 2014


     [ https://issues.jboss.org/browse/JBTM-2201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Jenkinson resolved JBTM-2201.
---------------------------------

    Fix Version/s: 5.0.3
       Resolution: Done


Thanks for the report and contribution!

> Bug in STM example
> ------------------
>
>                 Key: JBTM-2201
>                 URL: https://issues.jboss.org/browse/JBTM-2201
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Documentation, STM
>    Affects Versions: 5.0.2
>            Reporter: Jonas Kongslund
>            Assignee: Jonas Kongslund
>             Fix For: 5.0.3
>
>
> The following code snippet is from the [5.0.2 STM Guide|http://docs.jboss.org/jbosstm/5.0.2.Final/guides/stm_guide/index.html].
> {code:java}
> public class ExampleInteger implements Atomic
> {   
>    @WriteLock
>    public int get () throws Exception
>    {
>        return state;
>    }
>    ...
>    @ReadLock
>    public void incr (int value) throws Exception
>    {
>        state += value;
>    }
>    private int state;
> }
> {code}
> The lock annotations on {{incr}} and {{get}} need to be swapped in order for the example to be correct.
> A pull request is available.



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jbossts-issues mailing list