changeset 11:ea8b7e244e61

Bugfix: repaired a condition that prevented setting the locale of the request object. http-client/trunk@1680 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 14 Apr 2011 07:51:51 +0000
parents e79283dad6f2
children 5b62267a1c3c
files ChangeLog src/main/java/de/intevation/artifacts/httpclient/http/HttpClientImpl.java
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Apr 14 06:01:00 2011 +0000
+++ b/ChangeLog	Thu Apr 14 07:51:51 2011 +0000
@@ -1,3 +1,8 @@
+2011-04-14  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/artifacts/httpclient/http/HttpClientImpl.java:
+	  Bugfix: repaired a condition to leave the setLocale() method.
+
 2011-04-14  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/artifacts/httpclient/http/HttpClientImpl.java:
--- a/src/main/java/de/intevation/artifacts/httpclient/http/HttpClientImpl.java	Thu Apr 14 06:01:00 2011 +0000
+++ b/src/main/java/de/intevation/artifacts/httpclient/http/HttpClientImpl.java	Thu Apr 14 07:51:51 2011 +0000
@@ -299,7 +299,7 @@
      * @param info The ClientInfo that is used to provide request information.
      */
     private void setLocale(ClientInfo info) {
-        if (localeString != null) {
+        if (localeString == null) {
             return;
         }
 
@@ -309,6 +309,8 @@
         Language lang = Language.valueOf(localeString);
 
         if (lang != null) {
+            logger.info("Set locale of the request object: " + lang.toString());
+
             Preference<Language> pref = new Preference<Language>();
             pref.setMetadata(lang);
             accepted.add(pref);

http://dive4elements.wald.intevation.org