You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Java: Problem.addConstraint accepts the same Constraint twice #2224
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
Activity
akhil9tiet commentedon Oct 27, 2026
I'd like to work on this — please assign it to me.
ramakrishnap-nv commentedon Oct 27, 2026
Thank you @akhil9tiet, please create the PR and ping me
test(java): cover model, lifecycle, settings, file and callback corne…