Avoid instantiating unnecessary objects during constraint metadata creation

Description

When we improved the code to avoid creating a location per constraint, we then started to create location even if it was not useful.

It can be improved.

Environment

None

Status

Assignee

Guillaume Smet

Reporter

Guillaume Smet

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Major
Configure