Carsten Ziegeler created FELIX-4586:
---------------------------------------
Summary: A field must be volatile if methods are generated for a
dynamic reference
Key: FELIX-4586
URL: https://issues.apache.org/jira/browse/FELIX-4586
Project: Felix
Issue Type: Bug
Components: SCR Tooling
Affects Versions: scr generator 1.10.0, scr ant task 1.11.0,
maven-scr-plugin 1.17.0
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
Fix For: maven-scr-plugin 1.17.2, scr ant task 1.11.2, scr
generator 1.10.2
If a field is used for a reference, like
@Reference(policy=DYNAMIC)
private Field myService
and methods are generated for this dynamic reference, the field must be
declared volatile. Otherwise updates to the field are not visible to the
threads calling this component.
If no methods are generated and the reference is dynamic, a warning should be
generated if it is not volatile.
--
This message was sent by Atlassian JIRA
(v6.2#6252)