Skip to content

Commit

Permalink
Remove System.out use in ExternalProvider and minor tidy (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbygrave authored May 26, 2024
1 parent c2ddfe4 commit f50a7e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static void registerModuleProvidedTypes(Set<String> providedTypes) {
final var name = module.getClass().getTypeName();

final var provides = new ArrayList<String>();
System.out.println("Detected Module: " + name);
APContext.logNote("Detected Module: " + name);
for (final var provide : module.provides()) {
providedTypes.add(provide.getTypeName());
provides.add(provide.getTypeName());
Expand Down
8 changes: 4 additions & 4 deletions inject/src/main/java/io/avaje/inject/DBeanScopeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public BeanScope build() {
initProfiles();
log.log(level, "building with avaje modules {0} profiles {1}", moduleNames, profiles);

final Builder builder = Builder.newBuilder(profiles, propertyRequiresPlugin, suppliedBeans, enrichBeans, parent, parentOverride);
final var builder = Builder.newBuilder(profiles, propertyRequiresPlugin, suppliedBeans, enrichBeans, parent, parentOverride);
for (final var factory : factoryOrder.factories()) {
builder.currentModule(factory.getClass());
factory.build(builder);
Expand Down Expand Up @@ -332,7 +332,7 @@ static class FactoryOrder implements ModuleOrdering {

@Override
public void add(AvajeModule module) {
final FactoryState factoryState = new FactoryState(module);
final var factoryState = new FactoryState(module);
providesMap
.computeIfAbsent(module.getClass().getTypeName(), s -> new FactoryList())
.add(factoryState);
Expand Down Expand Up @@ -398,7 +398,7 @@ private void processQueue() {
push(factoryState);
}
} else if (!queue.isEmpty()) {
final StringBuilder sb = new StringBuilder();
final var sb = new StringBuilder();
for (final FactoryState factory : queue) {
sb.append("Module [").append(factory).append("] has unsatisfied");
unsatisfiedRequires(sb, factory.requires(), "requires");
Expand Down Expand Up @@ -426,7 +426,7 @@ private boolean notProvided(String dependency) {
if (parent != null && parent.contains(dependency)) {
return false;
}
final FactoryList factoryList = providesMap.get(dependency);
final var factoryList = providesMap.get(dependency);
return (factoryList == null || !factoryList.allPushed());
}

Expand Down

0 comments on commit f50a7e9

Please sign in to comment.