[jbossts-issues] [JBoss JIRA] (JBTM-2201) Bug in STM example
Tom Jenkinson (JIRA)
issues at jboss.org
Fri Jun 20 04:54:24 EDT 2014
[ https://issues.jboss.org/browse/JBTM-2201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom Jenkinson updated JBTM-2201:
--------------------------------
Assignee: Jonas Kongslund (was: Mark Little)
> 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
>
> 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