This is not invalid for me and there is definitely something won't in the way XWiki#copyDocument works: the parameters are interpreted as "the source with the provided locale is copied to the target without locale" which I really doubt is how anyone would interpret it. I would have definitely expected the target to have the locale too. It's easy to fix, the only question is: does anyone really expect the current behavior ? In which case it would be a huge breakage. I'm tempted to deprecated all the XWiki#copyDocument methods which take a locale (i.e. not touch them to be extra safe) and recommend to simply pass references with locale in them to be very explicit. |