Skip to content

Commit e84143a

Browse files
committed
Use RetentionPolicy CLASS in new 'ServiceContextKey' OSGi property type
And permit only types as target.
1 parent e14565e commit e84143a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

runtime/bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/contexts/IContextFunction.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515

1616
package org.eclipse.e4.core.contexts;
1717

18+
import java.lang.annotation.ElementType;
1819
import java.lang.annotation.Retention;
1920
import java.lang.annotation.RetentionPolicy;
21+
import java.lang.annotation.Target;
2022
import org.osgi.framework.BundleContext;
2123
import org.osgi.service.component.annotations.ComponentPropertyType;
2224

@@ -74,7 +76,8 @@ public interface IContextFunction {
7476
* @see #SERVICE_CONTEXT_KEY
7577
*/
7678
@ComponentPropertyType
77-
@Retention(RetentionPolicy.SOURCE)
79+
@Retention(RetentionPolicy.CLASS)
80+
@Target(ElementType.TYPE)
7881
public @interface ServiceContextKey {
7982
Class<?> value();
8083
}

0 commit comments

Comments
 (0)