Skip to content

Commit

Permalink
Fixed error message output (spaces after commas)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdereg committed Jan 27, 2024
1 parent 1c886c9 commit 5d91ce1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private static <T> T extractValue(Map<?, ?> map, Converter converter, ConverterO
return converter.convert(map.get(VALUE), type, options);
}

String keyText = ArrayUtilities.isEmpty(keys) ? "" : "[" + String.join(",", keys) + "], ";
String keyText = ArrayUtilities.isEmpty(keys) ? "" : "[" + String.join(", ", keys) + "], ";
throw new IllegalArgumentException(String.format(KEY_VALUE_ERROR_MESSAGE, getShortName(type), keyText));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2828,7 +2828,7 @@ void testMapToCalendar(Object value)
map.clear();
assertThatThrownBy(() -> this.converter.convert(map, Calendar.class))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("To convert from Map to Calendar the map must include one of the following: [time,zone], [_v], or [value] with associated values");
.hasMessageContaining("To convert from Map to Calendar the map must include one of the following: [time, zone], [_v], or [value] with associated values");
}

@Test
Expand Down Expand Up @@ -2886,7 +2886,7 @@ void testMapToGregCalendar()
map.clear();
assertThatThrownBy(() -> this.converter.convert(map, GregorianCalendar.class))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("To convert from Map to Calendar the map must include one of the following: [time,zone], [_v], or [value] with associated values");
.hasMessageContaining("To convert from Map to Calendar the map must include one of the following: [time, zone], [_v], or [value] with associated values");
}

@Test
Expand Down Expand Up @@ -2978,7 +2978,7 @@ void testMapToLocalDate()
map.clear();
assertThatThrownBy(() -> this.converter.convert(map, LocalDate.class))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("To convert from Map to LocalDate the map must include one of the following: [year,month,day], [_v], or [value] with associated values");
.hasMessageContaining("To convert from Map to LocalDate the map must include one of the following: [year, month, day], [_v], or [value] with associated values");
}

@Test
Expand Down

0 comments on commit 5d91ce1

Please sign in to comment.