Skip to content

Commit

Permalink
Fix cases where test beans fail module validation (#659)
Browse files Browse the repository at this point in the history
* fix cases where test beans failed module validation

* Format only

---------

Co-authored-by: Rob Bygrave <robin.bygrave@gmail.com>
  • Loading branch information
SentryMan and rbygrave authored Aug 1, 2024
1 parent caf6209 commit 353abdb
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,8 @@ static void addImportedAspects(Map<String, AspectImportPrism> importedMap) {
}

static void validateModule() {
var module = getProjectModuleElement();
if (module != null) {
try (var reader = getModuleInfoReader()) {
new ModuleInfoReader(module, reader)
.validateServices("io.avaje.inject.spi.InjectExtension", CTX.get().spiServices);

} catch (Exception e) {
// can't read module
}
}
APContext.moduleInfoReader().ifPresent(reader ->
reader.validateServices("io.avaje.inject.spi.InjectExtension", CTX.get().spiServices));
}

static Optional<AspectImportPrism> getImportedAspect(String type) {
Expand Down

0 comments on commit 353abdb

Please sign in to comment.