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 and radcortez committed Aug 30, 2023
1 parent 683e811 commit 87adb2c
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 87adb2c

Please sign in to comment.