You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "kfaraz (via GitHub)" <gi...@apache.org> on 2023/04/16 04:50:09 UTC
[GitHub] [druid] kfaraz commented on a diff in pull request #14093: Nicer error message for CSV with no properties.
kfaraz commented on code in PR #14093:
URL: https://github.com/apache/druid/pull/14093#discussion_r1167694956
##########
processing/src/main/java/org/apache/druid/indexer/Checks.java:
##########
@@ -36,12 +37,18 @@ public static <T> Property<T> checkOneNotNullOrEmpty(List<Property<T>> propertie
if (nonNullProperty == null) {
nonNullProperty = property;
} else {
- throw new IAE("At most one of %s must be present", properties);
+ throw new IAE(
+ "At most one of %s must be present",
Review Comment:
Nit: brackets for interpolation
```suggestion
"At most one of [%s] must be present",
```
##########
processing/src/main/java/org/apache/druid/indexer/Checks.java:
##########
@@ -36,12 +37,18 @@ public static <T> Property<T> checkOneNotNullOrEmpty(List<Property<T>> propertie
if (nonNullProperty == null) {
nonNullProperty = property;
} else {
- throw new IAE("At most one of %s must be present", properties);
+ throw new IAE(
+ "At most one of %s must be present",
+ properties.stream().map(Property::getName).collect(Collectors.toList())
Review Comment:
Maybe String.join() the items using ' or ' .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org