Skip to content

Commit 04a61f1

Browse files
committed
Fix Transformers usage in Docs
**Cherry-pick to 5.0.x** (cherry picked from commit 8afdcb4)
1 parent 2277675 commit 04a61f1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

spring-integration-core/src/main/java/org/springframework/integration/dsl/Transformers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2017 the original author or authors.
2+
* Copyright 2016-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -76,7 +76,7 @@ public static ObjectToMapTransformer toMap(JsonObjectMapper<?, ?> jsonObjectMapp
7676
}
7777

7878
public static ObjectToMapTransformer toMap(JsonObjectMapper<?, ?> jsonObjectMapper, boolean shouldFlattenKeys) {
79-
ObjectToMapTransformer transformer = new ObjectToMapTransformer();
79+
ObjectToMapTransformer transformer = new ObjectToMapTransformer(jsonObjectMapper);
8080
transformer.setShouldFlattenKeys(shouldFlattenKeys);
8181
return transformer;
8282
}

src/reference/asciidoc/file.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public class FileReadingJavaApplication {
409409
.from(s -> s.file(new File(INBOUND_PATH))
410410
.patternFilter("*.txt"),
411411
e -> e.poller(Pollers.fixedDelay(1000)))
412-
.transform(Transformers.fileToString())
412+
.transform(Files.toStringTransformer())
413413
.channel("processFileChannel")
414414
.get();
415415
}

src/reference/asciidoc/mail.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ This maps the following headers:
9898
- `mail_lineCount` - A line count (if available).
9999
- `mail_receivedDate` - The received date (if available).
100100
- `mail_size` - The mail size (if available).
101-
- `mail_expunged` - A boolen indicating if the message is expunged.
101+
- `mail_expunged` - A boolean indicating if the message is expunged.
102102
- `mail_raw` - A `MultiValueMap` containing all the mail headers and their values.
103103
- `mail_contentType` - The content type of the original mail message.
104104
- `contentType` - The payload content type (see below).
@@ -146,7 +146,7 @@ and with the Java DSL:
146146
[source, java]
147147
----
148148
...
149-
.transform(Transformers.fromMail())
149+
.transform(Mail.toStringTransformer())
150150
...
151151
----
152152

0 commit comments

Comments
 (0)