xwiki/xwiki-platform — comment on commit cea424914f40ce924afbc49b3159bc8934251aac
File: xwiki-platform-core/xwiki-platform-model/src/main/java/org/xwiki/model/reference/DocumentReference.java line 142
By vmassol:

My proposal was:
- generic params in EntityReference
- helpers methods for get/setLocale and get/setVersion in DocumentReference

Now the fact that we're making the refs immutable changed this since it's no longer possible.

I don't think multiplying the constructor signatures is a good idea.

We could either have:

public DocumentReference(String wikiName, List spaceNames, String pageName, Map parameters)

or

public DocumentReference(String wikiName, List spaceNames, String pageName, Pair... parameters)

where Pair is http://commons.apache.org/lang/api-3.0-beta/org/apache/commons/lang3/Pair.html

The automatic mapping idea seems a bad idea to me (too magic and doesn't work in a lot of cases).

Maybe this needs some discussion on the devs list rather than here to make sure everyone sees it?