flowable / flowable/flowable-engine
fullMessageBytes in CommentEntityImpl is platform dependent
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 7h 8m
- Merged PRs (30d)
- 2
Description
**Describe the bug**
The comment entity uses new String(byte[] bytes)/String#getBytes() to encode/decode the full message bytes, which may cause messy if there are multiple servers with different character encoding.
**Expected behavior**
The encoding and decoding should be consistent across different servers.
I suggest to use UTF8 to encode/decode, the code should be something like:
```java
public byte[] getFullMessageBytes() {
return (fullMessage != null ? fullMessage.getBytes(StandardCharsets.UTF_8) : null);
}
public void setFullMessageBytes(byte[] fullMessageBytes) {
fullMessage = (fullMessageBytes != null ? new String(fullMessageBytes, StandardCharsets.UTF_8) : null);
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.