mirror of
https://github.com/zaaarf/lillero-processor.git
synced 2024-12-22 20:54:54 +01:00
fix: logical flaw in error handling
This commit is contained in:
parent
d2fe55db7a
commit
3cea0d3e66
1 changed files with 4 additions and 5 deletions
|
@ -248,18 +248,17 @@ public class LilleroProcessor extends AbstractProcessor {
|
|||
.stream()
|
||||
.filter(i -> i.getSimpleName().contentEquals(targetAnn.of()))
|
||||
.collect(Collectors.toList());
|
||||
} else if(injectors.size() == 1) {
|
||||
//case 2: there is only one injector
|
||||
} else if(injectors.size() == 1 && targets.size() == 1) {
|
||||
//case 2: there is only one target, must use it for that injector
|
||||
finderCandidates = new ArrayList<>(); //no candidates
|
||||
injectorCandidates = new ArrayList<>();
|
||||
injectorCandidates.add(injectors.get(0));
|
||||
} else {
|
||||
//case 3: try to match by injectTargetName or same name for finers
|
||||
String inferredName = "inject" + tg.getSimpleName();
|
||||
//case 3: try to match by injectTargetName or same name for finders
|
||||
injectorCandidates =
|
||||
injectorCandidates
|
||||
.stream()
|
||||
.filter(t -> t.getSimpleName().toString().equalsIgnoreCase(inferredName))
|
||||
.filter(t -> t.getSimpleName().toString().equalsIgnoreCase("inject" + tg.getSimpleName()))
|
||||
.collect(Collectors.toList());
|
||||
finderCandidates =
|
||||
finderCandidates
|
||||
|
|
Loading…
Reference in a new issue