chocoteam / chocoteam/choco-solver
`Settings` object should become immutable once the model is setup
Open
bug
- Dominant language
- Java
- Stars
- 779
- Forks
- 159
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 10
Description
This way of declaring settings is correct:
```java
Model model = new Model(Settings.init().setWarnUser(false));
```
because the `Settings` instance is not stored and cannot be modified once the model is created.
But the following declaration makes possible to change the settings afterward:
```java
Settings settings = Settings.init().setWarnUser(false);
Model model = new Model(settings);
settings.setWarnUser(true);
```
I suppose the settings must be set immutable or the model should have a deep copy of it.
Contributor guide
Assessment
This issue has not been assessed yet.