You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/04/21 13:07:14 UTC
[GitHub] [james-project] cketti commented on pull request #972: JAMES-3753 Fix FlowedMessageUtils.deflow()
cketti commented on PR #972:
URL: https://github.com/apache/james-project/pull/972#issuecomment-1105184181
I can't reproduce this. The following test runs fine for me:
```java
@Test
void oomTest() {
String encodedInput = "Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4AAAA=";
String input = new String(Base64.getDecoder().decode(encodedInput), Charsets.UTF_8);
String result = FlowedMessageUtils.deflow(input, DEL_SP_NO);
assertThat(result).isEqualTo(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> \u0000\u0000\u0000");
}
```
The loop code looks okay to me, too.
In general, the `deflow()` code is using a lot of allocations that could be avoided. Rewriting the code is on my ToDo list. But the change in this PR shouldn't make the code any worse than it was before.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org