Skip to content
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

Fix NPE in 9.4-RC1 ExternalProvider #371

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.avaje.inject.generator;

import static io.avaje.inject.generator.ProcessingContext.logDebug;
import static io.avaje.inject.generator.ProcessingContext.logWarn;

import java.util.Iterator;
import java.util.ServiceConfigurationError;
import java.util.ServiceLoader;
Expand Down Expand Up @@ -33,8 +30,6 @@ private static boolean moduleCP() {

static void registerModuleProvidedTypes(Set<String> providedTypes) {
if (!injectAvailable) {
logWarn(
"Unable to detect Avaje Inject in Annotation Processor Class Path, use the Avaje Inject Maven/Gradle plugin for detecting external dependencies");
return;
}

Expand All @@ -43,7 +38,6 @@ static void registerModuleProvidedTypes(Set<String> providedTypes) {
while (iterator.hasNext()) {
try {
var module = iterator.next();
logDebug("Loaded External Module %s", module.getClass().getCanonicalName());
for (final Class<?> provide : module.provides()) {
providedTypes.add(provide.getCanonicalName());
}
Expand All @@ -68,7 +62,6 @@ static void registerPluginProvidedTypes(ScopeInfo defaultScope) {
return;
}
for (final Plugin plugin : ServiceLoader.load(Plugin.class, Processor.class.getClassLoader())) {
logDebug("Loaded Plugin %s", plugin.getClass().getCanonicalName());
for (final Class<?> provide : plugin.provides()) {
defaultScope.pluginProvided(provide.getCanonicalName());
}
Expand Down