forked from osgi/osgi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bundle annotations: Replace use of enum types
Using enum types in the CLASS retention bundle annotations is causing issues for those using the annotations. Various tools, such as javadoc, attempt to reify the elements in the annotations and since the osgi.annotation jar is generally a scope=provided dependency, the enum types are not available to downstream users of the jars using the OSGi annotations and so tools generates an annoying warning. See quarkusio/quarkus#19970 and microprofile/microprofile-config#716. To address this, we replace the enum classes with simple classes holding string constants and change the annotation elements returning the enum values to return string values. This is generally source compatible with usage of the OSGi annotations. Since these are CLASS retention annotations, they are not visible at runtime and so only tools, like Bnd, which process the annotations at tool time are affected. Bnd will seamlessly handle old and new annotations using the old enum values or the new string values. So moving to using the updated OSGi annotations will not require updating to use a newer version of Bnd. Bnd 6.2 is being updated to better handle these changes including validation of the string values since a string return type is open ended while an enum return type is not. Signed-off-by: BJ Hargrave <[email protected]>
- Loading branch information
1 parent
8c50178
commit 559a208
Showing
3 changed files
with
22 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters