[ 
https://issues.apache.org/jira/browse/OAK-6758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17205426#comment-17205426
 ] 

Robert Munteanu commented on OAK-6758:
--------------------------------------

[~angela] - I think the PR overall looks good. There are unfortunately no great 
ways of checking automatically. What I can think of is comparing the bundle 
before and after the change, and making sure:

- the MANIFEST.MF files are equivalent
- the files under OSGI-INF/ are equivalent

Note that using `diff` will be useless, since the ordering of the tags and 
attributes in XML will be the different.

In addition to that, you can take advantage of the following:
- the {{@Reference}} annotation has a default cardinality of {{MANDATORY}}, so 
you don't need to specify it
- the property names are generated from the method names, so {{@Reference 
public void bindExclude}} would generate a name of _Exclude_ (note the 
uppercase). Not sure if it helps
- You can now pass typed objects to {{activated}} and {{modified}} methods, so 
for {{CugConfiguration}} you could write

{code:java}
protected void activate(Configuration cfg) {
  if ( cfg.cugEnabled() ) {...}
}
{code}

But I'm not sure that helps you further.

Hope this has been useful.

> Convert oak-authorization-cug to OSGi R6 annotations
> ----------------------------------------------------
>
>                 Key: OAK-6758
>                 URL: https://issues.apache.org/jira/browse/OAK-6758
>             Project: Jackrabbit Oak
>          Issue Type: Technical task
>          Components: authorization-cug
>            Reporter: Robert Munteanu
>            Assignee: Angela Schreiber
>            Priority: Major
>             Fix For: 1.36.0
>
>         Attachments: OAK-6758.patch
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to