Skip to content

Commit 00b6cf3

Browse files
committed
Fix a typo in ContextPairs.flat()
Changed 'delimeter' to 'delimiter' in the method parameter name and its usage. Signed-off-by: banseok1216 <bansuk1216@naver.com>
1 parent f7f11a4 commit 00b6cf3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

core/spring-boot/src/main/java/org/springframework/boot/logging/structured/ContextPairs.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ public class ContextPairs {
5252
/**
5353
* Add pairs using flat naming.
5454
* @param <T> the item type
55-
* @param delimeter the delimiter used if there is a prefix
55+
* @param delimiter the delimiter used if there is a prefix
5656
* @param pairs callback to add all the pairs
5757
* @return a {@link BiConsumer} for use with the {@link JsonWriter}
5858
*/
59-
public <T> BiConsumer<T, BiConsumer<String, Object>> flat(String delimeter, Consumer<Pairs<T>> pairs) {
60-
return flat(joinWith(delimeter), pairs);
59+
public <T> BiConsumer<T, BiConsumer<String, Object>> flat(String delimiter, Consumer<Pairs<T>> pairs) {
60+
return flat(joinWith(delimiter), pairs);
6161
}
6262

6363
/**

core/spring-boot/src/test/java/org/springframework/boot/logging/structured/ContextPairsTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ void flatWhenPrefixAppliesPrefix() {
5858
}
5959

6060
@Test
61-
void flatWhenPrefixEndingWithDelimeterAppliesPrefix() {
61+
void flatWhenPrefixEndingWithDelimiterAppliesPrefix() {
6262
ContextPairs contextPairs = new ContextPairs(true, "the_");
6363
Map<String, String> map = Map.of("spring", "boot");
6464
Map<String, Object> actual = apply(contextPairs.flat("_", (pairs) -> pairs.addMapEntries((item) -> map)));
6565
assertThat(actual).containsOnly(entry("the_spring", "boot"));
6666
}
6767

6868
@Test
69-
void flatWhenPrefixAndNameStartingWithDelimeterAppliesPrefix() {
69+
void flatWhenPrefixAndNameStartingWithDelimiterAppliesPrefix() {
7070
ContextPairs contextPairs = new ContextPairs(true, "the");
7171
Map<String, String> map = Map.of("_spring", "boot");
7272
Map<String, Object> actual = apply(contextPairs.flat("_", (pairs) -> pairs.addMapEntries((item) -> map)));

0 commit comments

Comments
 (0)