Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Rank() not honored on Factory<Contract> #532

Open
cpotter1 opened this issue Dec 9, 2020 · 1 comment
Open

@Rank() not honored on Factory<Contract> #532

cpotter1 opened this issue Dec 9, 2020 · 1 comment

Comments

@cpotter1
Copy link

cpotter1 commented Dec 9, 2020

@service
@rank(123) // note: bug in Hk2 where rank defaults to 0 on factory types
public class PersistenceStoreFactory implements Factory {
@OverRide
public PersistenceStore provide() {
return null;
}

@OverRide
public void dispose(PersistenceStore instance) {

}

@buko
Copy link

buko commented Dec 11, 2020

You probably need to put the @rank annotation on the provide() method. Ranking factory services rarely makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants