Skip to content

Commit 4168145

Browse files
committed
Fix slow bean logs
1 parent 9851d78 commit 4168145

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/coditory/quark/context/ResolutionPath.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ private ResolutionPath(@NotNull List<BeanDescriptor<?>> path) {
4646
int index = 0;
4747
for (BeanDescriptor<?> descriptor : path) {
4848
indexes.put(descriptor, index);
49+
index++;
4950
}
5051
}
5152

@@ -91,7 +92,7 @@ public BeanDescriptor<?> get(int index) {
9192
public BeanDescriptor<?> getParent(@NotNull BeanDescriptor<?> descriptor) {
9293
expectNonNull(descriptor, "descriptor");
9394
Integer index = indexes.get(descriptor);
94-
return index == null ? null : path.get(index);
95+
return index == null || index == 0 ? null : path.get(index - 1);
9596
}
9697

9798
@NotNull

0 commit comments

Comments
 (0)