Skip to content

Commit

Permalink
Rewrite jakarta singleton -> c.g.i Singleton for the SPI too.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 528546653
  • Loading branch information
sameb authored and Guice Team committed May 1, 2023
1 parent 99d0e11 commit 36ff122
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/com/google/inject/internal/Scoping.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ public void applyTo(ScopedBindingBuilder scopedBindingBuilder) {
};

public static Scoping forAnnotation(final Class<? extends Annotation> scopingAnnotation) {
if (scopingAnnotation == Singleton.class || scopingAnnotation == javax.inject.Singleton.class) {
if (scopingAnnotation == Singleton.class
|| scopingAnnotation == javax.inject.Singleton.class
|| scopingAnnotation == jakarta.inject.Singleton.class) {
return SINGLETON_ANNOTATION;
}

Expand Down

0 comments on commit 36ff122

Please sign in to comment.