Skip to content

Commit 993d1f5

Browse files
committed
Fix collecting lines by appending a line feed
Fixes #296.
1 parent 25b125f commit 993d1f5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

metafacture-strings/src/main/java/org/metafacture/strings/LineRecorder.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
import org.metafacture.framework.helpers.DefaultObjectPipe;
2424

2525
/**
26-
* Joins strings and emits them as records when a line matches the pattern.
26+
* Collects trings and emits them as records when a line matches the pattern.
27+
* Appends to every incoming line a line feed so that the original structure is
28+
* preserved.
2729
*
2830
* @author Pascal Christoph (dr0i).
2931
*
3032
*/
31-
@Description("Joins strings and emits them as records when a line matches the pattern.")
33+
@Description("Collects strings and emits them as records when a line matches the pattern.")
3234
@In(String.class)
3335
@Out(String.class)
3436
@FluxCommand("lines-to-records")
@@ -50,7 +52,7 @@ public void process(final String line) {
5052
getReceiver().process(record.toString());
5153
record = new StringBuilder(SB_CAPACITY);
5254
} else
53-
record.append(line);
55+
record.append(line + "\n");
5456
}
5557

5658
}

0 commit comments

Comments
 (0)