FasterXML / FasterXML/jackson-dataformats-binary

(smile) `SmileGenerator.writeNumber(String)` validates number length against default `StreamReadConstraints` instead of configured ones

オープン
#781 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
347
フォーク
156
平均マージ
3日 3時間
マージ済み PR(30日)
22

説明

\`SmileGenerator._writeIntegralNumber()\` / \`_writeDecimalNumber()\` (used by \`writeNumber(String)\`) guard against too-long number Strings via \`_streamReadConstraints().validateIntegerLength()\` / \`validateFPLength()\`.

But \`_streamReadConstraints()\` returns \`StreamReadConstraints.defaults()\`, so a \`maxNumberLength\` configured on the \`SmileFactory\` is ignored on the write path — both a lower limit (not enforced) and a higher limit (spuriously rejected).

Since \`IOContext\` carries the factory's \`StreamReadConstraints\` (2.15+), the generator can use \`_ioContext.streamReadConstraints()\` instead.

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

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

評価

この issue はまだ評価されていません。

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

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