Skip to content

Conversation

@ArneBab
Copy link
Contributor

@ArneBab ArneBab commented Nov 8, 2025

Tiny change, replaces most of the use-cases of the much more complex and incorrect #970

// FIXME: is this safe? See bug #131
MediaType textMediaType = new MediaType("text/plain");
MediaType textMediaType = new MediaType("text/plain;charset=utf-8");
textMediaType.setParameter("charset", (e.getExpectedMimeType() != null) ? MediaType.getCharsetRobust(e.getExpectedMimeType()) : null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It kinda looks like this line would immediately clobber whatever you’ve set in the constructor…

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn, sometimes I’m dumb and blind … thank you for catching it. This would have been so much easier if I hadn’t done that late at night and left it uncommitted for weeks …

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this would have been easier if you had written a test first. 😄

(I’m currently trying to write one, but this would be easier if somebody merged #1043 first, because that one contains a lot of shit for easier tests. 🙂)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really mean the "quote n2ntm PR"?

(it feels like the quoting PR still needs so much work that I should only finish it after the next release)

Copy link
Contributor

@Bombe Bombe Nov 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, both #1043 and #1106, I need the added dependencies for this test I’m currently building for this… but I’d actually settle for #1106, it’s more important, we really need the updated Mockito version. 🙂

…but I can already say: nope, this also doesn’t work. 😁 (Actually, the next line [953] doesn’t.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants