Skip to content

[BUG] IntIterableSetUtils.union() incorrect behavior when one of the set is empty #982

Closed
@Holt59

Description

@Holt59

Describe the bug

The following:

IntIterableSetUtils.union(new IntIterableRangeSet(), new IntIterableRangeSet(0));

results in an empty set instead of a single set containing 0.

Possible solution

Not a solution but that condition looks strange: https://github.com/chocoteam/choco-solver/blob/master/solver/src/main/java/org/chocosolver/util/objects/setDataStructures/iterable/IntIterableSetUtils.java#L426

Environment (please complete the following information):

  • Choco-solver version: 4.10.10
  • JRE : 8

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions