Skip to content

Commit

Permalink
Use RetentionPolicy CLASS in new 'ServiceContextKey' OSGi property type
Browse files Browse the repository at this point in the history
And permit only types as target.
  • Loading branch information
HannesWell committed Oct 14, 2024
1 parent e14565e commit f246856
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@

package org.eclipse.e4.core.contexts;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.osgi.framework.BundleContext;
import org.osgi.service.component.annotations.ComponentPropertyType;

Expand Down Expand Up @@ -74,7 +76,8 @@ public interface IContextFunction {
* @see #SERVICE_CONTEXT_KEY
*/
@ComponentPropertyType
@Retention(RetentionPolicy.SOURCE)
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.TYPE)
public @interface ServiceContextKey {
Class<?> value();
}
Expand Down

0 comments on commit f246856

Please sign in to comment.