[BUG] Java: Problem.addConstraint accepts the same Constraint twice

オープン
#2,224 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@akhil9tiet がすでに取り組んでいます。

2026年10月27日 から。

  • #2226 @akhil9tiet による — オープン
  • #2228 @akhil9tiet による — マージされずにクローズ

評価

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

説明

bug

In the Java bindings, Problem.addConstraint accepts the same Constraint object twice. The second call overwrites the constraint's index and the list holds it twice, so the problem has an inconsistent constraint list.

Expected: IllegalArgumentException, and getNumConstraints() stays 1.

Disabled test that reproduces it (in #2219): ModelEdgeCaseTest.addingTheSameConstraintTwiceToOneProblemIsRejected

🤖 Generated with Claude Code

主要言語
Cuda
スター
1.1k
フォーク
249
平均マージ
1日 15時間
マージ済み PR(30日)
126

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/cuopt のほかの issue

NVIDIA/cuopt の issue をすべて見る

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

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