PageParameters.hashCode is inconsistent with equals for named parameters in a different order
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Javaソースコードで PageParameters.equals と PageParameters.hashCode を見つけ、その実装と近くにあるテストを読んでください。異なる順序で挿入された同じ名前付きパラメーターを対象とするテストを追加または更新し、それらのハッシュコードが一致することを確認してください。issueでは、ペアのハッシュコードを合計する方法が1つの案として説明されています。
索引モデルが issue の本文から書いたものです。
説明
PageParameters.equals and PageParameters.hashCode disagree about the named parameters, so two PageParameters that are equal can have different hash codes. That breaks the contract of Object.hashCode.
equals compares the named parameters regardless of their order: the lists must hold the same pairs, each the same number of times. hashCode uses namedParameters.hashCode(), the order-sensitive hash of the List<NamedPair>.
PageParameters a = new PageParameters().add("a", "1").add("b", "2");
PageParameters b = new PageParameters().add("b", "2").add("a", "1");
a.equals(b); // true
a.hashCode() == b.hashCode(); // false
Anything that puts PageParameters in a hash-based collection, or in a key that includes them, can treat these two as different. The fix is to make hashCode order-insensitive for the named parameters, for example by summing the hash codes of the pairs.
- 主要言語
- Java
- スター
- 799
- フォーク
- 420
- 平均マージ
- 18時間 37分
- マージ済み PR(30日)
- 140
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/wicket のほかの issue
-
Document and enforce pull request review guidelines対応中かも @dashorst が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
COOP and COEP exemptions compare with the context path, so page exemptions never match対応中かも @asvanberg が 18 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
apache/wicket#1661 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
The CSP report-uri is lost in development mode because strict() clears it再び着手できるかも @VelpulaGangavardhan が 22 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/wicket#1660 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRubyオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
hermes-queue
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
chrisalunlloyd2-sudo/mindpalace#349 ·
メンテナーはふだん 1 日以内に返信
-
Retry-After parser accepts invalid delay-seconds values対応中かも @Dhruvraj-Rana が今日担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
open-telemetry/opentelemetry-java#9018 ·
メンテナーはふだん 2 日以内に返信
-
bug priority: medium Review effort [1-5]: 2 status: needs-triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
carlos-emr/carlos#5818 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue help wanted tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
appmonster007/kmip-adapter#100 ·