Skip to content

Commit

Permalink
Use the correct annotation name in the error message (#980)
Browse files Browse the repository at this point in the history
- Also display the offending annotated element
  • Loading branch information
gastaldi authored Aug 28, 2023
1 parent 6bd3669 commit 15bddb2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ private static String getPropertyName(final AnnotatedElement element) {
WithName annotation = element.getAnnotation(WithName.class);
if (annotation != null) {
if (useParent) {
throw new IllegalArgumentException("Cannot specify both @ParentConfigName and @ConfigName");
throw new IllegalArgumentException("Cannot specify both @WithParentName and @WithName in '" + element + "'");
}
String name = annotation.value();
if (!name.isEmpty()) {
Expand Down

0 comments on commit 15bddb2

Please sign in to comment.