Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bnd-maven-plugin: (Optionally) Fail for invalid DS field injections (missing volatile, invalid final or invalid type for multiple cardinality) #2860

Closed
kwin opened this issue Jan 14, 2019 · 1 comment
Assignees
Milestone

Comments

@kwin
Copy link
Contributor

@kwin kwin commented Jan 14, 2019

According to OSGi R7 Compendium 112.3.9.1

If the field is declared with the final modifier, SCR must log an error message with the Log Service, if
present, and the field must not be modified.{quote}

and

For a dynamic reference, the field must be declared with the volatile modifier so that field value
changes made by SCR are visible to other threads. If the field is not declared with the volatile modifier,
SCR must log an error message with the Log Service, if present, and the field must not be modified.

and

For a reference with multiple cardinality, the type of the field must be Collection or List. If the field
has a different type, SCR must log an error message with the Log Service, if present, and the field
must not be modified.

All issues lead to issues at run time and should therefore already lead to an exception at build time.

@kwin kwin changed the title bnd-maven-plugin: (Optionally) Fail for invalid DS field injections (missing volatile or invalid final) bnd-maven-plugin: (Optionally) Fail for invalid DS field injections (missing volatile, invalid final or invalid type for multiple cardinality) Jan 14, 2019
@kwin
Copy link
Contributor Author

@kwin kwin commented Jan 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants