Skip to content

Commit 6a32209

Browse files
authored
Fix NPE on module.name() (#655)
I have only observed this NPE on partial compilation errors. This might not be strictly required but putting this fix in for that odd case.
1 parent 8ef1f3d commit 6a32209

File tree

1 file changed

+2
-1
lines changed
  • inject-generator/src/main/java/io/avaje/inject/generator

1 file changed

+2
-1
lines changed

inject-generator/src/main/java/io/avaje/inject/generator/ScopeInfo.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ void buildAutoRequiresAspects(Append writer, Set<String> autoRequires) {
458458

459459
void readModuleMetaData(TypeElement moduleType) {
460460
final InjectModulePrism module = InjectModulePrism.getInstanceOn(moduleType);
461-
details(module.name(), moduleType);
461+
final String name = module == null ? null : module.name();
462+
details(name, moduleType);
462463
readFactoryMetaData(moduleType);
463464
}
464465

0 commit comments

Comments
 (0)