Skip to content

Commit

Permalink
fix requires retention (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
SentryMan authored Jan 26, 2025
1 parent 72bcb2e commit 69a9295
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions inject/src/main/java/io/avaje/inject/RequiresBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.CLASS;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.lang.annotation.RetentionPolicy.SOURCE;

import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
Expand All @@ -30,7 +30,7 @@
* <p>In the sample above the MyService bean will get wired only if a bean of type {@code
* OtherService} is already registered in the {@link BeanScope}.
*/
@Retention(SOURCE)
@Retention(CLASS)
@Repeatable(RequiresBean.Container.class)
@Target({TYPE, METHOD, ANNOTATION_TYPE})
public @interface RequiresBean {
Expand Down
4 changes: 2 additions & 2 deletions inject/src/main/java/io/avaje/inject/RequiresProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.CLASS;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.lang.annotation.RetentionPolicy.SOURCE;

import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
Expand Down Expand Up @@ -40,7 +40,7 @@
* If no ConfigPropertyPlugin is found then the default implementation is used which uses
* {@link System#getProperty(String)} and {@link System#getenv(String)}.
*/
@Retention(SOURCE)
@Retention(CLASS)
@Repeatable(RequiresProperty.Container.class)
@Target({TYPE, METHOD, ANNOTATION_TYPE})
public @interface RequiresProperty {
Expand Down

0 comments on commit 69a9295

Please sign in to comment.