Patch Set 1:

> First impression: I'd like to see the different locales exposed instead of specific functions, just in order to keep the reader class as small as possible. That would involve a couple of lines of reflection, but I think that would be better.

Reflection is almost always a bad idea and I think in this case it is really an overkill given that the only client of getLocale() is the label provider. In fact, overriding the default locale via mock object isn't good anyway: if any E/JGit (test) code calls a JRE method that uses the "real" default locale then we're testing/doing something wrong i.e. "our" getLocale() would be circumvented.

I see two solutions:
1) We deprecate getLocale() in SystemReader and don't add any new methods. Instead, we directly get the correct date formats in the label provider. For the tests we call Locale.setDefault(...) in the MockSystemReader.

2) JGit starts to use ICU (http://site.icu-project.org/) which has backported the necessary Locale methods from JRE 7 and runs on JRE 5. ICU is already part of Eclipse SDK and RCP. This only has one caveat: the version that supports JRE 7 is only available >= 3.7.2, hence E/JGit would have to drop 3.5 and 3.6 support (see also bug 365425).


Personally I like 1) best. This would have been my first choice but since you recommended to keep the indirection via SystemReader I attached a different solution.

Let me know what you think.