flowable / flowable/flowable-engine

fullMessageBytes in CommentEntityImpl is platform dependent

オープン
#3,397 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
9.5k
フォーク
2.9k
平均マージ
7時間 8分
マージ済み PR(30日)
2

説明

**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);
}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず CommentEntityImpl を見つけ、現在プラットフォームのデフォルトエンコーディングに依存している getFullMessageBytes と setFullMessageBytes を調査します。選択したエンコーディングが両方の変換方向で一貫して使用されていることを確認し、その後、関連する既存のプロジェクトテストを実行して、さまざまなサーバー環境での動作を検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
backend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。