Skip to content

Commit

Permalink
Stop using an instance supplier in EntityScanPackages' bean definition
Browse files Browse the repository at this point in the history
Closes gh-34371
  • Loading branch information
wilkinsona committed Mar 23, 2023
1 parent 5e08ee6 commit fa63f6c
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.function.Supplier;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
Expand Down Expand Up @@ -170,13 +169,9 @@ static class EntityScanPackagesBeanDefinition extends GenericBeanDefinition {
addPackageNames(packageNames);
}

@Override
public Supplier<?> getInstanceSupplier() {
return () -> new EntityScanPackages(StringUtils.toStringArray(this.packageNames));
}

private void addPackageNames(Collection<String> additionalPackageNames) {
this.packageNames.addAll(additionalPackageNames);
getConstructorArgumentValues().addIndexedArgumentValue(0, StringUtils.toStringArray(this.packageNames));
}

}
Expand Down

0 comments on commit fa63f6c

Please sign in to comment.