Skip to content

StringDecoder shouldn't chop off strings randomly [SPR-16337] #20884

@spring-projects-issues

Description

@spring-projects-issues

Abhijit Sarkar opened SPR-16337 and commented

Given a stream "abc\n", "abc", "def\n", "abc", "def\nxyz\n", "abc", "def", "xyz\n" StringDecoder simply chops them off at newlines. This is hardly desired, since most applications expect to deal with complete records that end on line boundaries. In other words, the expected output for the above would be "abc", "abcdef", "abcdef", "xyz", "abcdefxyz".

I've an alternate implementation that produces the expected output but before making a PR, I would like to check that the existing behavior is not based on some use case I'm not thinking about.
https://github.com/asarkar/spring/blob/master/buffer-learning/src/main/java/org/abhijitsarkar/java/StringDecoder.java


Affects: 5.0.2

Referenced from: commits spring-projects/spring-integration@11240be

0 votes, 7 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions