+ currentLocale = CurrentUser.locale();
+ else if (threadLocale.get() != null) {
+ currentLocale = threadLocale.get();
+ }
+ if (log.isTraceEnabled())
+ log.trace("Thread #" + Thread.currentThread().getId() + " " + Thread.currentThread().getName() + " locale: "
+ + currentLocale);
+ if (currentLocale == null)
+ throw new IllegalStateException("No locale found");
+ return currentLocale;