Skip to content

Commit

Permalink
Use the correct annotation name in the error message
Browse files Browse the repository at this point in the history
- Also display the offending annotated element
  • Loading branch information
gastaldi committed Aug 22, 2023
1 parent 6bd3669 commit 0d0e790
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 0d0e790

Please sign in to comment.