Skip to content

Add @Priority and make it the default #73

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

Merged
merged 1 commit into from
Nov 2, 2020
Merged

Conversation

rbygrave
Copy link
Contributor

@rbygrave rbygrave commented Nov 2, 2020

No description provided.

@rbygrave rbygrave self-assigned this Nov 2, 2020
@norrisjeremy
Copy link
Contributor

I like this, as it allows using Priority based injection without having to pull in potentially problematic javax.annotation-api dependency.

@@ -16,28 +17,30 @@
@Test
public void getBeansByPriority() {

final List<Somei> beans = SystemContext.getBeansByPriority(Somei.class);
assertThat(beans).hasSize(2);
final List<Somei> beans = SystemContext.context().getBeansByPriority(Somei.class, Priority.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test looks identical to getBeansByPriority_withAnnotation: should one of them be removed or tweaked?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll merge and sort that out - thanks.


@Override
public String other() {
return "a";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, but should this be return "c";?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it should, it will be nice to fix it - thanks

@rbygrave rbygrave merged commit 3b95132 into master Nov 2, 2020
@rbygrave rbygrave added this to the 2.1 milestone Nov 2, 2020
@rbygrave rbygrave deleted the feature/Priorty branch November 16, 2020 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants