Skip to content

Commit

Permalink
Friendly error if implementation name cannot be found
Browse files Browse the repository at this point in the history
  • Loading branch information
Camotoy committed May 26, 2024
1 parent 617e000 commit 2d8e6c8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ private boolean gatherElementSpec(
if (nodeTypeElement.getKind().isInterface()) {
// first find the generated class for given type
String implName = this.processor.generatedClasses().getProperty(configClass.reflectionName());
if (implName == null) {
this.processor.printError("Could not determine an implementation type for method " + element.getSimpleName());
return false;
}
// make it canonical and replace superinterface type with source interface type if present
implName = implName.replace('$', '.').replace(type.getQualifiedName(), this.source.getQualifiedName());
configClass = ClassName.bestGuess(implName);
Expand Down

0 comments on commit 2d8e6c8

Please sign in to comment.